.. AUTO-GENERATED FILE -- DO NOT EDIT!

interfaces.niftyseg.em
======================


.. _nipype.interfaces.niftyseg.em.EM:


.. index:: EM

EM
--

`Link to code <file:///build/nipype-1.1.8/nipype/interfaces/niftyseg/em.py#L129>`__

Wraps the executable command ``seg_EM``.

Interface for executable seg_EM from NiftySeg platform.

seg_EM is a general purpose intensity based image segmentation tool. In
it's simplest form, it takes in one 2D or 3D image and segments it in n
classes.

`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.EM()
>>> node.inputs.in_file = 'im1.nii'
>>> node.inputs.no_prior = 4
>>> node.cmdline
'seg_EM -in im1.nii -bc_order 3 -bc_thresh 0 -max_iter 100 -min_iter 0 -nopriors 4 -bc_out im1_bc_em.nii.gz -out im1_em.nii.gz -out_outlier im1_outlier_em.nii.gz'

Inputs::

        [Mandatory]
        priors: (a list of items which are any value)
                List of priors filepaths.
                argument: ``%s``
                mutually_exclusive: no_prior, prior_4D
        prior_4D: (an existing file name)
                4D file containing the priors
                argument: ``-prior4D %s``
                mutually_exclusive: no_prior, priors
        no_prior: (an integer (int or long))
                Number of classes to use without prior
                argument: ``-nopriors %s``
                mutually_exclusive: prior_4D, priors
        in_file: (an existing file name)
                Input image to segment
                argument: ``-in %s``, position: 4

        [Optional]
        min_iter: (an integer (int or long), nipype default value: 0)
                Minimum number of iterations
                argument: ``-min_iter %s``
        relax_priors: (a tuple of the form: (a float, a float))
                Relax Priors [relaxation factor: 0<rf<1 (recommended=0.5), gaussian
                regularization: gstd>0 (recommended=2.0)] /only 3D/
                argument: ``-rf %s %s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        out_file: (a file name)
                Output segmentation
                argument: ``-out %s``
        outlier_val: (a tuple of the form: (a float, a float))
                Outlier detection as in (Van Leemput TMI 2003). <fl1> is the
                Mahalanobis threshold [recommended between 3 and 7] <fl2> is a
                convergence ratio below which the outlier detection is going to be
                done [recommended 0.01]
                argument: ``-outlier %s %s``
        mrf_beta_val: (a float)
                Weight of the Markov Random Field
                argument: ``-mrf_beta %s``
        max_iter: (an integer (int or long), nipype default value: 100)
                Maximum number of iterations
                argument: ``-max_iter %s``
        mask_file: (an existing file name)
                Filename of the ROI for label fusion
                argument: ``-mask %s``
        bc_thresh_val: (a float, nipype default value: 0)
                Bias field correction will run only if the ratio of improvement is
                below bc_thresh. (default=0 [OFF])
                argument: ``-bc_thresh %s``
        environ: (a dictionary with keys which are a newbytes or None or a
                  newstr or None and with values which are a newbytes or None or a
                  newstr or None, nipype default value: {})
                Environment variables
        reg_val: (a float)
                Amount of regularization over the diagonal of the covariance matrix
                [above 1]
                argument: ``-reg %s``
        out_outlier_file: (a file name)
                Output outlierness image
                argument: ``-out_outlier %s``
        bc_order_val: (an integer (int or long), nipype default value: 3)
                Polynomial order for the bias field
                argument: ``-bc_order %s``
        out_bc_file: (a file name)
                Output bias corrected image
                argument: ``-bc_out %s``

Outputs::

        out_bc_file: (a file name)
                Output bias corrected image
        out_file: (a file name)
                Output segmentation
        out_outlier_file: (a file name)
                Output outlierness image
