Skip to content

Commit

Permalink
fix : reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
celprov committed Jan 27, 2023
1 parent e9a3b9e commit 94e976b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions fmriprep/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,9 @@ def _run_interface(self, runtime):
nb.load(seg_file),
remap_rois=False,
labels=(
("WM+CSF", "Edge") if has_cifti else
("Ctx GM", "dGM", "sWM+sCSF", "dWM+dCSF", "Cb", "Edge")
("WM+CSF", "Edge")
if has_cifti
else ("Ctx GM", "dGM", "sWM+sCSF", "dWM+dCSF", "Cb", "Edge")
),
)

Expand Down
6 changes: 3 additions & 3 deletions fmriprep/workflows/bold/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,9 +1086,9 @@ def _carpet_parcellation(segmentation, crown_mask, acompcor_mask, nifti=False):

lut = np.zeros((256,), dtype="uint8")
lut[100:201] = 1 if nifti else 0 # Ctx GM
lut[30:99] = 2 if nifti else 0 # dGM
lut[1:11] = 3 if nifti else 1 # WM+CSF
lut[255] = 5 if nifti else 0 # Cerebellum
lut[30:99] = 2 if nifti else 0 # dGM
lut[1:11] = 3 if nifti else 1 # WM+CSF
lut[255] = 5 if nifti else 0 # Cerebellum
# Apply lookup table
seg = lut[np.uint16(img.dataobj)]
seg[np.bool(nb.load(crown_mask).dataobj)] = 6 if nifti else 2
Expand Down

0 comments on commit 94e976b

Please sign in to comment.