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

interfaces.niftyseg.label_fusion
================================


.. _nipype.interfaces.niftyseg.label_fusion.CalcTopNCC:


.. index:: CalcTopNCC

CalcTopNCC
----------

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

Wraps the executable command ``seg_CalcTopNCC``.

Interface for executable seg_CalcTopNCC from NiftySeg platform.

Examples
~~~~~~~~
>>> from nipype.interfaces import niftyseg
>>> node = niftyseg.CalcTopNCC()
>>> node.inputs.in_file = 'im1.nii'
>>> node.inputs.num_templates = 2
>>> node.inputs.in_templates = ['im2.nii', 'im3.nii']
>>> node.inputs.top_templates = 1
>>> node.cmdline
'seg_CalcTopNCC -target im1.nii -templates 2 im2.nii im3.nii -n 1'

Inputs::

        [Mandatory]
        top_templates: (an integer (int or long))
                Number of Top Templates
                argument: ``-n %s``, position: 4
        num_templates: (an integer (int or long))
                Number of Templates
                argument: ``-templates %s``, position: 2
        in_templates: (a list of items which are an existing file name)
                argument: ``%s``, position: 3
        in_file: (an existing file name)
                Target file
                argument: ``-target %s``, position: 1

        [Optional]
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%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
        mask_file: (an existing file name)
                Filename of the ROI for label fusion
                argument: ``-mask %s``

Outputs::

        out_files: (any value)

.. _nipype.interfaces.niftyseg.label_fusion.LabelFusion:


.. index:: LabelFusion

LabelFusion
-----------

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

Wraps the executable command ``seg_LabFusion``.

Interface for executable seg_LabelFusion from NiftySeg platform using
type STEPS as classifier Fusion.

This executable implements 4 fusion strategies (-STEPS, -STAPLE, -MV or
- SBA), all of them using either a global (-GNCC), ROI-based (-ROINCC),
local (-LNCC) or no image similarity (-ALL). Combinations of fusion
algorithms and similarity metrics give rise to different variants of known
algorithms. As an example, using LNCC and MV as options will run a locally
weighted voting strategy with LNCC derived weights, while using STAPLE and
LNCC is equivalent to running STEPS as per its original formulation.
A few other options pertaining the use of an MRF (-MRF beta), the initial
sensitivity and specificity estimates and the use of only non-consensus
voxels (-unc) for the STAPLE and STEPS algorithm. All processing can be
masked (-mask), greatly reducing memory consumption.

As an example, the command to use STEPS should be:
seg_LabFusion -in 4D_Propragated_Labels_to_fuse.nii -out     FusedSegmentation.nii -STEPS 2 15 TargetImage.nii     4D_Propagated_Intensities.nii

`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.LabelFusion()
>>> node.inputs.in_file = 'im1.nii'
>>> node.inputs.kernel_size = 2.0
>>> node.inputs.file_to_seg = 'im2.nii'
>>> node.inputs.template_file = 'im3.nii'
>>> node.inputs.template_num = 2
>>> node.inputs.classifier_type = 'STEPS'
>>> node.cmdline
'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out im1_steps.nii'

Inputs::

        [Mandatory]
        file_to_seg: (an existing file name)
                Original image to segment (3D Image)
        classifier_type: ('STEPS' or 'STAPLE' or 'MV' or 'SBA')
                Type of Classifier Fusion.
                argument: ``-%s``, position: 2
        in_file: (an existing file name)
                Filename of the 4D integer label image.
                argument: ``-in %s``, position: 1

        [Optional]
        verbose: ('0' or '1' or '2')
                Verbose level [0 = off, 1 = on, 2 = debug] (default = 0)
                argument: ``-v %s``
        conv: (a float)
                Ratio for convergence (default epsilon = 10^-5).
                argument: ``-conv %f``
        prob_flag: (a boolean)
                Probabilistic/Fuzzy segmented image
                argument: ``-outProb``
        template_file: (an existing file name)
                Registered templates (4D Image)
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        proportion: (a float)
                Proportion of the label (only for single labels).
                argument: ``-prop %s``
        unc_thresh: (a float)
                If <float> percent of labels agree, then area is not uncertain.
                argument: ``-uncthres %f``
        set_pq: (a tuple of the form: (a float, a float))
                Value of P and Q [ 0 < (P,Q) < 1 ] (default = 0.99 0.99)
                argument: ``-setPQ %f %f``
        template_num: (an integer (int or long))
                Number of labels to use
        max_iter: (an integer (int or long))
                Maximum number of iterations (default = 15).
                argument: ``-max_iter %d``
        prob_update_flag: (a boolean)
                Update label proportions at each iteration
                argument: ``-prop_update``
        mrf_value: (a float)
                MRF prior strength (between 0 and 5)
                argument: ``-MRF_beta %f``
        out_file: (a file name)
                Output consensus segmentation
                argument: ``-out %s``
        dilation_roi: (an integer (int or long))
                Dilation of the ROI ( <int> d>=1 )
        sm_ranking: ('ALL' or 'GNCC' or 'ROINCC' or 'LNCC', nipype default
                  value: ALL)
                Ranking for STAPLE and MV
                argument: ``-%s``, position: 3
        unc: (a boolean)
                Only consider non-consensus voxels to calculate statistics
                argument: ``-unc``
        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
        mask_file: (an existing file name)
                Filename of the ROI for label fusion
                argument: ``-mask %s``
        kernel_size: (a float)
                Gaussian kernel size in mm to compute the local similarity

Outputs::

        out_file: (an existing file name)
                image written after calculations
