Skip to content

Commit

Permalink
Merge pull request #1 from JailanOweda/debug_cat12_interface
Browse files Browse the repository at this point in the history
FIX Issue nipy#3654: added no surface measure (no ROI) option to cat12…
  • Loading branch information
JailanOweda authored Jun 13, 2024
2 parents 4d1352a + 3f9a039 commit 6442f09
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions nipype/interfaces/cat12/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,13 @@ def _format_arg(self, opt, spec, val):
return scans_for_fname(val)
elif opt in ["tpm", "shooting_tpm"]:
return Cell2Str(val)

if opt == "surface_measures":
if not self.inputs.surface_measures:
self.inputs.neuromorphometrics = False
self.inputs.lpba40 = False
self.inputs.cobra = False
self.inputs.hammers = False

return super()._format_arg(opt, spec, val)

Expand Down Expand Up @@ -582,12 +589,14 @@ def _list_outputs(self):
str(label) for label in Path(pth).glob("label/*") if label.is_file()
]

outputs["label_rois"] = fname_presuffix(
f, prefix=os.path.join("label", "catROIs_"), suffix=".xml", use_ext=False
)
outputs["label_roi"] = fname_presuffix(
f, prefix=os.path.join("label", "catROI_"), suffix=".xml", use_ext=False
)
if self.inputs.surface_measures:
outputs["label_rois"] = fname_presuffix(
f, prefix=os.path.join("label", "catROIs_"), suffix=".xml", use_ext=False
)
else:
outputs["label_roi"] = fname_presuffix(
f, prefix=os.path.join("label", "catROI_"), suffix=".xml", use_ext=False
)

return outputs

Expand Down

0 comments on commit 6442f09

Please sign in to comment.