Skip to content

Commit

Permalink
fixed up changes to syntax to match core
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Sep 4, 2024
1 parent a3f89ec commit 51156c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def generate_mrtrix_sample_data(
mif: ImageFormat,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
) -> ty.List[Path]:
nifti = Nifti1(get_dummy_nifti(generator.dest_dir / "nifti.nii"))
with mock.patch.dict(os.environ, {"MRTRIX_CLI_PARSE_ONLY": "0"}):
mif = ImageFormat.convert(nifti)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def generate_tracks_sample_data(
tracks: Tracks,
generator: SampleFileGenerator,
) -> ty.Iterable[Path]:
) -> ty.List[Path]:
"""Generate a tracks file with a single straight track of length 10"""
fspath = generator.dest_dir / "tracks.tck"
timestamp = str(time.time() * 1e9 + time.process_time_ns())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def data_fspath(self):

@property
def data_offset(self):
return int(self.metadata["file"].split()[1])
fspath_and_offset = self.metadata["file"].split()
assert len(fspath_and_offset) <= 2
return int(fspath_and_offset[1]) if len(fspath_and_offset) > 1 else 0

@property
def vox_sizes(self):
Expand Down

0 comments on commit 51156c5

Please sign in to comment.