@@ -194,7 +194,7 @@ def get_trt(in_meta, in_file=None):
194
194
195
195
# npe = N voxels PE direction
196
196
pe_index = "ijk" .index (in_meta ["PhaseEncodingDirection" ][0 ])
197
- npe = nb .loadsave . load (in_file ).shape [pe_index ]
197
+ npe = nb .load (in_file ).shape [pe_index ]
198
198
199
199
# Use case 2: EES is defined
200
200
ees = in_meta .get ("EffectiveEchoSpacing" )
@@ -255,9 +255,7 @@ def epi_mask(in_file, out_file=None):
255
255
maxnorm = np .percentile (closed [closed > 0 ], 90 )
256
256
closed = np .clip (closed , a_min = 0.0 , a_max = maxnorm )
257
257
# Calculate index of center of masses
258
- cm = tuple (
259
- np .round (ndimage .measurements .center_of_mass (closed )).astype (int )
260
- )
258
+ cm = tuple (np .round (ndimage .measurements .center_of_mass (closed )).astype (int ))
261
259
# Erode the picture of the brain by a lot
262
260
eroded = ndimage .grey_erosion (closed , structure = ball (5 ))
263
261
# Calculate the residual
@@ -273,8 +271,6 @@ def epi_mask(in_file, out_file=None):
273
271
hdr = img .header .copy ()
274
272
hdr .set_data_dtype ("uint8" )
275
273
nb .Nifti1Image (
276
- ndimage .binary_dilation (labels == 2 , ball (2 )).astype ("uint8" ),
277
- img .affine ,
278
- hdr ,
274
+ ndimage .binary_dilation (labels == 2 , ball (2 )).astype ("uint8" ), img .affine , hdr
279
275
).to_filename (out_file )
280
276
return out_file
0 commit comments