Skip to content

Commit

Permalink
updated generate_sample_*_data functions to SampleFileGenerator syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Mar 18, 2024
1 parent b401283 commit 3f2aebc
Showing 1 changed file with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path
import typing as ty
from random import Random
from fileformats.core import FileSet
from fileformats.core import FileSet, SampleFileGenerator
from fileformats.medimage_afni import (
OneD,
Head,
Expand All @@ -16,9 +16,7 @@
@FileSet.generate_sample_data.register
def gen_sample_oned_data(
oned: OneD,
dest_dir: Path,
seed: ty.Union[int, Random] = 0,
stem: ty.Optional[str] = None,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
raise NotImplementedError

Expand All @@ -36,38 +34,30 @@ def gen_sample_head_data(
@FileSet.generate_sample_data.register
def gen_sample_all1_data(
all1: All1,
dest_dir: Path,
seed: ty.Union[int, Random] = 0,
stem: ty.Optional[str] = None,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
raise NotImplementedError


@FileSet.generate_sample_data.register
def gen_sample_r1_data(
r1: R1,
dest_dir: Path,
seed: ty.Union[int, Random] = 0,
stem: ty.Optional[str] = None,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
raise NotImplementedError


@FileSet.generate_sample_data.register
def gen_sample_threed_data(
threed: ThreeD,
dest_dir: Path,
seed: ty.Union[int, Random] = 0,
stem: ty.Optional[str] = None,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
raise NotImplementedError


@FileSet.generate_sample_data.register
def gen_sample_dset_data(
dset: Dset,
dest_dir: Path,
seed: ty.Union[int, Random] = 0,
stem: ty.Optional[str] = None,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
raise NotImplementedError

0 comments on commit 3f2aebc

Please sign in to comment.