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

interfaces.freesurfer.longitudinal
==================================


.. _nipype.interfaces.freesurfer.longitudinal.FuseSegmentations:


.. index:: FuseSegmentations

FuseSegmentations
-----------------

`Link to code <file:///build/nipype-1.1.8/nipype/interfaces/freesurfer/longitudinal.py#L216>`__

Wraps the executable command ``mri_fuse_segmentations``.

fuse segmentations together from multiple timepoints

Examples
~~~~~~~~
>>> from nipype.interfaces.freesurfer import FuseSegmentations
>>> fuse = FuseSegmentations()
>>> fuse.inputs.subject_id = 'tp.long.A.template'
>>> fuse.inputs.timepoints = ['tp1', 'tp2']
>>> fuse.inputs.out_file = 'aseg.fused.mgz'
>>> fuse.inputs.in_segmentations = ['aseg.mgz', 'aseg.mgz']
>>> fuse.inputs.in_segmentations_noCC = ['aseg.mgz', 'aseg.mgz']
>>> fuse.inputs.in_norms = ['norm.mgz', 'norm.mgz', 'norm.mgz']
>>> fuse.cmdline
'mri_fuse_segmentations -n norm.mgz -a aseg.mgz -c aseg.mgz tp.long.A.template tp1 tp2'

Inputs::

        [Mandatory]
        in_segmentations: (a list of items which are an existing file name)
                name of aseg file to use (default: aseg.mgz) must include the aseg
                files for all the given timepoints
                argument: ``-a %s``
        timepoints: (a list of items which are a string)
                subject_ids or timepoints to be processed
                argument: ``%s``, position: -2
        out_file: (a file name)
                output fused segmentation file
        in_segmentations_noCC: (a list of items which are an existing file
                  name)
                name of aseg file w/o CC labels (default: aseg.auto_noCCseg.mgz)
                must include the corresponding file for all the given timepoints
                argument: ``-c %s``
        in_norms: (a list of items which are an existing file name)
                -n <filename> - name of norm file to use (default: norm.mgs) must
                include the corresponding norm file for all given timepoints as well
                as for the current subject
                argument: ``-n %s``

        [Optional]
        subject_id: (a string)
                subject_id being processed
                argument: ``%s``, position: -3
        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
        subjects_dir: (an existing directory name)
                subjects directory

Outputs::

        out_file: (a file name)
                output fused segmentation file

.. _nipype.interfaces.freesurfer.longitudinal.RobustTemplate:


.. index:: RobustTemplate

RobustTemplate
--------------

`Link to code <file:///build/nipype-1.1.8/nipype/interfaces/freesurfer/longitudinal.py#L100>`__

Wraps the executable command ``mri_robust_template``.

construct an unbiased robust template for longitudinal volumes

Examples
~~~~~~~~
>>> from nipype.interfaces.freesurfer import RobustTemplate
>>> template = RobustTemplate()
>>> template.inputs.in_files = ['structural.nii', 'functional.nii']
>>> template.inputs.auto_detect_sensitivity = True
>>> template.inputs.average_metric = 'mean'
>>> template.inputs.initial_timepoint = 1
>>> template.inputs.fixed_timepoint = True
>>> template.inputs.no_iteration = True
>>> template.inputs.subsample_threshold = 200
>>> template.cmdline  #doctest:
'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template mri_robust_template_out.mgz --subsample 200'
>>> template.inputs.out_file = 'T1.nii'
>>> template.cmdline  #doctest:
'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --subsample 200'

>>> template.inputs.transform_outputs = ['structural.lta',
...                                      'functional.lta']
>>> template.inputs.scaled_intensity_outputs = ['structural-iscale.txt',
...                                             'functional-iscale.txt']
>>> template.cmdline    #doctest: +ELLIPSIS
'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../structural-iscale.txt .../functional-iscale.txt --subsample 200 --lta .../structural.lta .../functional.lta'

>>> template.inputs.transform_outputs = True
>>> template.inputs.scaled_intensity_outputs = True
>>> template.cmdline    #doctest: +ELLIPSIS
'mri_robust_template --satit --average 0 --fixtp --mov structural.nii functional.nii --inittp 1 --noit --template T1.nii --iscaleout .../is1.txt .../is2.txt --subsample 200 --lta .../tp1.lta .../tp2.lta'

>>> template.run()  #doctest: +SKIP

References
~~~~~~~~~~
[https://surfer.nmr.mgh.harvard.edu/fswiki/mri_robust_template]

Inputs::

        [Mandatory]
        in_files: (a list of items which are an existing file name)
                input movable volumes to be aligned to common mean/median template
                argument: ``--mov %s``
        out_file: (a file name, nipype default value:
                  mri_robust_template_out.mgz)
                output template volume (final mean/median image)
                argument: ``--template %s``
        auto_detect_sensitivity: (a boolean)
                auto-detect good sensitivity (recommended for head or full brain
                scans)
                argument: ``--satit``
                mutually_exclusive: outlier_sensitivity
        outlier_sensitivity: (a float)
                set outlier sensitivity manually (e.g. "--sat 4.685" ). Higher
                values mean less sensitivity.
                argument: ``--sat %.4f``
                mutually_exclusive: auto_detect_sensitivity

        [Optional]
        num_threads: (an integer (int or long))
                allows for specifying more threads
        transform_outputs: (a list of items which are a file name or a
                  boolean)
                output xforms to template (for each input)
                argument: ``--lta %s``
        subsample_threshold: (an integer (int or long))
                subsample if dim > # on all axes (default no subs.)
                argument: ``--subsample %d``
        initial_transforms: (a list of items which are an existing file name)
                use initial transforms (lta) on source
                argument: ``--ixforms %s``
        average_metric: (u'median' or u'mean')
                construct template from: 0 Mean, 1 Median (default)
                argument: ``--average %d``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        initial_timepoint: (an integer (int or long))
                use TP# for spacial init (default random), 0: no init
                argument: ``--inittp %d``
        fixed_timepoint: (a boolean)
                map everthing to init TP# (init TP is not resampled)
                argument: ``--fixtp``
        in_intensity_scales: (a list of items which are an existing file
                  name)
                use initial intensity scales
                argument: ``--iscalein %s``
        scaled_intensity_outputs: (a list of items which are a file name or a
                  boolean)
                final intensity scales (will activate --iscale)
                argument: ``--iscaleout %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
        subjects_dir: (an existing directory name)
                subjects directory
        intensity_scaling: (a boolean)
                allow also intensity scaling (default off)
                argument: ``--iscale``
        no_iteration: (a boolean)
                do not iterate, just create first template
                argument: ``--noit``

Outputs::

        transform_outputs: (a list of items which are an existing file name)
                output xform files from moving to template
        scaled_intensity_outputs: (a list of items which are an existing file
                  name)
                output final intensity scales
        out_file: (an existing file name)
                output template volume (final mean/median image)
