U
    f»{jH  ã                   @   sB   d Z ddlZddlZddlmZ ddlmZ dd„ Zej 	¡  dS )z›Create BEM surfaces using the watershed algorithm included with FreeSurfer.

Examples
--------
.. code-block:: console

    $ mne watershed_bem -s sample

é    N)Úmake_watershed_bem)Ú_check_optionc                  C   sž  ddl m} m} | tƒ}|jdddddd� |jd	d
dddd� |jdddddd� |jdddddd� |jddddddd� |jddd d!ddd� |jd"d#d$d%dd� |jd&d'd(dd� |jd)d*dd+dd� |jd,d-d.d/d0d� ||ƒ | ¡ \}}|jdk�r| ¡  t 	d1¡ |j}|j
}|j}|j}|j}	|j}
|j}|j}|j}|j}|dk	�rv| ¡ }td*|d2ƒ |d3k}|j}t|||||	|
|||||d4� dS )5zRun command.r   )Úget_optparserÚ_add_verbose_flagz-sz	--subjectÚsubjectzSubject name (required)N)ÚdestÚhelpÚdefaultz-dz--subjects-dirÚsubjects_dirzSubjects directoryz-oz--overwriteÚ	overwritezWrite over existing filesÚ
store_true)r   r   Úactionz-vz--volumeÚvolumezDefaults to T1ÚT1z-az--atlasÚatlasz,Specify the --atlas option for mri_watershedF)r   r   r	   r   z-gz
--gcaatlasÚgcaatlasz2Specify the --brain_atlas option for mri_watershedz-pz
--prefloodÚprefloodzChange the preflood heightz--copyÚcopyz+Use copies instead of symlinks for surfacesz-tz--T1zrWhether or not to pass the -T1 flag (can be true, false, 0, or 1). By default it takes the same value as gcaatlas.z-bz--brainmaskÚ	brainmaskzkThe filename for the brainmask output file relative to the $SUBJECTS_DIR/$SUBJECT/bem/watershed/ directory.Úwsé   )ÚtrueÚfalseÚ0Ú1)r   r   )r   r
   r   r   r   r   r   r   r   r   Úverbose)Zmne.commands.utilsr   r   Ú__file__Ú
add_optionÚ
parse_argsr   Ú
print_helpÚsysÚexitr
   r   r   r   r   r   r   r   r   Úlowerr   r   r   )r   r   ÚparserÚoptionsÚargsr   r
   r   r   r   r   r   r   r   r   r   © r&   ú]/var/www/html/bwave/python/venv/lib/python3.8/site-packages/mne/commands/mne_watershed_bem.pyÚrun   s–    
 ÿ
 ÿ
 ÿ
 ÿ
 þ
 þ
 ÿþ
ü
ü

      ýr(   )
Ú__doc__r    ZmneZmne.bemr   Z	mne.utilsr   r(   ÚutilsZrun_command_if_mainr&   r&   r&   r'   Ú<module>   s   
A