@@ -153,3 +153,50 @@ def _list_outputs(self):
153
153
outputs = self .output_spec ().get ()
154
154
outputs ['out_file' ] = op .abspath (self .inputs .out_file )
155
155
return outputs
156
+
157
+
158
+ class ReplaceFSwithFIRSTInputSpec (CommandLineInputSpec ):
159
+ in_file = File (exists = True , argstr = '%s' , mandatory = True , position = - 4 ,
160
+ desc = 'input anatomical image' )
161
+ in_t1w = File (exists = True , argstr = '%s' , mandatory = True , position = - 3 ,
162
+ desc = 'input T1 image' )
163
+ in_config = File (exists = True , argstr = '%s' , position = - 2 ,
164
+ desc = 'connectome configuration file' )
165
+
166
+ out_file = File (
167
+ 'aparc+first.mif' , argstr = '%s' , mandatory = True , position = - 1 ,
168
+ usedefault = True , desc = 'output file after processing' )
169
+
170
+
171
+ class ReplaceFSwithFIRSTOutputSpec (TraitedSpec ):
172
+ out_file = File (exists = True , desc = 'the output response file' )
173
+
174
+
175
+ class ReplaceFSwithFIRST (CommandLine ):
176
+
177
+ """
178
+ Replace deep gray matter structures segmented with FSL FIRST in a
179
+ FreeSurfer parcellation.
180
+
181
+ Example
182
+ -------
183
+
184
+ >>> import nipype.interfaces.mrtrix3 as mrt
185
+ >>> prep = mrt.ReplaceFSwithFIRST()
186
+ >>> prep.inputs.in_file = 'aparc+aseg.nii.gz'
187
+ >>> prep.inputs.in_t1w = 'T1.nii.gz'
188
+ >>> prep.inputs.in_config = 'mrtrix3_labelconfig.txt'
189
+ >>> prep.cmdline # doctest: +ELLIPSIS
190
+ 'fs_parc_replace_sgm_first aparc+aseg.nii.gz T1.nii.gz \
191
+ mrtrix3_labelconfig.txt aparc+first.mif'
192
+ >>> prep.run() # doctest: +SKIP
193
+ """
194
+
195
+ _cmd = 'fs_parc_replace_sgm_first'
196
+ input_spec = ReplaceFSwithFIRSTInputSpec
197
+ output_spec = ReplaceFSwithFIRSTOutputSpec
198
+
199
+ def _list_outputs (self ):
200
+ outputs = self .output_spec ().get ()
201
+ outputs ['out_file' ] = op .abspath (self .inputs .out_file )
202
+ return outputs
0 commit comments