From 923ab4a091e1f91c177c5f589f69bf080ed0ef40 Mon Sep 17 00:00:00 2001 From: Patrick Sadil Date: Wed, 16 Oct 2024 18:39:14 -0400 Subject: [PATCH] manually undo accidental linting --- sdcflows/utils/epimanip.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sdcflows/utils/epimanip.py b/sdcflows/utils/epimanip.py index 4461f10a5d..d5f9844795 100644 --- a/sdcflows/utils/epimanip.py +++ b/sdcflows/utils/epimanip.py @@ -194,7 +194,7 @@ def get_trt(in_meta, in_file=None): # npe = N voxels PE direction pe_index = "ijk".index(in_meta["PhaseEncodingDirection"][0]) - npe = nb.loadsave.load(in_file).shape[pe_index] + npe = nb.load(in_file).shape[pe_index] # Use case 2: EES is defined ees = in_meta.get("EffectiveEchoSpacing") @@ -255,9 +255,7 @@ def epi_mask(in_file, out_file=None): maxnorm = np.percentile(closed[closed > 0], 90) closed = np.clip(closed, a_min=0.0, a_max=maxnorm) # Calculate index of center of masses - cm = tuple( - np.round(ndimage.measurements.center_of_mass(closed)).astype(int) - ) + cm = tuple(np.round(ndimage.measurements.center_of_mass(closed)).astype(int)) # Erode the picture of the brain by a lot eroded = ndimage.grey_erosion(closed, structure=ball(5)) # Calculate the residual @@ -273,8 +271,6 @@ def epi_mask(in_file, out_file=None): hdr = img.header.copy() hdr.set_data_dtype("uint8") nb.Nifti1Image( - ndimage.binary_dilation(labels == 2, ball(2)).astype("uint8"), - img.affine, - hdr, + ndimage.binary_dilation(labels == 2, ball(2)).astype("uint8"), img.affine, hdr ).to_filename(out_file) return out_file