Skip to content

Commit 37d3ac2

Browse files
Owedaeffigies
Oweda
authored andcommitted
Solved Issue nipy#3654: added no surface measure (no ROI) option to cat12 interface
1 parent 83e3903 commit 37d3ac2

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

nipype/interfaces/cat12/preprocess.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ def _format_arg(self, opt, spec, val):
525525
return scans_for_fname(val)
526526
elif opt in ["tpm", "shooting_tpm"]:
527527
return Cell2Str(val)
528+
529+
if opt == "surface_measures":
530+
if not self.inputs.surface_measures:
531+
self.inputs.neuromorphometrics = False
532+
self.inputs.lpba40 = False
533+
self.inputs.cobra = False
534+
self.inputs.hammers = False
528535

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

@@ -583,12 +590,14 @@ def _list_outputs(self):
583590
str(label) for label in Path(pth).glob("label/*") if label.is_file()
584591
]
585592

586-
outputs["label_rois"] = fname_presuffix(
587-
f, prefix=os.path.join("label", "catROIs_"), suffix=".xml", use_ext=False
588-
)
589-
outputs["label_roi"] = fname_presuffix(
590-
f, prefix=os.path.join("label", "catROI_"), suffix=".xml", use_ext=False
591-
)
593+
if self.inputs.surface_measures:
594+
outputs["label_rois"] = fname_presuffix(
595+
f, prefix=os.path.join("label", "catROIs_"), suffix=".xml", use_ext=False
596+
)
597+
else:
598+
outputs["label_roi"] = fname_presuffix(
599+
f, prefix=os.path.join("label", "catROI_"), suffix=".xml", use_ext=False
600+
)
592601

593602
return outputs
594603

0 commit comments

Comments
 (0)