Skip to content

Commit 51156c5

Browse files
committed
fixed up changes to syntax to match core
1 parent a3f89ec commit 51156c5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

related-packages/fileformats-extras/fileformats/extras/medimage_mrtrix3/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def generate_mrtrix_sample_data(
1414
mif: ImageFormat,
1515
generator: SampleFileGenerator,
16-
) -> ty.Iterable[Path]:
16+
) -> ty.List[Path]:
1717
nifti = Nifti1(get_dummy_nifti(generator.dest_dir / "nifti.nii"))
1818
with mock.patch.dict(os.environ, {"MRTRIX_CLI_PARSE_ONLY": "0"}):
1919
mif = ImageFormat.convert(nifti)

related-packages/fileformats-extras/fileformats/extras/medimage_mrtrix3/tracks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def generate_tracks_sample_data(
1212
tracks: Tracks,
1313
generator: SampleFileGenerator,
14-
) -> ty.Iterable[Path]:
14+
) -> ty.List[Path]:
1515
"""Generate a tracks file with a single straight track of length 10"""
1616
fspath = generator.dest_dir / "tracks.tck"
1717
timestamp = str(time.time() * 1e9 + time.process_time_ns())

related-packages/fileformats/fileformats/medimage_mrtrix3/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def data_fspath(self):
6565

6666
@property
6767
def data_offset(self):
68-
return int(self.metadata["file"].split()[1])
68+
fspath_and_offset = self.metadata["file"].split()
69+
assert len(fspath_and_offset) <= 2
70+
return int(fspath_and_offset[1]) if len(fspath_and_offset) > 1 else 0
6971

7072
@property
7173
def vox_sizes(self):

0 commit comments

Comments
 (0)