3
dh                 @   s   d Z ddlZddlmZmZmZmZ ddlmZ ddlm	Z	 ej
Z
ejded	 G d
d deZG dd deZG dd deZdS )a  
Nipype interface for seg_FillLesions.

The fusion module provides higher-level interfaces to some of the operations
that can be performed with the seg_FillLesions command-line program.

Examples
--------
See the docstrings of the individual classes for examples.
    N   )TraitedSpecFiletraitsCommandLineInputSpec   )NiftySegCommand)get_custom_pathalways)categoryc               @   s  e Zd ZdZeddddddZeddddd	dZed
gdddddZdZe	j
eddZdZe	jeddZdZe	jeddZdZe	jeddZdZe	j
eddZdZe	jeddZdZeeddZdZe	jed dZe	jd!d"dZe	jd#d$dZd%Ze	jed&dZe	jd'd(dZd)S )*FillLesionsInputSpeczInput Spec for FillLesions.z-i %sTzInput image to fill lesionsr   )argstrexists	mandatorydescpositionz-l %szLesion maskr   in_filez%s_lesions_filled.nii.gzz/The output filename of the fill lesions resultsz-o %s   )Zname_sourceZname_templater   r   r   z5Dilate the mask <int> times (in voxels, by default 0)z-dil %d)r   r   zPPercentage of minimum number of voxels between patches <float> (by default 0.5).z	-match %fzJMinimum percentage of valid voxels in target patch <float> (by default 0).z
-search %fzJSmoothing by <float> (in minimal 6-neighbourhood voxels (by default 0.1)).z-smo %fz>Search regions size respect biggest patch size (by default 4).z-size %dz2Patch cardinality weighting factor (by default 2).z-cwf %fz/Give a binary mask with the valid search areas.z-mask %sa  Guizard et al. (FIN 2015) method, it doesn't include the multiresolution/hierarchical inpainting part, this part needs to be done with some external software such as reg_tools and reg_resample from NiftyReg. By default it uses the method presented in Prados et al. (Neuroimage 2016).z-otherz-Uses 2D patches in the Z axis, by default 3D.z-2Dz,Save all intermidium files (by default OFF).z-debugzMSet output <datatype> (char, short, int, uchar, ushort, uint, float, double).z-odt %szVerbose (by default OFF).z-vN)__name__
__module____qualname____doc__r   r   Zlesion_maskout_filer   r   ZIntZin_dilationZFloatmatchsearchZsmoothsizeZcwfZbin_maskZBoolotherZuse_2ddebugStringZout_datatypeverbose r    r    D/tmp/pip-build-7vycvbft/nipype/nipype/interfaces/niftyseg/lesions.pyr      sL   

r   c               @   s   e Zd ZdZeddZdS )FillLesionsOutputSpeczOutput Spec for FillLesions.zOutput segmentation)r   N)r   r   r   r   r   r   r    r    r    r!   r"   d   s   r"   c               @   s$   e Zd ZdZedddZeZeZ	dS )FillLesionsaI  Interface for executable seg_FillLesions from NiftySeg platform.

    Fill all the masked lesions with WM intensity average.

    `Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
    `Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

    Examples
    --------
    >>> from nipype.interfaces import niftyseg
    >>> node = niftyseg.FillLesions()
    >>> node.inputs.in_file = 'im1.nii'
    >>> node.inputs.lesion_mask = 'im2.nii'
    >>> node.cmdline
    'seg_FillLesions -i im1.nii -l im2.nii -o im1_lesions_filled.nii.gz'

    Zseg_FillLesionsZNIFTYSEGDIR)Zenv_dirN)
r   r   r   r   r	   Z_cmdr   Z
input_specr"   Zoutput_specr    r    r    r!   r#   j   s   r#   )r   warningsbaser   r   r   r   r   Zniftyreg.baser	   warnfilterwarningsUserWarningr   r"   r#   r    r    r    r!   <module>   s   L