Skip to content

Commit 923ab4a

Browse files
committed
manually undo accidental linting
1 parent 9b40a9d commit 923ab4a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

sdcflows/utils/epimanip.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def get_trt(in_meta, in_file=None):
194194

195195
# npe = N voxels PE direction
196196
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]
198198

199199
# Use case 2: EES is defined
200200
ees = in_meta.get("EffectiveEchoSpacing")
@@ -255,9 +255,7 @@ def epi_mask(in_file, out_file=None):
255255
maxnorm = np.percentile(closed[closed > 0], 90)
256256
closed = np.clip(closed, a_min=0.0, a_max=maxnorm)
257257
# 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))
261259
# Erode the picture of the brain by a lot
262260
eroded = ndimage.grey_erosion(closed, structure=ball(5))
263261
# Calculate the residual
@@ -273,8 +271,6 @@ def epi_mask(in_file, out_file=None):
273271
hdr = img.header.copy()
274272
hdr.set_data_dtype("uint8")
275273
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
279275
).to_filename(out_file)
280276
return out_file

0 commit comments

Comments
 (0)