3
dk                 @   st   d dl Z d dlmZ d dlmZmZmZmZmZm	Z	 d dl
mZ G dd deZG dd deZG d	d
 d
eZdS )    N)Path)TraitedSpecCommandLineInputSpecCommandLineFiletraits	isdefined)split_filenamec            	   @   s^   e Zd ZeddddddZeddddd	d
gddZedddddd
gddZejddddZ	dS )RobexInputSpeczInput volumeTr   z%s)descexists	mandatorypositionargstrzOutput volume   Fz%s_brainin_file)r   r   r   Z
hash_filesZname_templateZname_sourceZkeep_extensionzOutput mask   z%s_brainmaskz Seed for random number generator   z%i)r   r   r   N)
__name__
__module____qualname__r   r   out_fileout_maskr   ZIntseed r   r   D/tmp/pip-build-7vycvbft/nipype/nipype/interfaces/robex/preprocess.pyr
      s&   r
   c               @   s    e Zd ZeddZeddZdS )RobexOutputSpeczOutput volume)r   zOutput maskN)r   r   r   r   r   r   r   r   r   r   r   (   s   
r   c               @   s   e Zd ZdZeZeZdZdS )RobexSegmenta  

    ROBEX is an automatic whole-brain extraction tool for T1-weighted MRI data (commonly known as skull stripping).
    ROBEX aims for robust skull-stripping across datasets with no parameter settings. It fits a triangular mesh,
    constrained by a shape model, to the probabilistic output of a supervised brain boundary classifier.
    Because the shape model cannot perfectly accommodate unseen cases, a small free deformation is subsequently allowed.
    The deformation is optimized using graph cuts.
    The method ROBEX is based on was published in IEEE Transactions on Medical Imaging;
    please visit the website http://www.jeiglesias.com to download the paper.

    Examples
    --------
    >>> from nipype.interfaces.robex.preprocess import RobexSegment
    >>> robex = RobexSegment()
    >>> robex.inputs.in_file = 'structural.nii'
    >>> robex.cmdline
    'runROBEX.sh structural.nii structural_brain.nii structural_brainmask.nii'
    >>> robex.run() # doctest: +SKIP

    zrunROBEX.shN)	r   r   r   __doc__r
   Z
input_specr   Zoutput_specZ_cmdr   r   r   r   r   -   s   r   )osZpathlibr   Znipype.interfaces.baser   r   r   r   r   r   Znipype.utils.filemanipr	   r
   r   r   r   r   r   r   <module>   s    