@@ -767,7 +767,8 @@ class MRResize(MRTrix3Base):
767
767
output_spec = MRResizeOutputSpec
768
768
769
769
770
- class SHConvInputSpec (TraitedSpec ):
770
+ class SHConvInputSpec (CommandLineInputSpec ):
771
+
771
772
in_file = File (
772
773
exists = True ,
773
774
argstr = "%s" ,
@@ -802,20 +803,20 @@ class SHConvOutputSpec(TraitedSpec):
802
803
803
804
class SHConv (CommandLine ):
804
805
"""
805
- Convert diffusion-weighted images to tensor images
806
+ Convolve spherical harmonics with a tissue response function. Useful for
807
+ checking residuals of ODF estimates.
806
808
807
809
808
810
Example
809
811
-------
810
812
811
813
>>> import nipype.interfaces.mrtrix3 as mrt
812
- >>> tsr = mrt.SHConv()
813
- >>> tsr.inputs.in_file = 'odf.mif'
814
- >>> tsr.inputs.response = 'response.txt'
815
- >>> tsr.inputs.grad_fsl = ('bvecs', 'bvals')
816
- >>> tsr.cmdline # doctest: +ELLIPSIS
817
- 'dwi2tensor -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif dti.mif'
818
- >>> tsr.run() # doctest: +SKIP
814
+ >>> sh = mrt.SHConv()
815
+ >>> sh.inputs.in_file = 'odf.mif'
816
+ >>> sh.inputs.response = 'response.txt'
817
+ >>> sh.cmdline # doctest: +ELLIPSIS
818
+ 'shconv odf.mif response.txt sh.mif'
819
+ >>> sh.run() # doctest: +SKIP
819
820
"""
820
821
821
822
_cmd = "shconv"
@@ -829,7 +830,7 @@ def _list_outputs(self):
829
830
830
831
831
832
832
- class SH2AmpInputSpec (MRTrix3BaseInputSpec ):
833
+ class SH2AmpInputSpec (CommandLineInputSpec ):
833
834
in_file = File (
834
835
exists = True ,
835
836
argstr = "%s" ,
@@ -844,7 +845,8 @@ class SH2AmpInputSpec(MRTrix3BaseInputSpec):
844
845
mandatory = True ,
845
846
argstr = "%s" ,
846
847
position = - 2 ,
847
- desc = ("The directions along which to sample the function" ),
848
+ desc = ("The gradient directions along which to sample the spherical "
849
+ "harmonics MRtrix format" ),
848
850
)
849
851
850
852
out_file = File (
@@ -866,21 +868,22 @@ class SH2AmpOutputSpec(TraitedSpec):
866
868
desc = "the output convoluted spherical harmonics file" )
867
869
868
870
869
- class SH2Amp (MRTrix3Base ):
871
+ class SH2Amp (CommandLine ):
870
872
"""
871
- Convert diffusion-weighted images to tensor images
873
+ Sample spherical harmonics on a set of gradient orientations. Useful for
874
+ checking residuals of ODF estimates.
872
875
873
876
874
877
Example
875
878
-------
876
879
877
880
>>> import nipype.interfaces.mrtrix3 as mrt
878
- >>> sha = mrt.SH2Amp()
879
- >>> sha .inputs.in_file = 'odf .mif'
880
- >>> sha .inputs.response = 'response .txt'
881
- >>> sha .cmdline # doctest: +ELLIPSIS
882
- 'dwi2tensor -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif dti .mif'
883
- >>> sha .run() # doctest: +SKIP
881
+ >>> sh = mrt.SH2Amp()
882
+ >>> sh .inputs.in_file = 'sh .mif'
883
+ >>> sh .inputs.directions = 'grads .txt'
884
+ >>> sh .cmdline # doctest: +ELLIPSIS
885
+ 'sh2amp sh.mif grads.txt amp .mif'
886
+ >>> sh .run() # doctest: +SKIP
884
887
"""
885
888
886
889
_cmd = "sh2amp"
0 commit comments