@@ -117,9 +117,7 @@ def _resample_4d(
117117 for t in range (n_vols ):
118118 if motion_xfms is not None :
119119 vol_coords_ras = motion_xfms [t ].map (static_coords_ras , inverse = True )
120- voxel_grid = _ras_to_voxel_grid (
121- vol_coords_ras , src_affine_inv , ref_shape
122- )
120+ voxel_grid = _ras_to_voxel_grid (vol_coords_ras , src_affine_inv , ref_shape )
123121 else :
124122 assert static_voxel_grid is not None # noqa: S101
125123 voxel_grid = static_voxel_grid
@@ -140,9 +138,7 @@ def _resample_4d(
140138 final_data = out_data if is_4d else out_data [..., 0 ]
141139 out_img = nib .Nifti1Image (final_data , reference_img .affine )
142140 if is_4d :
143- zooms = (
144- reference_img .header .get_zooms ()[:3 ] + src_img .header .get_zooms ()[3 :4 ]
145- )
141+ zooms = reference_img .header .get_zooms ()[:3 ] + src_img .header .get_zooms ()[3 :4 ]
146142 else :
147143 zooms = reference_img .header .get_zooms ()[:3 ]
148144 out_img .header .set_zooms (zooms )
@@ -192,9 +188,7 @@ def _load_motion_xfms(
192188 if not motion_mats :
193189 raise FileNotFoundError (f"No motion .mat files found in { motion_mat_dir } " )
194190 return [
195- nt .linear .load (
196- str (m ), fmt = "fsl" , reference = bold_ref_img , moving = bold_ref_img
197- )
191+ nt .linear .load (str (m ), fmt = "fsl" , reference = bold_ref_img , moving = bold_ref_img )
198192 for m in motion_mats
199193 ]
200194
0 commit comments