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

interfaces.niftyseg.patchmatch
==============================


.. _nipype.interfaces.niftyseg.patchmatch.PatchMatch:


.. index:: PatchMatch

PatchMatch
----------

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

Wraps the executable command ``seg_PatchMatch``.

Interface for executable seg_PatchMatch from NiftySeg platform.

The database file is a text file and in each line we have a template
file, a mask with the search region to consider and a file with the
label to propagate.

Input image, input mask, template images from database and masks from
database must have the same 4D resolution (same number of XxYxZ voxels,
modalities and/or time-points).
Label files from database must have the same 3D resolution
(XxYxZ voxels) than input image but can have different number of
volumes than the input image allowing to propagate multiple labels
in the same execution.

`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.PatchMatch()
>>> node.inputs.in_file = 'im1.nii'
>>> node.inputs.mask_file = 'im2.nii'
>>> node.inputs.database_file = 'db.xml'
>>> node.cmdline
'seg_PatchMatch -i im1.nii -m im2.nii -db db.xml -o im1_pm.nii.gz'

Inputs::

        [Mandatory]
        mask_file: (an existing file name)
                Input mask for the area where applies PatchMatch
                argument: ``-m %s``, position: 2
        in_file: (an existing file name)
                Input image to segment
                argument: ``-i %s``, position: 1
        database_file: (an existing file name)
                Database with the segmentations
                argument: ``-db %s``, position: 3

        [Optional]
        cs_size: (an integer (int or long))
                Constrained search area size, number of times bigger than the
                patchsize
                argument: ``-cs %i``
        out_file: (a file name)
                The output filename of the patchmatch results
                argument: ``-o %s``, position: 4
        patch_size: (an integer (int or long))
                Patch size, #voxels
                argument: ``-size %i``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        pm_num: (an integer (int or long))
                Number of patchmatch executions
                argument: ``-pm %i``
        match_num: (an integer (int or long))
                Number of better matching
                argument: ``-match %i``
        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
        it_num: (an integer (int or long))
                Number of iterations for the patchmatch algorithm
                argument: ``-it %i``

Outputs::

        out_file: (a file name)
                Output segmentation
