@@ -113,9 +113,9 @@ class CAT12SegmentInputSpec(SPMCommandInputSpec):
113
113
'rhe "Optimized Shooting - superlarge ventricles" option for "Spatial registration" is ! '
114
114
"required Values: \n none: 0;\n light: 1;\n full: 2;\n default: 1070."
115
115
)
116
- initial_segmentation = traits .Int (
117
- 0 , field = "extopts.spm_kamap" , desc = _help_initial_seg , usedefault = True
118
- )
116
+ # initial_segmentation = traits.Int(
117
+ # 0, field="extopts.spm_kamap", desc=_help_initial_seg, usedefault=True
118
+ # )
119
119
120
120
_help_las = (
121
121
"Additionally to WM-inhomogeneities, GM intensity can vary across different regions such as the motor"
@@ -232,10 +232,8 @@ class CAT12SegmentInputSpec(SPMCommandInputSpec):
232
232
surface_measures = traits .Int (
233
233
1 ,
234
234
field = "output.surf_measures" ,
235
- # usedefault=True,
235
+ usedefault = True ,
236
236
desc = "Extract surface measures" ,
237
- # requires=["neuromorphometrics", "lpba40", "cobra", "hammers", "thalamus", "thalamic_nuclei", "suit", "ibsr"],
238
- # xor=["noROI"],
239
237
)
240
238
241
239
# Templates
@@ -244,64 +242,64 @@ class CAT12SegmentInputSpec(SPMCommandInputSpec):
244
242
field = "output.ROImenu.atlases.neuromorphometrics" ,
245
243
# usedefault=True,
246
244
desc = "Extract brain measures for Neuromorphometrics template" ,
247
- xor = ["noROI" ],
245
+ xor = ["noROI" ]
248
246
)
249
247
lpba40 = traits .Bool (
250
248
True ,
251
249
field = "output.ROImenu.atlases.lpba40" ,
252
250
# usedefault=True,
253
251
desc = "Extract brain measures for LPBA40 template" ,
254
- xor = ["noROI" ],
252
+ xor = ["noROI" ]
255
253
)
256
254
cobra = traits .Bool (
257
255
True ,
258
256
field = "output.ROImenu.atlases.hammers" ,
259
257
# usedefault=True,
260
258
desc = "Extract brain measures for COBRA template" ,
261
- xor = ["noROI" ],
259
+ xor = ["noROI" ]
262
260
)
263
261
hammers = traits .Bool (
264
262
False ,
265
263
field = "output.ROImenu.atlases.cobra" ,
266
264
# usedefault=True,
267
265
desc = "Extract brain measures for Hammers template" ,
268
- xor = ["noROI" ],
266
+ xor = ["noROI" ]
269
267
)
270
268
thalamus = traits .Bool (
271
269
True ,
272
270
field = "output.ROImenu.atlases.thalamus" ,
273
271
# usedefault=True,
274
272
desc = "Extract brain measures for Thalamus template" ,
275
- xor = ["noROI" ],
273
+ xor = ["noROI" ]
276
274
)
277
275
thalamic_nuclei = traits .Bool (
278
276
True ,
279
- field = "output.ROImenu.atlases.thalamaic_nuclei " ,
277
+ field = "output.ROImenu.atlases.thalamic_nuclei " ,
280
278
# usedefault=True,
281
279
desc = "Extract brain measures for Thalamic Nuclei template" ,
282
- xor = ["noROI" ],
280
+ xor = ["noROI" ]
283
281
)
284
282
suit = traits .Bool (
285
283
True ,
286
284
field = "output.ROImenu.atlases.suit" ,
287
285
# usedefault=True,
288
286
desc = "Extract brain measures for Suit template" ,
289
- xor = ["noROI" ],
287
+ xor = ["noROI" ]
290
288
)
291
289
ibsr = traits .Bool (
292
290
False ,
293
291
field = "output.ROImenu.atlases.ibsr" ,
294
292
# usedefault=True,
295
293
desc = "Extract brain measures for IBSR template" ,
296
- xor = ["noROI" ],
294
+ xor = ["noROI" ]
297
295
)
298
296
own_atlas = InputMultiPath (
299
297
ImageFileSPM (exists = True ),
300
298
field = "output.ROImenu.atlases.ownatlas" ,
301
299
desc = "Extract brain measures for a given template" ,
302
300
mandatory = False ,
303
301
copyfile = False ,
304
- xor = ["noROI" ],
302
+ xor = ["noROI" ]
305
303
)
306
304
noROI = traits .Bool (
307
305
field = "output.ROImenu.noROI" ,
@@ -574,9 +572,10 @@ def _format_arg(self, opt, spec, val):
574
572
def _list_outputs (self ):
575
573
outputs = self ._outputs ().get ()
576
574
f = self .inputs .in_files [0 ]
577
- pth , base , ext = split_filename (f )
578
575
if '.nii.gz' in f :
579
576
f = f [:- 3 ]
577
+ pth , base , ext = split_filename (f )
578
+
580
579
outputs ["mri_images" ] = [
581
580
str (mri ) for mri in Path (pth ).glob ("mri/*" ) if mri .is_file ()
582
581
]
@@ -626,14 +625,17 @@ def _list_outputs(self):
626
625
outputs ["label_files" ] = [
627
626
str (label ) for label in Path (pth ).glob ("label/*" ) if label .is_file ()
628
627
]
628
+
629
+ if self .inputs .neuromorphometrics or self .inputs .lpba40 or self .inputs .cobra or self .inputs .hammers or self .inputs .thalamus or self .inputs .thalamic_nuclei or self .inputs .suit or self .inputs .ibsr :
630
+ outputs ["label_roi" ] = fname_presuffix (
631
+ f , prefix = os .path .join ("label" , "catROI_" ), suffix = ".xml" , use_ext = False
632
+ )
629
633
630
- if self .inputs .noROI :
634
+ if self .inputs .surface_and_thickness_estimation :
631
635
outputs ["label_rois" ] = fname_presuffix (
632
636
f , prefix = os .path .join ("label" , "catROIs_" ), suffix = ".xml" , use_ext = False
633
637
)
634
- outputs ["label_roi" ] = fname_presuffix (
635
- f , prefix = os .path .join ("label" , "catROI_" ), suffix = ".xml" , use_ext = False
636
- )
638
+
637
639
638
640
return outputs
639
641
0 commit comments