Skip to content

Commit 6442f09

Browse files
authored
Merge pull request #1 from JailanOweda/debug_cat12_interface
FIX Issue nipy#3654: added no surface measure (no ROI) option to cat12…
2 parents 4d1352a + 3f9a039 commit 6442f09

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

nipype/interfaces/cat12/preprocess.py

+15-6
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,13 @@ def _format_arg(self, opt, spec, val):
524524
return scans_for_fname(val)
525525
elif opt in ["tpm", "shooting_tpm"]:
526526
return Cell2Str(val)
527+
528+
if opt == "surface_measures":
529+
if not self.inputs.surface_measures:
530+
self.inputs.neuromorphometrics = False
531+
self.inputs.lpba40 = False
532+
self.inputs.cobra = False
533+
self.inputs.hammers = False
527534

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

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

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

592601
return outputs
593602

0 commit comments

Comments
 (0)