We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a58ee03 commit 1fc32c3Copy full SHA for 1fc32c3
nibabel/minc1.py
@@ -94,9 +94,15 @@ def get_data_shape(self):
94
95
def get_zooms(self):
96
""" Get real-world sizes of voxels """
97
+ result = []
98
# zooms must be positive; but steps in MINC can be negative
- return tuple(
99
- [abs(float(dim.step)) for dim in self._dims])
+ for dim in self._dims:
100
+ try:
101
+ x = abs(float(dim.step))
102
+ except AttributeError:
103
+ x = 1.0
104
+ result.append(x)
105
+ return tuple(result)
106
107
def get_affine(self):
108
nspatial = len(self._spatial_dims)
0 commit comments