interfaces.niftyseg.em

EM

Link to code

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

[Optional]
mask_file: (an existing file name)
        Filename of the ROI for label fusion
        argument: ``-mask %s``
max_iter: (an integer (int or long), nipype default value: 100)
        Maximum number of iterations
        argument: ``-max_iter %s``
min_iter: (an integer (int or long), nipype default value: 0)
        Minimum number of iterations
        argument: ``-min_iter %s``
bc_order_val: (an integer (int or long), nipype default value: 3)
        Polynomial order for the bias field
        argument: ``-bc_order %s``
mrf_beta_val: (a float)
        Weight of the Markov Random Field
        argument: ``-mrf_beta %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``
reg_val: (a float)
        Amount of regularization over the diagonal of the covariance matrix
        [above 1]
        argument: ``-reg %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``
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``
out_file: (a file name)
        Output segmentation
        argument: ``-out %s``
out_bc_file: (a file name)
        Output bias corrected image
        argument: ``-bc_out %s``
out_outlier_file: (a file name)
        Output outlierness image
        argument: ``-out_outlier %s``
args: (a unicode string)
        Additional parameters to the command
        argument: ``%s``
environ: (a dictionary with keys which are a bytes or None or a value
          of class 'str' and with values which are a bytes or None or a
          value of class 'str', nipype default value: {})
        Environment variables

Outputs:

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