3
€d¼  ã               @   s8   d Z ddlZddlmZ ddlmZ G dd„ deƒZdS )	a„  
The niftyfit module provide an interface with the niftyfit software
developed in TIG, UCL.

Software available at:
https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyFit-Release

Version used for this version of the interfaces (git):

commit c6232e4c4223c3d19f7a32906409da5af36299a2
Date:   Fri Jan 6 13:34:02 2017 +0000

Examples
--------
See the docstrings of the individual classes for examples.
é    Né   )ÚCommandLineé   )Úsplit_filenamec                   s.   e Zd ZdZdZ‡ fdd„Zddd„Z‡  ZS )	ÚNiftyFitCommandz7
    Base support interface for NiftyFit commands.
    Z_nfc                s   t t| ƒjf |Ž dS )z4Init method calling super. No version to be checked.N)Úsuperr   Ú__init__)ÚselfÚinputs)Ú	__class__© úA/tmp/pip-build-7vycvbft/nipype/nipype/interfaces/niftyfit/base.pyr   !   s    zNiftyFitCommand.__init__Nc       	      C   s|   |dkr"d| j  }|d7 }t|ƒ‚t|ƒ\}}}|d kr@tjƒ }|d k	rL|}|d k	rbdj||fƒ}tjjtjj||| ƒƒS )NÚ z,Unable to generate filename for command %s. zbasename is not set!)ÚcmdÚ
ValueErrorr   ÚosÚgetcwdÚjoinÚpathÚabspath)	r	   ÚbasenameZout_dirÚsuffixÚextÚmsgÚ_Zfinal_bnZ	final_extr   r   r   Ú
_gen_fname%   s    
zNiftyFitCommand._gen_fname)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú_suffixr   r   Ú__classcell__r   r   )r   r   r      s   r   )r   r   Úbaser   Zutils.filemanipr   r   r   r   r   r   Ú<module>   s   