class_docstr: Perform non-negativity constrained spherical deconvolution.
  
  Note that this program makes use of implied symmetries in the diffusion profile.
  First, the fact the signal attenuation profile is real implies that it has conjugate symmetry,
  i.e. Y(l,-m) = Y(l,m)* (where * denotes the complex conjugate). Second, the diffusion profile should be
  antipodally symmetric (i.e. S(x) = S(-x)), implying that all odd l components should be zero.
  Therefore, this program only computes the even elements. Note that the spherical harmonics equations used here
  differ slightly from those conventionally used, in that the (-1)^m factor has been omitted. This should be taken
  into account in all subsequent calculations. Each volume in the output image corresponds to a different spherical
  harmonic component, according to the following convention:
  
  * [0] Y(0,0)
  * [1] Im {Y(2,2)}
  * [2] Im {Y(2,1)}
  * [3] Y(2,0)
  * [4] Re {Y(2,1)}
  * [5] Re {Y(2,2)}
  * [6] Im {Y(4,4)}
  * [7] Im {Y(4,3)}
  
  Example
  -------
  
  >>> import nipype.interfaces.mrtrix as mrt
  >>> csdeconv = mrt.ConstrainedSphericalDeconvolution()
  >>> csdeconv.inputs.in_file = 'dwi.mif'
  >>> csdeconv.inputs.encoding_file = 'encoding.txt'
  >>> csdeconv.run()                                          # doctest: +SKIP
class_docstr_tok: ["Perform","non-negativity","constrained","spherical","deconvolution",".","Note","that","this","program","makes","use","of","implied","symmetries","in","the","diffusion","profile",".","First",",","the","fact","the","signal","attenuation","profile","is","real","implies","that","it","has","conjugate","symmetry",",","i.e",".","Y","(","l",",","-m",")","=","Y","(","l",",","m",")","*","(","where","*","denotes","the","complex","conjugate",")",".","Second",",","the","diffusion","profile","should","be","antipodally","symmetric","(","i.e",".","S","(","x",")","=","S","(","-x",")",")",",","implying","that","all","odd","l","components","should","be","zero",".","Therefore",",","this","program","only","computes","the","even","elements",".","Note","that","the","spherical","harmonics","equations","used","here","differ","slightly","from","those","conventionally","used",",","in","that","the","(","-1",")","^m","factor","has","been","omitted",".","This","should","be","taken","into","account","in","all","subsequent","calculations",".","Each","volume","in","the","output","image","corresponds","to","a","different","spherical","harmonic","component",",","according","to","the","following","convention",":","*","[","0","]","Y","(","0,0",")","*","[","1","]","Im","{","Y","(","2,2",")","}","*","[","2","]","Im","{","Y","(","2,1",")","}","*","[","3","]","Y","(","2,0",")","*","[","4","]","Re","{","Y","(","2,1",")","}","*","[","5","]","Re","{","Y","(","2,2",")","}","*","[","6","]","Im","{","Y","(","4,4",")","}","*","[","7","]","Im","{","Y","(","4,3",")","}","Example","--","--","--","-",">",">",">","import","nipype.interfaces.mrtrix","as","mrt",">",">",">","csdeconv","=","mrt.ConstrainedSphericalDeconvolution","(",")",">",">",">","csdeconv.inputs.in_file","=","'dwi.mif'",">",">",">","csdeconv.inputs.encoding_file","=","'encoding.txt'",">",">",">","csdeconv.run","(",")","#","doctest",":","+SKIP"]
code: def _gen_filename(self, name):
      if name == "out_filename":
          return self._gen_outfilename()
      else:
          return None
  
imports: import os.path
  import numpy
  from ...None import logging
  from ...utils.filemanip import split_filename
  from ..base import CommandLineInputSpec, CommandLine, BaseInterface, traits, File, TraitedSpec, isdefined
label_desc: Use image node_id 2 for calling the ConstrainedSphericalDeconvolution obj's underlying member method code with example usage: obj._gen_filename(name) and returns: self, None