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 04cd833 commit 3974afaCopy full SHA for 3974afa
nibabel/minc1.py
@@ -105,7 +105,9 @@ def get_affine(self):
105
dim_names = list(self._dim_names) # for indexing in loop
106
for i, name in enumerate(self._spatial_dims):
107
dim = self._dims[dim_names.index(name)]
108
- rot_mat[:, i] = dim.direction_cosines if hasattr(dim, 'direction_cosines') else _default_dir_cos[name]
+ rot_mat[:, i] = (dim.direction_cosines
109
+ if hasattr(dim, 'direction_cosines')
110
+ else _default_dir_cos[name])
111
steps[i] = dim.step if hasattr(dim, 'step') else 1.0
112
starts[i] = dim.start if hasattr(dim, 'start') else 0.0
113
origin = np.dot(rot_mat, starts)
0 commit comments