@@ -351,3 +351,53 @@ def _list_outputs(self):
351351 outputs = self .output_spec ().get ()
352352 outputs ['out_file' ] = op .abspath (self .inputs .out_file )
353353 return outputs
354+
355+
356+ class TCK2VTKInputSpec (CommandLineInputSpec ):
357+ in_file = File (exists = True , argstr = '%s' , mandatory = True , position = - 2 ,
358+ desc = 'input tractography' )
359+ out_file = File ('tracked.vtk' , argstr = '%s' , usedefault = True , position = - 1 ,
360+ desc = 'output VTK file' )
361+ reference = File (
362+ exists = True , argstr = '-image %s' , desc = 'if specified, the properties of'
363+ ' this image will be used to convert track point positions from real '
364+ '(scanner) coordinates into image coordinates (in mm).' )
365+ voxel = File (
366+ exists = True , argstr = '-image %s' , desc = 'if specified, the properties of'
367+ ' this image will be used to convert track point positions from real '
368+ '(scanner) coordinates into image coordinates.' )
369+
370+ nthreads = traits .Int (
371+ argstr = '-nthreads %d' , desc = 'number of threads. if zero, the number'
372+ ' of available cpus will be used' , nohash = True )
373+
374+
375+ class TCK2VTKOutputSpec (TraitedSpec ):
376+ out_file = File (desc = 'output VTK file' )
377+
378+
379+ class TCK2VTK (MRTrix3Base ):
380+
381+ """
382+
383+
384+ Example
385+ -------
386+
387+ >>> import nipype.interfaces.mrtrix3 as mrt
388+ >>> vtk = mrt.TCK2VTK()
389+ >>> vtk.inputs.in_file = 'tracked.tck'
390+ >>> vtk.inputs.reference = 'dwi.nii.gz'
391+ >>> vtk.cmdline # doctest: +ELLIPSIS
392+ 'tck2vtk -image dwi.nii.gz tracked.tck tracked.vtk'
393+ >>> vtk.run() # doctest: +SKIP
394+ """
395+
396+ _cmd = 'tck2vtk'
397+ input_spec = TCK2VTKInputSpec
398+ output_spec = TCK2VTKOutputSpec
399+
400+ def _list_outputs (self ):
401+ outputs = self .output_spec ().get ()
402+ outputs ['out_file' ] = op .abspath (self .inputs .out_file )
403+ return outputs
0 commit comments