3
d9                 @   s\   d Z ddlmZmZ ddlmZmZmZ G dd deZG dd deZG d	d
 d
eZ	dS )a  
The possum module provides classes for interfacing with `POSSUM
<http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/POSSUM>`_ command line tools.
Please, check out the link for pertinent citations using POSSUM.

  .. Note:: This was written to work with FSL version 5.0.6.
   )
FSLCommandFSLCommandInputSpec   )TraitedSpecFiletraitsc               @   s(  e Zd ZeddddddZedddgd	d
ddZejdddddZejdddddZ	ejdddddZ
ejddddgddZejddddgddZejddddgddZejejejejddd d!gd"d#Zejd2dd%d&dZejd'dd(d)dZejd*dd+d,dZejddd-d.dZejd*dd/d0dZd1S )3B0CalcInputSpecTz-i %s    z;filename of input image (usually a tissue/air segmentation))exists	mandatoryargstrpositiondescz-o %sr   in_filez
%s_b0fieldout_filezfilename of B0 output volume)r   r   Zname_sourceZname_templateZoutput_namer   g        z
--gx=%0.4fz0Value for zeroth-order x-gradient field (per mm))
usedefaultr   r   z
--gy=%0.4fz0Value for zeroth-order y-gradient field (per mm)z
--gz=%0.4fz0Value for zeroth-order z-gradient field (per mm)z--b0x=%0.2fxyz_b0z7Value for zeroth-order b0 field (x-component), in Tesla)r   r   xorr   z--b0y=%0.2fz7Value for zeroth-order b0 field (y-component), in Teslag      ?z
--b0=%0.2fz7Value for zeroth-order b0 field (z-component), in Teslaz"--b0x=%0.2f --b0y=%0.2f --b0=%0.2fx_b0y_b0z_b0zZeroth-order B0 field in Tesla)r   r   r   ghM=n>z-d %ez"Delta value (chi_tissue - chi_air)gHך>z	--chi0=%ezsusceptibility of airFz--xyzz6calculate and save all 3 field components (i.e. x,y,z)z--extendboundary=%0.2fz0Relative proportion to extend voxels at boundaryz--directconvz-use direct (image space) convolution, not FFTNghM=n)__name__
__module____qualname__r   r   r   r   ZFloatZx_gradZy_gradZz_gradr   r   r   Tupler   deltaZchi_airZBoolZcompute_xyzZextendboundaryZ
directconv r   r   >/tmp/pip-build-7vycvbft/nipype/nipype/interfaces/fsl/possum.pyr      s   r   c               @   s   e Zd ZedddZdS )B0CalcOutputSpecTzfilename of B0 output volume)r
   r   N)r   r   r   r   r   r   r   r   r   r   q   s   r   c               @   s   e Zd ZdZdZeZeZdS )B0Calcu6  
    B0 inhomogeneities occur at interfaces of materials with different magnetic susceptibilities,
    such as tissue-air interfaces. These differences lead to distortion in the local magnetic field,
    as Maxwell’s equations need to be satisfied. An example of B0 inhomogneity is the first volume
    of the 4D volume ```$FSLDIR/data/possum/b0_ppm.nii.gz```.

    Examples
    --------

    >>> from nipype.interfaces.fsl import B0Calc
    >>> b0calc = B0Calc()
    >>> b0calc.inputs.in_file = 'tissue+air_map.nii'
    >>> b0calc.inputs.z_b0 = 3.0
    >>> b0calc.inputs.output_type = "NIFTI_GZ"
    >>> b0calc.cmdline
    'b0calc -i tissue+air_map.nii -o tissue+air_map_b0field.nii.gz --chi0=4.000000e-07 -d -9.450000e-06 --extendboundary=1.00 --b0x=0.00 --gx=0.0000 --b0y=0.00 --gy=0.0000 --b0=3.00 --gz=0.0000'

    Zb0calcN)	r   r   r   __doc__Z_cmdr   Z
input_specr   Zoutput_specr   r   r   r   r   u   s   r   N)
r    baser   r   r   r   r   r   r   r   r   r   r   r   <module>   s
   `