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