36
36
"PUTAMEN_LEFT" ,
37
37
"PUTAMEN_RIGHT" ,
38
38
"THALAMUS_LEFT" ,
39
- "THALAMUS_RIGHT"
39
+ "THALAMUS_RIGHT" ,
40
40
)
41
41
42
42
@@ -94,12 +94,13 @@ class CiftiCreateDenseFromTemplateInputSpec(CommandLineInputSpec):
94
94
desc = "the input is cropped to the size of the voxel data in the template file" ,
95
95
)
96
96
label_collision = traits .Enum (
97
- ' ERROR' ,
98
- ' SURFACES_FIRST' ,
99
- ' LEGACY' ,
97
+ " ERROR" ,
98
+ " SURFACES_FIRST" ,
99
+ " LEGACY" ,
100
100
argstr = "-label-collision %s" ,
101
101
position = 8 ,
102
- desc = "how to handle conflicts between label keys, use 'LEGACY' to match v1.4.2 and earlier" ,
102
+ desc = "how to handle conflicts between label keys, use 'LEGACY' to match v1.4.2 "
103
+ "and earlier" ,
103
104
)
104
105
cifti = InputMultiObject (
105
106
File (exists = True ),
@@ -122,7 +123,9 @@ class CiftiCreateDenseFromTemplateInputSpec(CommandLineInputSpec):
122
123
volume = InputMultiObject (
123
124
traits .Either (
124
125
traits .Tuple (traits .Enum (VALID_STRUCTURES ), File (exists = True )),
125
- traits .Tuple (traits .Enum (VALID_STRUCTURES ), File (exists = True ), traits .Bool ())
126
+ traits .Tuple (
127
+ traits .Enum (VALID_STRUCTURES ), File (exists = True ), traits .Bool ()
128
+ ),
126
129
),
127
130
argstr = "%s" ,
128
131
position = 12 ,
@@ -160,10 +163,12 @@ class CiftiCreateDenseFromTemplate(WBCommand):
160
163
'wb_command -cifti-create-dense-from-template .../func.dtseries.nii out.dtseries.nii \
161
164
-series 0.8 0.0'
162
165
163
- >>> frmtpl.inputs.volume = [("OTHER", data_dir / 'functional.nii', True), ("PUTAMEN_LEFT", data_dir / 'functional.nii')]
166
+ >>> frmtpl.inputs.volume = [("OTHER", data_dir / 'functional.nii', True), \
167
+ ("PUTAMEN_LEFT", data_dir / 'functional.nii')]
164
168
>>> frmtpl.cmdline #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
165
169
'wb_command -cifti-create-dense-from-template .../func.dtseries.nii out.dtseries.nii \
166
- -series 0.8 0.0 -volume OTHER .../functional.nii -from-cropped -volume PUTAMEN_LEFT .../functional.nii'
170
+ -series 0.8 0.0 -volume OTHER .../functional.nii -from-cropped \
171
+ -volume PUTAMEN_LEFT .../functional.nii'
167
172
"""
168
173
169
174
input_spec = CiftiCreateDenseFromTemplateInputSpec
@@ -214,7 +219,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
214
219
exists = True ,
215
220
argstr = "-roi-left %s" ,
216
221
position = 4 ,
217
- requires = [' left_metric' ],
222
+ requires = [" left_metric" ],
218
223
desc = "ROI (as metric file) of vertices to use from left surface" ,
219
224
)
220
225
right_metric = File (
@@ -227,7 +232,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
227
232
exists = True ,
228
233
argstr = "-roi-right %s" ,
229
234
position = 6 ,
230
- requires = [' right_metric' ],
235
+ requires = [" right_metric" ],
231
236
desc = "ROI (as metric file) of vertices to use from right surface" ,
232
237
)
233
238
cerebellum_metric = File (
@@ -240,7 +245,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
240
245
exists = True ,
241
246
argstr = "-roi-cerebellum %s" ,
242
247
position = 8 ,
243
- requires = [' cerebellum_metric' ],
248
+ requires = [" cerebellum_metric" ],
244
249
desc = "ROI (as metric file) of vertices to use from cerebellum" ,
245
250
)
246
251
timestep = traits .Float (
@@ -256,10 +261,14 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
256
261
desc = "the time at the first frame, in seconds" ,
257
262
)
258
263
unit = traits .Enum (
259
- "SECOND" , "HERTZ" , "METER" , "RADIAN" ,
264
+ "SECOND" ,
265
+ "HERTZ" ,
266
+ "METER" ,
267
+ "RADIAN" ,
260
268
usedefault = True ,
261
269
argstr = "-unit %s" ,
262
- desc = "use a unit other than time" )
270
+ desc = "use a unit other than time" ,
271
+ )
263
272
264
273
265
274
class CiftiCreateDenseTimeseriesOutputSpec (TraitedSpec ):
@@ -427,7 +436,9 @@ class CiftiDilateInputSpec(CommandLineInputSpec):
427
436
428
437
429
438
class CiftiCreateLabelInputSpec (CommandLineInputSpec ):
430
- out_file = File (mandatory = True , argstr = "%s" , position = 0 , desc = "the output CIFTI file" )
439
+ out_file = File (
440
+ mandatory = True , argstr = "%s" , position = 0 , desc = "the output CIFTI file"
441
+ )
431
442
volume_label = File (
432
443
exists = True ,
433
444
requires = ["structure_label_volume" ],
@@ -453,7 +464,7 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
453
464
requires = ["left_label" ],
454
465
argstr = "-roi-left %s" ,
455
466
position = 4 ,
456
- desc = "roi of vertices to use from left surface as a metric file"
467
+ desc = "roi of vertices to use from left surface as a metric file" ,
457
468
)
458
469
right_label = File (
459
470
exists = True ,
@@ -466,7 +477,7 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
466
477
requires = ["right_label" ],
467
478
argstr = "-roi-right %s" ,
468
479
position = 6 ,
469
- desc = "roi of vertices to use from right surface as a metric file"
480
+ desc = "roi of vertices to use from right surface as a metric file" ,
470
481
)
471
482
cerebellum_label = File (
472
483
exists = True ,
@@ -479,9 +490,10 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
479
490
requires = ["cerebellum_label" ],
480
491
argstr = "-roi-cerebellum %s" ,
481
492
position = 8 ,
482
- desc = "roi of vertices to use from cerebellum"
493
+ desc = "roi of vertices to use from cerebellum" ,
483
494
)
484
495
496
+
485
497
class CiftiCreateLabelOutputSpec (TraitedSpec ):
486
498
out_file = File (exists = True , desc = "the output CIFTI file" )
487
499
@@ -592,7 +604,8 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
592
604
desc = "the CIFTI file to resample" ,
593
605
)
594
606
direction = traits .Enum (
595
- "ROW" , "COLUMN" ,
607
+ "ROW" ,
608
+ "COLUMN" ,
596
609
mandatory = True ,
597
610
argstr = "%s" ,
598
611
position = 1 ,
@@ -606,21 +619,25 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
606
619
desc = "a CIFTI file containing the CIFTI space to resample to" ,
607
620
)
608
621
template_direction = traits .Enum (
609
- "ROW" , "COLUMN" ,
622
+ "ROW" ,
623
+ "COLUMN" ,
610
624
mandatory = True ,
611
625
argstr = "%s" ,
612
626
position = 3 ,
613
627
desc = "the direction of the template to use as the resampling space" ,
614
628
)
615
629
surface_method = traits .Enum (
616
- "ADAP_BARY_AREA" , "BARYCENTRIC" ,
630
+ "ADAP_BARY_AREA" ,
631
+ "BARYCENTRIC" ,
617
632
mandatory = True ,
618
633
argstr = "%s" ,
619
634
position = 4 ,
620
635
desc = "surface resampling method" ,
621
636
)
622
637
volume_method = traits .Enum (
623
- "CUBIC" , "ENCLOSING_VOXEL" , "TRILINEAR" ,
638
+ "CUBIC" ,
639
+ "ENCLOSING_VOXEL" ,
640
+ "TRILINEAR" ,
624
641
mandatory = True ,
625
642
argstr = "%s" ,
626
643
position = 5 ,
@@ -657,7 +674,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
657
674
xor = ["volume_predilate_nearest" ],
658
675
argstr = "-weighted" ,
659
676
position = 10 ,
660
- desc = "use weighted dilation (default)"
677
+ desc = "use weighted dilation (default)" ,
661
678
)
662
679
volume_predilate_weighted_exponent = traits .Int (
663
680
requires = ["volume_predilate_weighted" ],
@@ -714,7 +731,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
714
731
exists = True ,
715
732
argstr = "-affine %s" ,
716
733
position = 19 ,
717
- desc = "affine file for transformation on the volume components"
734
+ desc = "affine file for transformation on the volume components" ,
718
735
)
719
736
affine_flirt_source = File (
720
737
exists = True ,
@@ -765,7 +782,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
765
782
requires = ["left_sphere_current" , "left_area_surf_new" ],
766
783
argstr = "-left-area-surfs %s" ,
767
784
position = 26 ,
768
- desc = "a relevant left anatomical surface with current mesh"
785
+ desc = "a relevant left anatomical surface with current mesh" ,
769
786
)
770
787
left_area_surf_new = File (
771
788
exists = True ,
@@ -807,7 +824,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
807
824
requires = ["right_sphere_current" , "right_area_surf_new" ],
808
825
argstr = "-right-area-surfs %s" ,
809
826
position = 32 ,
810
- desc = "a relevant right anatomical surface with current mesh"
827
+ desc = "a relevant right anatomical surface with current mesh" ,
811
828
)
812
829
right_area_surf_new = File (
813
830
exists = True ,
@@ -849,7 +866,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
849
866
requires = ["cerebellum_sphere_current" , "cerebellum_area_surf_new" ],
850
867
argstr = "-cerebellum-area-surfs %s" ,
851
868
position = 38 ,
852
- desc = "a relevant cerebellum anatomical surface with current mesh"
869
+ desc = "a relevant cerebellum anatomical surface with current mesh" ,
853
870
)
854
871
cerebellum_area_surf_new = File (
855
872
exists = True ,
@@ -937,12 +954,14 @@ class VolumeAffineResampleInputSpec(CommandLineInputSpec):
937
954
desc = "a volume file in the volume space you want for the output" ,
938
955
)
939
956
method = traits .Enum (
940
- "CUBIC" , "ENCLOSING_VOXEL" , "TRILINEAR" ,
957
+ "CUBIC" ,
958
+ "ENCLOSING_VOXEL" ,
959
+ "TRILINEAR" ,
941
960
mandatory = True ,
942
961
argstr = "%s" ,
943
962
position = 2 ,
944
963
desc = "The resampling method. The recommended methods are CUBIC "
945
- "(cubic spline) for most data, and ENCLOSING_VOXEL for label data." ,
964
+ "(cubic spline) for most data, and ENCLOSING_VOXEL for label data." ,
946
965
)
947
966
out_file = File (
948
967
name_source = ["in_file" ],
@@ -967,12 +986,12 @@ class VolumeAffineResampleInputSpec(CommandLineInputSpec):
967
986
flirt_source_volume = File (
968
987
exists = True ,
969
988
desc = "the source volume used when generating the affine; defaults to in_file" ,
970
- requires = [' flirt' ],
989
+ requires = [" flirt" ],
971
990
)
972
991
flirt_target_volume = File (
973
992
exists = True ,
974
993
desc = "the target volume used when generating the affine; defaults to volume_space" ,
975
- requires = [' flirt' ],
994
+ requires = [" flirt" ],
976
995
)
977
996
978
997
@@ -1037,7 +1056,8 @@ class VolumeAllLabelsToROIsInputSpec(CommandLineInputSpec):
1037
1056
desc = "the input volume label file" ,
1038
1057
)
1039
1058
label_map = traits .Either (
1040
- traits .Int , Str ,
1059
+ traits .Int ,
1060
+ Str ,
1041
1061
mandatory = True ,
1042
1062
argstr = "%s" ,
1043
1063
position = 1 ,
@@ -1086,7 +1106,8 @@ class VolumeLabelExportTableInputSpec(CommandLineInputSpec):
1086
1106
desc = "the input volume label file" ,
1087
1107
)
1088
1108
label_map = traits .Either (
1089
- traits .Int , Str ,
1109
+ traits .Int ,
1110
+ Str ,
1090
1111
mandatory = True ,
1091
1112
argstr = "%s" ,
1092
1113
position = 1 ,
@@ -1158,7 +1179,8 @@ class VolumeLabelImportInputSpec(CommandLineInputSpec):
1158
1179
desc = "the value that will be interpreted as unlabeled" ,
1159
1180
)
1160
1181
subvolume = traits .Either (
1161
- traits .Int , Str ,
1182
+ traits .Int ,
1183
+ Str ,
1162
1184
argstr = "-subvolume %s" ,
1163
1185
desc = "select a single subvolume to import (number or name)" ,
1164
1186
)
0 commit comments