interfaces.minc.minc

Average

Link to code

Wraps the executable command mincaverage.

Average a number of MINC files.

Examples

>>> from nipype.interfaces.minc import Average
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> files = [nonempty_minc_data(i) for i in range(3)]
>>> average = Average(input_files=files, output_file='/tmp/tmp.mnc')
>>> average.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s)
        argument: ``%s``, position: -2
        mutually_exclusive: input_files, filelist
filelist: (a file name)
        Specify the name of a file containing input file names.
        argument: ``-filelist %s``
        mutually_exclusive: input_files, filelist

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
two: (a boolean)
        Create a MINC 2 output file.
        argument: ``-2``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
verbose: (a boolean)
        Print out log messages (default).
        argument: ``-verbose``
        mutually_exclusive: verbose, quiet
quiet: (a boolean)
        Do not print out log messages.
        argument: ``-quiet``
        mutually_exclusive: verbose, quiet
debug: (a boolean)
        Print out debugging messages.
        argument: ``-debug``
check_dimensions: (a boolean)
        Check that dimension info matches across files (default).
        argument: ``-check_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
no_check_dimensions: (a boolean)
        Do not check dimension info.
        argument: ``-nocheck_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
format_filetype: (a boolean)
        Use data type of first file (default).
        argument: ``-filetype``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_byte: (a boolean)
        Write out byte data.
        argument: ``-byte``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_short: (a boolean)
        Write out short integer data.
        argument: ``-short``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_int: (a boolean)
        Write out 32-bit integer data.
        argument: ``-int``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_long: (a boolean)
        Superseded by -int.
        argument: ``-long``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_float: (a boolean)
        Write out single-precision floating-point data.
        argument: ``-float``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_double: (a boolean)
        Write out double-precision floating-point data.
        argument: ``-double``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_signed: (a boolean)
        Write signed integer data.
        argument: ``-signed``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_unsigned: (a boolean)
        Write unsigned integer data (default).
        argument: ``-unsigned``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
max_buffer_size_in_kb: (a long integer >= 0, nipype default value:
          4096)
        Specify the maximum size of the internal buffers (in kbytes).
        argument: ``-max_buffer_size_in_kb %d``
normalize: (a boolean)
        Normalize data sets for mean intensity.
        argument: ``-normalize``
        mutually_exclusive: normalize, nonormalize
nonormalize: (a boolean)
        Do not normalize data sets (default).
        argument: ``-nonormalize``
        mutually_exclusive: normalize, nonormalize
voxel_range: (a tuple of the form: (an integer (int or long), an
          integer (int or long)))
        Valid range for output data.
        argument: ``-range %d %d``
sdfile: (a file name)
        Specify an output sd file (default=none).
        argument: ``-sdfile %s``
copy_header: (a boolean)
        Copy all of the header from the first file (default for one file).
        argument: ``-copy_header``
        mutually_exclusive: copy_header, no_copy_header
no_copy_header: (a boolean)
        Do not copy all of the header from the first file (default for many
        files)).
        argument: ``-nocopy_header``
        mutually_exclusive: copy_header, no_copy_header
avgdim: (a unicode string)
        Specify a dimension along which we wish to average.
        argument: ``-avgdim %s``
binarize: (a boolean)
        Binarize the volume by looking for values in a given range.
        argument: ``-binarize``
binrange: (a tuple of the form: (a float, a float))
        Specify a range for binarization. Default value: 1.79769e+308
        -1.79769e+308.
        argument: ``-binrange %s %s``
binvalue: (a float)
        Specify a target value (+/- 0.5) forbinarization. Default value:
        -1.79769e+308
        argument: ``-binvalue %s``
weights: (a list of items which are a unicode string)
        Specify weights for averaging ("<w1>,<w2>,...").
        argument: ``-weights %s``
width_weighted: (a boolean)
        Weight by dimension widths when -avgdim is used.
        argument: ``-width_weighted``
        requires: avgdim
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:

output_file: (an existing file name)
        output file

BBox

Link to code

Wraps the executable command mincbbox.

Determine a bounding box of image.

Examples

>>> from nipype.interfaces.minc import BBox
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> file0 = nonempty_minc_data(0)
>>> bbox = BBox(input_file=file0)
>>> bbox.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file containing bounding box corners
threshold: (an integer (int or long))
        VIO_Real value threshold for bounding box. Default value: 0.
        argument: ``-threshold``
one_line: (a boolean)
        Output on one line (default): start_x y z width_x y z
        argument: ``-one_line``
        mutually_exclusive: one_line, two_lines
two_lines: (a boolean)
        Output on two lines: start_x y z
         width_x y z
        argument: ``-two_lines``
        mutually_exclusive: one_line, two_lines
format_mincresample: (a boolean)
        Output format for mincresample: (-step x y z -start x y z -nelements
        x y z
        argument: ``-mincresample``
format_mincreshape: (a boolean)
        Output format for mincreshape: (-start x,y,z -count dx,dy,dz
        argument: ``-mincreshape``
format_minccrop: (a boolean)
        Output format for minccrop: (-xlim x1 x2 -ylim y1 y2 -zlim z1 z2
        argument: ``-minccrop``
out_file: (a file name)
        argument: ``> %s``, position: -1
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:

output_file: (an existing file name)
        output file containing bounding box corners

Beast

Link to code

Wraps the executable command mincbeast.

Extract brain image using BEaST (Brain Extraction using non-local Segmentation Technique).

Examples

>>> from nipype.interfaces.minc import Beast
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> file0 = nonempty_minc_data(0)
>>> beast = Beast(input_file=file0)
>>> beast .run() 

Inputs:

[Mandatory]
library_dir: (a directory name)
        library directory
        argument: ``%s``, position: -3
input_file: (a file name)
        input file
        argument: ``%s``, position: -2

[Optional]
probability_map: (a boolean)
        Output the probability map instead of crisp mask.
        argument: ``-probability``
flip_images: (a boolean)
        Flip images around the mid-sagittal plane to increase patch count.
        argument: ``-flip``
load_moments: (a boolean)
        Do not calculate moments instead use precalculatedlibrary moments.
        (for optimization purposes)
        argument: ``-load_moments``
fill_holes: (a boolean)
        Fill holes in the binary output.
        argument: ``-fill``
median_filter: (a boolean)
        Apply a median filter on the probability map.
        argument: ``-median``
nlm_filter: (a boolean)
        Apply an NLM filter on the probability map (experimental).
        argument: ``-nlm_filter``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
configuration_file: (a file name)
        Specify configuration file.
        argument: ``-configuration %s``
voxel_size: (an integer (int or long), nipype default value: 4)
        Specify voxel size for calculations (4, 2, or 1).Default value: 4.
        Assumes no multiscale. Use configurationfile for multiscale.
        argument: ``-voxel_size %s``
abspath: (a boolean, nipype default value: True)
        File paths in the library are absolute (default is relative to
        library root).
        argument: ``-abspath``
patch_size: (an integer (int or long), nipype default value: 1)
        Specify patch size for single scale approach. Default value: 1.
        argument: ``-patch_size %s``
search_area: (an integer (int or long), nipype default value: 2)
        Specify size of search area for single scale approach. Default
        value: 2.
        argument: ``-search_area %s``
confidence_level_alpha: (a float, nipype default value: 0.5)
        Specify confidence level Alpha. Default value: 0.5
        argument: ``-alpha %s``
smoothness_factor_beta: (a float, nipype default value: 0.5)
        Specify smoothness factor Beta. Default value: 0.25
        argument: ``-beta %s``
threshold_patch_selection: (a float, nipype default value: 0.95)
        Specify threshold for patch selection. Default value: 0.95
        argument: ``-threshold %s``
number_selected_images: (an integer (int or long), nipype default
          value: 20)
        Specify number of selected images. Default value: 20
        argument: ``-selection_num %s``
same_resolution: (a boolean)
        Output final mask with the same resolution as input file.
        argument: ``-same_resolution``
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
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:

output_file: (an existing file name)
        output mask file

BestLinReg

Link to code

Wraps the executable command bestlinreg.

Hierachial linear fitting between two files.

The bestlinreg script is part of the EZminc package:

https://github.com/BIC-MNI/EZminc/blob/master/scripts/bestlinreg.pl

Examples

>>> from nipype.interfaces.minc import BestLinReg
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> input_file = nonempty_minc_data(0)
>>> target_file = nonempty_minc_data(1)
>>> linreg = BestLinReg(source=input_file, target=target_file)
>>> linreg.run() 

Inputs:

[Mandatory]
source: (an existing file name)
        source Minc file
        argument: ``%s``, position: -4
target: (an existing file name)
        target Minc file
        argument: ``%s``, position: -3

[Optional]
output_xfm: (a file name)
        output xfm file
        argument: ``%s``, position: -2
output_mnc: (a file name)
        output mnc file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
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:

output_xfm: (an existing file name)
        output xfm file
output_mnc: (an existing file name)
        output mnc file

BigAverage

Link to code

Wraps the executable command mincbigaverage.

Average 1000’s of MINC files in linear time.

mincbigaverage is designed to discretise the problem of averaging either a large number of input files or averaging a smaller number of large files. (>1GB each). There is also some code included to perform “robust” averaging in which only the most common features are kept via down-weighting outliers beyond a standard deviation.

One advantage of mincbigaverage is that it avoids issues around the number of possible open files in HDF/netCDF. In short if you have more than 100 files open at once while averaging things will slow down significantly.

mincbigaverage does this via a iterative approach to averaging files and is a direct drop in replacement for mincaverage. That said not all the arguments of mincaverage are supported in mincbigaverage but they should be.

This tool is part of the minc-widgets package:

https://github.com/BIC-MNI/minc-widgets/blob/master/mincbigaverage/mincbigaverage

Examples

>>> from nipype.interfaces.minc import BigAverage
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> files = [nonempty_minc_data(i) for i in range(3)]
>>> average = BigAverage(input_files=files, output_float=True, robust=True)
>>> average.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s)
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``--verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``--clobber``
output_float: (a boolean)
        Output files with float precision.
        argument: ``--float``
robust: (a boolean)
        Perform robust averaging, features that are outside 1
        standarddeviation from the mean are downweighted. Works well for
        noisydata with artifacts. see the --tmpdir option if you have alarge
        number of input files.
        argument: ``-robust``
tmpdir: (a directory name)
        temporary files directory
        argument: ``-tmpdir %s``
sd_file: (a file name)
        Place standard deviation image in specified file.
        argument: ``--sdfile %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:

output_file: (an existing file name)
        output file
sd_file: (an existing file name)
        standard deviation image

Blob

Link to code

Wraps the executable command mincblob.

Calculate blobs from minc deformation grids.

Examples

>>> from nipype.interfaces.minc import Blob
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> blob = Blob(input_file=minc2Dfile, output_file='/tmp/tmp.mnc', trace=True)
>>> blob.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to blob
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
trace: (a boolean)
        compute the trace (approximate growth and shrinkage) -- FAST
        argument: ``-trace``
determinant: (a boolean)
        compute the determinant (exact growth and shrinkage) -- SLOW
        argument: ``-determinant``
translation: (a boolean)
        compute translation (structure displacement)
        argument: ``-translation``
magnitude: (a boolean)
        compute the magnitude of the displacement vector
        argument: ``-magnitude``
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:

output_file: (an existing file name)
        output file

Blur

Link to code

Wraps the executable command mincblur.

Convolve an input volume with a Gaussian blurring kernel of user-defined width. Optionally, the first partial derivatives and the gradient magnitude volume can be calculated.

Examples

>>> from nipype.interfaces.minc import Blur
>>> from nipype.interfaces.minc.testdata import minc3Dfile

(1) Blur an input volume with a 6mm fwhm isotropic Gaussian blurring kernel:

>>> blur = Blur(input_file=minc3Dfile, fwhm=6, output_file_base='/tmp/out_6')
>>> blur.run() 

mincblur will create /tmp/out_6_blur.mnc.

  1. Calculate the blurred and gradient magnitude data:
>>> blur = Blur(input_file=minc3Dfile, fwhm=6, gradient=True, output_file_base='/tmp/out_6')
>>> blur.run() 

will create /tmp/out_6_blur.mnc and /tmp/out_6_dxyz.mnc.

(3) Calculate the blurred data, the partial derivative volumes and the gradient magnitude for the same data:

>>> blur = Blur(input_file=minc3Dfile, fwhm=6, partial=True, output_file_base='/tmp/out_6')
>>> blur.run() 

will create /tmp/out_6_blur.mnc, /tmp/out_6_dx.mnc, /tmp/out_6_dy.mnc, /tmp/out_6_dz.mnc and /tmp/out_6_dxyz.mnc.

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2
fwhm: (a float)
        Full-width-half-maximum of gaussian kernel. Default value: 0.
        argument: ``-fwhm %s``
        mutually_exclusive: fwhm, fwhm3d, standard_dev
standard_dev: (a float)
        Standard deviation of gaussian kernel. Default value: 0.
        argument: ``-standarddev %s``
        mutually_exclusive: fwhm, fwhm3d, standard_dev
fwhm3d: (a tuple of the form: (a float, a float, a float))
        Full-width-half-maximum of gaussian kernel.Default value:
        -1.79769e+308 -1.79769e+308 -1.79769e+308.
        argument: ``-3dfwhm %s %s %s``
        mutually_exclusive: fwhm, fwhm3d, standard_dev

[Optional]
output_file_base: (a file name)
        output file base
        argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
gaussian: (a boolean)
        Use a gaussian smoothing kernel (default).
        argument: ``-gaussian``
        mutually_exclusive: gaussian, rect
rect: (a boolean)
        Use a rect (box) smoothing kernel.
        argument: ``-rect``
        mutually_exclusive: gaussian, rect
gradient: (a boolean)
        Create the gradient magnitude volume as well.
        argument: ``-gradient``
partial: (a boolean)
        Create the partial derivative and gradient magnitude volumes as
        well.
        argument: ``-partial``
no_apodize: (a boolean)
        Do not apodize the data before blurring.
        argument: ``-no_apodize``
dimensions: (3 or 1 or 2)
        Number of dimensions to blur (either 1,2 or 3). Default value: 3.
        argument: ``-dimensions %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:

output_file: (an existing file name)
        Blurred output file.
gradient_dxyz: (a file name)
        Gradient dxyz.
partial_dx: (a file name)
        Partial gradient dx.
partial_dy: (a file name)
        Partial gradient dy.
partial_dz: (a file name)
        Partial gradient dz.
partial_dxyz: (a file name)
        Partial gradient dxyz.

Calc

Link to code

Wraps the executable command minccalc.

Compute an expression using MINC files as input.

Examples

>>> from nipype.interfaces.minc import Calc
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> file0 = nonempty_minc_data(0)
>>> file1 = nonempty_minc_data(1)
>>> calc = Calc(input_files=[file0, file1], output_file='/tmp/calc.mnc', expression='A[0] + A[1]') # add files together
>>> calc.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s) for calculation
        argument: ``%s``, position: -2
filelist: (a file name)
        Specify the name of a file containing input file names.
        argument: ``-filelist %s``
        mutually_exclusive: input_files, filelist
expression: (a unicode string)
        Expression to use in calculations.
        argument: ``-expression '%s'``
        mutually_exclusive: expression, expfile
expfile: (a file name)
        Name of file containing expression.
        argument: ``-expfile %s``
        mutually_exclusive: expression, expfile

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
two: (a boolean)
        Create a MINC 2 output file.
        argument: ``-2``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
verbose: (a boolean)
        Print out log messages (default).
        argument: ``-verbose``
        mutually_exclusive: verbose, quiet
quiet: (a boolean)
        Do not print out log messages.
        argument: ``-quiet``
        mutually_exclusive: verbose, quiet
debug: (a boolean)
        Print out debugging messages.
        argument: ``-debug``
copy_header: (a boolean)
        Copy all of the header from the first file.
        argument: ``-copy_header``
        mutually_exclusive: copy_header, no_copy_header
no_copy_header: (a boolean)
        Do not copy all of the header from the first file.
        argument: ``-nocopy_header``
        mutually_exclusive: copy_header, no_copy_header
format_filetype: (a boolean)
        Use data type of first file (default).
        argument: ``-filetype``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_byte: (a boolean)
        Write out byte data.
        argument: ``-byte``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_short: (a boolean)
        Write out short integer data.
        argument: ``-short``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_int: (a boolean)
        Write out 32-bit integer data.
        argument: ``-int``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_long: (a boolean)
        Superseded by -int.
        argument: ``-long``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_float: (a boolean)
        Write out single-precision floating-point data.
        argument: ``-float``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_double: (a boolean)
        Write out double-precision floating-point data.
        argument: ``-double``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_signed: (a boolean)
        Write signed integer data.
        argument: ``-signed``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_unsigned: (a boolean)
        Write unsigned integer data (default).
        argument: ``-unsigned``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
voxel_range: (a tuple of the form: (an integer (int or long), an
          integer (int or long)))
        Valid range for output data.
        argument: ``-range %d %d``
max_buffer_size_in_kb: (a long integer >= 0)
        Specify the maximum size of the internal buffers (in kbytes).
        argument: ``-max_buffer_size_in_kb %d``
check_dimensions: (a boolean)
        Check that files have matching dimensions (default).
        argument: ``-check_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
no_check_dimensions: (a boolean)
        Do not check that files have matching dimensions.
        argument: ``-nocheck_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
ignore_nan: (a boolean)
        Ignore invalid data (NaN) for accumulations.
        argument: ``-ignore_nan``
propagate_nan: (a boolean)
        Invalid data in any file at a voxel produces a NaN (default).
        argument: ``-propagate_nan``
output_nan: (a boolean)
        Output NaN when an illegal operation is done (default).
        argument: ``-nan``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
output_zero: (a boolean)
        Output zero when an illegal operation is done.
        argument: ``-zero``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
output_illegal: (a boolean)
        Value to write out when an illegal operation is done. Default value:
        1.79769e+308
        argument: ``-illegal_value``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
outfiles: (a list of items which are a tuple of the form: (a unicode
          string, a file name))
eval_width: (an integer (int or long))
        Number of voxels to evaluate simultaneously.
        argument: ``-eval_width %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:

output_file: (an existing file name)
        output file

Convert

Link to code

Wraps the executable command mincconvert.

convert between MINC 1 to MINC 2 format.

Examples

>>> from nipype.interfaces.minc import Convert
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> c = Convert(input_file=minc2Dfile, output_file='/tmp/out.mnc', two=True) # Convert to MINC2 format.
>>> c.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file for converting
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
two: (a boolean)
        Create a MINC 2 output file.
        argument: ``-2``
template: (a boolean)
        Create a template file. The dimensions, variables, andattributes of
        the input file are preserved but all data it set to zero.
        argument: ``-template``
compression: (0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)
        Set the compression level, from 0 (disabled) to 9 (maximum).
        argument: ``-compress %s``
chunk: (a long integer >= 0)
        Set the target block size for chunking (0 default, >1 block size).
        argument: ``-chunk %d``
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:

output_file: (an existing file name)
        output file

Copy

Link to code

Wraps the executable command minccopy.

Copy image values from one MINC file to another. Both the input and output files must exist, and the images in both files must have an equal number dimensions and equal dimension lengths.

NOTE: This program is intended primarily for use with scripts such as mincedit. It does not follow the typical design rules of most MINC command-line tools and therefore should be used only with caution.

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to copy
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
pixel_values: (a boolean)
        Copy pixel values as is.
        argument: ``-pixel_values``
        mutually_exclusive: pixel_values, real_values
real_values: (a boolean)
        Copy real pixel intensities (default).
        argument: ``-real_values``
        mutually_exclusive: pixel_values, real_values
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:

output_file: (an existing file name)
        output file

Dump

Link to code

Wraps the executable command mincdump.

Dump a MINC file. Typically used in conjunction with mincgen (see Gen).

Examples

>>> from nipype.interfaces.minc import Dump
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> dump = Dump(input_file=minc2Dfile)
>>> dump.run() 
>>> dump = Dump(input_file=minc2Dfile, output_file='/tmp/out.txt', precision=(3, 4))
>>> dump.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
coordinate_data: (a boolean)
        Coordinate variable data and header information.
        argument: ``-c``
        mutually_exclusive: coordinate_data, header_data
header_data: (a boolean)
        Header information only, no data.
        argument: ``-h``
        mutually_exclusive: coordinate_data, header_data
annotations_brief: ('c' or 'f')
        Brief annotations for C or Fortran indices in data.
        argument: ``-b %s``
        mutually_exclusive: annotations_brief, annotations_full
annotations_full: ('c' or 'f')
        Full annotations for C or Fortran indices in data.
        argument: ``-f %s``
        mutually_exclusive: annotations_brief, annotations_full
variables: (a list of items which are a unicode string)
        Output data for specified variables only.
        argument: ``-v %s``
line_length: (a long integer >= 0)
        Line length maximum in data section (default 80).
        argument: ``-l %d``
netcdf_name: (a unicode string)
        Name for netCDF (default derived from file name).
        argument: ``-n %s``
precision: (an integer (int or long) or a tuple of the form: (an
          integer (int or long), an integer (int or long)))
        Display floating-point values with less precision
        argument: ``%s``
out_file: (a file name)
        argument: ``> %s``, position: -1
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:

output_file: (an existing file name)
        output file

Extract

Link to code

Wraps the executable command mincextract.

Dump a hyperslab of MINC file data.

Examples

>>> from nipype.interfaces.minc import Extract
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> extract = Extract(input_file=minc2Dfile)
>>> extract.run() 
>>> extract = Extract(input_file=minc2Dfile, start=[3, 10, 5], count=[4, 4, 4]) # extract a 4x4x4 slab at offset [3, 10, 5]
>>> extract.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
write_ascii: (a boolean)
        Write out data as ascii strings (default).
        argument: ``-ascii``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_byte: (a boolean)
        Write out data as bytes.
        argument: ``-byte``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_short: (a boolean)
        Write out data as short integers.
        argument: ``-short``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_int: (a boolean)
        Write out data as 32-bit integers.
        argument: ``-int``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_long: (a boolean)
        Superseded by write_int.
        argument: ``-long``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_float: (a boolean)
        Write out data as single precision floating-point values.
        argument: ``-float``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_double: (a boolean)
        Write out data as double precision floating-point values.
        argument: ``-double``
        mutually_exclusive: write_ascii, write_ascii, write_byte,
          write_short, write_int, write_long, write_float, write_double,
          write_signed, write_unsigned
write_signed: (a boolean)
        Write out signed data.
        argument: ``-signed``
        mutually_exclusive: write_signed, write_unsigned
write_unsigned: (a boolean)
        Write out unsigned data.
        argument: ``-unsigned``
        mutually_exclusive: write_signed, write_unsigned
write_range: (a tuple of the form: (a float, a float))
        Specify the range of output values
        Default value: 1.79769e+308 1.79769e+308.
        argument: ``-range %s %s``
normalize: (a boolean)
        Normalize integer pixel values to file max and min.
        argument: ``-normalize``
        mutually_exclusive: normalize, nonormalize
nonormalize: (a boolean)
        Turn off pixel normalization.
        argument: ``-nonormalize``
        mutually_exclusive: normalize, nonormalize
image_range: (a tuple of the form: (a float, a float))
        Specify the range of real image values for normalization.
        argument: ``-image_range %s %s``
image_minimum: (a float)
        Specify the minimum real image value for normalization.Default
        value: 1.79769e+308.
        argument: ``-image_minimum %s``
image_maximum: (a float)
        Specify the maximum real image value for normalization.Default
        value: 1.79769e+308.
        argument: ``-image_maximum %s``
start: (a list of items which are an integer (int or long))
        Specifies corner of hyperslab (C conventions for indices).
        argument: ``-start %s``
count: (a list of items which are an integer (int or long))
        Specifies edge lengths of hyperslab to read.
        argument: ``-count %s``
flip_positive_direction: (a boolean)
        Flip images to always have positive direction.
        argument: ``-positive_direction``
        mutually_exclusive: flip_positive_direction,
          flip_negative_direction, flip_any_direction
flip_negative_direction: (a boolean)
        Flip images to always have negative direction.
        argument: ``-negative_direction``
        mutually_exclusive: flip_positive_direction,
          flip_negative_direction, flip_any_direction
flip_any_direction: (a boolean)
        Do not flip images (Default).
        argument: ``-any_direction``
        mutually_exclusive: flip_positive_direction,
          flip_negative_direction, flip_any_direction
flip_x_positive: (a boolean)
        Flip images to give positive xspace:step value (left-to-right).
        argument: ``+xdirection``
        mutually_exclusive: flip_x_positive, flip_x_negative, flip_x_any
flip_x_negative: (a boolean)
        Flip images to give negative xspace:step value (right-to-left).
        argument: ``-xdirection``
        mutually_exclusive: flip_x_positive, flip_x_negative, flip_x_any
flip_x_any: (a boolean)
        Don't flip images along x-axis (default).
        argument: ``-xanydirection``
        mutually_exclusive: flip_x_positive, flip_x_negative, flip_x_any
flip_y_positive: (a boolean)
        Flip images to give positive yspace:step value (post-to-ant).
        argument: ``+ydirection``
        mutually_exclusive: flip_y_positive, flip_y_negative, flip_y_any
flip_y_negative: (a boolean)
        Flip images to give negative yspace:step value (ant-to-post).
        argument: ``-ydirection``
        mutually_exclusive: flip_y_positive, flip_y_negative, flip_y_any
flip_y_any: (a boolean)
        Don't flip images along y-axis (default).
        argument: ``-yanydirection``
        mutually_exclusive: flip_y_positive, flip_y_negative, flip_y_any
flip_z_positive: (a boolean)
        Flip images to give positive zspace:step value (inf-to-sup).
        argument: ``+zdirection``
        mutually_exclusive: flip_z_positive, flip_z_negative, flip_z_any
flip_z_negative: (a boolean)
        Flip images to give negative zspace:step value (sup-to-inf).
        argument: ``-zdirection``
        mutually_exclusive: flip_z_positive, flip_z_negative, flip_z_any
flip_z_any: (a boolean)
        Don't flip images along z-axis (default).
        argument: ``-zanydirection``
        mutually_exclusive: flip_z_positive, flip_z_negative, flip_z_any
out_file: (a file name)
        argument: ``> %s``, position: -1
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:

output_file: (an existing file name)
        output file in raw/text format

Gennlxfm

Link to code

Wraps the executable command gennlxfm.

Generate nonlinear xfms. Currently only identity xfms are supported!

This tool is part of minc-widgets:

https://github.com/BIC-MNI/minc-widgets/blob/master/gennlxfm/gennlxfm

Examples

>>> from nipype.interfaces.minc import Gennlxfm
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> gennlxfm = Gennlxfm(step=1, like=minc2Dfile)
>>> gennlxfm.run() 

Inputs:

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
ident: (a boolean)
        Generate an identity xfm. Default: False.
        argument: ``-ident``
step: (an integer (int or long))
        Output ident xfm step [default: 1].
        argument: ``-step %s``
like: (an existing file name)
        Generate a nlxfm like this file.
        argument: ``-like %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:

output_file: (an existing file name)
        output file
output_grid: (an existing file name)
        output grid

Math

Link to code

Wraps the executable command mincmath.

Various mathematical operations supplied by mincmath.

Examples

>>> from nipype.interfaces.minc import Math
>>> from nipype.interfaces.minc.testdata import minc2Dfile

Scale: volume*3.0 + 2:

>>> scale = Math(input_files=[minc2Dfile], scale=(3.0, 2))
>>> scale.run() 

Test if >= 1.5:

>>> gt = Math(input_files=[minc2Dfile], test_gt=1.5)
>>> gt.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s) for calculation
        argument: ``%s``, position: -2
        mutually_exclusive: input_files, filelist
filelist: (a file name)
        Specify the name of a file containing input file names.
        argument: ``-filelist %s``
        mutually_exclusive: input_files, filelist

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
two: (a boolean)
        Create a MINC 2 output file.
        argument: ``-2``
copy_header: (a boolean)
        Copy all of the header from the first file (default for one file).
        argument: ``-copy_header``
        mutually_exclusive: copy_header, no_copy_header
no_copy_header: (a boolean)
        Do not copy all of the header from the first file (default for many
        files)).
        argument: ``-nocopy_header``
        mutually_exclusive: copy_header, no_copy_header
format_filetype: (a boolean)
        Use data type of first file (default).
        argument: ``-filetype``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_byte: (a boolean)
        Write out byte data.
        argument: ``-byte``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_short: (a boolean)
        Write out short integer data.
        argument: ``-short``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_int: (a boolean)
        Write out 32-bit integer data.
        argument: ``-int``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_long: (a boolean)
        Superseded by -int.
        argument: ``-long``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_float: (a boolean)
        Write out single-precision floating-point data.
        argument: ``-float``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_double: (a boolean)
        Write out double-precision floating-point data.
        argument: ``-double``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_signed: (a boolean)
        Write signed integer data.
        argument: ``-signed``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
format_unsigned: (a boolean)
        Write unsigned integer data (default).
        argument: ``-unsigned``
        mutually_exclusive: format_filetype, format_byte, format_short,
          format_int, format_long, format_float, format_double,
          format_signed, format_unsigned
voxel_range: (a tuple of the form: (an integer (int or long), an
          integer (int or long)))
        Valid range for output data.
        argument: ``-range %d %d``
max_buffer_size_in_kb: (a long integer >= 0, nipype default value:
          4096)
        Specify the maximum size of the internal buffers (in kbytes).
        argument: ``-max_buffer_size_in_kb %d``
check_dimensions: (a boolean)
        Check that dimension info matches across files (default).
        argument: ``-check_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
no_check_dimensions: (a boolean)
        Do not check dimension info.
        argument: ``-nocheck_dimensions``
        mutually_exclusive: check_dimensions, no_check_dimensions
dimension: (a unicode string)
        Specify a dimension along which we wish to perform a calculation.
        argument: ``-dimension %s``
ignore_nan: (a boolean)
        Ignore invalid data (NaN) for accumulations.
        argument: ``-ignore_nan``
propagate_nan: (a boolean)
        Invalid data in any file at a voxel produces a NaN (default).
        argument: ``-propagate_nan``
output_nan: (a boolean)
        Output NaN when an illegal operation is done (default).
        argument: ``-nan``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
output_zero: (a boolean)
        Output zero when an illegal operation is done.
        argument: ``-zero``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
output_illegal: (a boolean)
        Value to write out when an illegal operationis done. Default value:
        1.79769e+308
        argument: ``-illegal_value``
        mutually_exclusive: output_nan, output_zero, output_illegal_value
test_gt: (a boolean or a float)
        Test for vol1 > vol2 or vol1 > constant.
        argument: ``-gt``
test_lt: (a boolean or a float)
        Test for vol1 < vol2 or vol1 < constant.
        argument: ``-lt``
test_eq: (a boolean or a float)
        Test for integer vol1 == vol2 or vol1 == constant.
        argument: ``-eq``
test_ne: (a boolean or a float)
        Test for integer vol1 != vol2 or vol1 != const.
        argument: ``-ne``
test_ge: (a boolean or a float)
        Test for vol1 >= vol2 or vol1 >= const.
        argument: ``-ge``
test_le: (a boolean or a float)
        Test for vol1 <= vol2 or vol1 <= const.
        argument: ``-le``
calc_add: (a boolean or a float)
        Add N volumes or volume + constant.
        argument: ``-add``
calc_sub: (a boolean or a float)
        Subtract 2 volumes or volume - constant.
        argument: ``-sub``
calc_mul: (a boolean or a float)
        Multiply N volumes or volume * constant.
        argument: ``-mult``
calc_div: (a boolean or a float)
        Divide 2 volumes or volume / constant.
        argument: ``-div``
invert: (a float)
        Calculate 1/c.
        argument: ``-invert -const %s``
calc_not: (a boolean)
        Calculate !vol1.
        argument: ``-not``
sqrt: (a boolean)
        Take square root of a volume.
        argument: ``-sqrt``
square: (a boolean)
        Take square of a volume.
        argument: ``-square``
abs: (a boolean)
        Take absolute value of a volume.
        argument: ``-abs``
exp: (a tuple of the form: (a float, a float))
        Calculate c2*exp(c1*x). Both constants must be specified.
        argument: ``-exp -const2 %s %s``
log: (a tuple of the form: (a float, a float))
        Calculate log(x/c2)/c1. The constants c1 and c2 default to 1.
        argument: ``-log -const2 %s %s``
scale: (a tuple of the form: (a float, a float))
        Scale a volume: volume * c1 + c2.
        argument: ``-scale -const2 %s %s``
clamp: (a tuple of the form: (a float, a float))
        Clamp a volume to lie between two values.
        argument: ``-clamp -const2 %s %s``
segment: (a tuple of the form: (a float, a float))
        Segment a volume using range of -const2: within range = 1, outside
        range = 0.
        argument: ``-segment -const2 %s %s``
nsegment: (a tuple of the form: (a float, a float))
        Opposite of -segment: within range = 0, outside range = 1.
        argument: ``-nsegment -const2 %s %s``
isnan: (a boolean)
        Test for NaN values in vol1.
        argument: ``-isnan``
nisnan: (a boolean)
        Negation of -isnan.
        argument: ``-nisnan``
percentdiff: (a float)
        Percent difference between 2 volumes, thresholded (const def=0.0).
        argument: ``-percentdiff``
count_valid: (a boolean)
        Count the number of valid values in N volumes.
        argument: ``-count_valid``
maximum: (a boolean)
        Find maximum of N volumes.
        argument: ``-maximum``
minimum: (a boolean)
        Find minimum of N volumes.
        argument: ``-minimum``
calc_and: (a boolean)
        Calculate vol1 && vol2 (&& ...).
        argument: ``-and``
calc_or: (a boolean)
        Calculate vol1 || vol2 (|| ...).
        argument: ``-or``
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:

output_file: (an existing file name)
        output file

NlpFit

Link to code

Wraps the executable command nlpfit.

Hierarchial non-linear fitting with bluring.

This tool is part of the minc-widgets package:

https://github.com/BIC-MNI/minc-widgets/blob/master/nlpfit/nlpfit

Examples

>>> from nipype.interfaces.minc import NlpFit
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data, nlp_config
>>> from nipype.testing import example_data
>>> source = nonempty_minc_data(0)
>>> target = nonempty_minc_data(1)
>>> source_mask = nonempty_minc_data(2)
>>> config = nlp_config
>>> initial = example_data('minc_initial.xfm')
>>> nlpfit = NlpFit(config_file=config, init_xfm=initial, source_mask=source_mask, source=source, target=target)
>>> nlpfit.run() 

Inputs:

[Mandatory]
source: (an existing file name)
        source Minc file
        argument: ``%s``, position: -3
target: (an existing file name)
        target Minc file
        argument: ``%s``, position: -2
config_file: (an existing file name)
        File containing the fitting configuration use.
        argument: ``-config_file %s``
init_xfm: (an existing file name)
        Initial transformation (default identity).
        argument: ``-init_xfm %s``
source_mask: (an existing file name)
        Source mask to use during fitting.
        argument: ``-source_mask %s``

[Optional]
output_xfm: (a file name)
        output xfm file
        argument: ``%s``, position: -1
input_grid_files: (a list of items which are a file name)
        input grid file(s)
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
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:

output_xfm: (an existing file name)
        output xfm file
output_grid: (an existing file name)
        output grid file

Norm

Link to code

Wraps the executable command mincnorm.

Normalise a file between a max and minimum (possibly)
using two histogram pct’s.

Examples

>>> from nipype.interfaces.minc import Norm
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> n = Norm(input_file=minc2Dfile, output_file='/tmp/out.mnc') # Normalise the file.
>>> n.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to normalise
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
output_threshold_mask: (a file name)
        File in which to store the threshold mask.
        argument: ``-threshold_mask %s``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
mask: (a file name)
        Calculate the image normalisation within a mask.
        argument: ``-mask %s``
clamp: (a boolean, nipype default value: True)
        Force the ouput range between limits [default].
        argument: ``-clamp``
cutoff: (0.0 <= a floating point number <= 100.0)
        Cutoff value to use to calculate thresholds by a histogram PcT in %.
        [default: 0.01]
        argument: ``-cutoff %s``
lower: (a float)
        Lower real value to use.
        argument: ``-lower %s``
upper: (a float)
        Upper real value to use.
        argument: ``-upper %s``
out_floor: (a float)
        Output files maximum [default: 0]
        argument: ``-out_floor %s``
out_ceil: (a float)
        Output files minimum [default: 100]
        argument: ``-out_ceil %s``
threshold: (a boolean)
        Threshold the image (set values below threshold_perc to -out_floor).
        argument: ``-threshold``
threshold_perc: (0.0 <= a floating point number <= 100.0)
        Threshold percentage (0.1 == lower 10% of intensity range) [default:
        0.1].
        argument: ``-threshold_perc %s``
threshold_bmt: (a boolean)
        Use the resulting image BiModalT as the threshold.
        argument: ``-threshold_bmt``
threshold_blur: (a float)
        Blur FWHM for intensity edges then thresholding [default: 2].
        argument: ``-threshold_blur %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:

output_file: (an existing file name)
        output file
output_threshold_mask: (a file name)
        threshold mask file

Pik

Link to code

Wraps the executable command mincpik.

Generate images from minc files.

Mincpik uses Imagemagick to generate images from Minc files.

Examples

>>> from nipype.interfaces.minc import Pik
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> file0 = nonempty_minc_data(0)
>>> pik = Pik(input_file=file0, title='foo')
>>> pik .run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2

[Optional]
jpg: (a boolean)
        Output a jpg file.
        mutually_exclusive: jpg, png
png: (a boolean)
        Output a png file (default).
        mutually_exclusive: jpg, png
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
scale: (an integer (int or long), nipype default value: 2)
        Scaling factor for resulting image. By default images areoutput at
        twice their original resolution.
        argument: ``--scale %s``
width: (an integer (int or long))
        Autoscale the resulting image to have a fixed image width (in
        pixels).
        argument: ``--width %s``
depth: (8 or 16)
        Bitdepth for resulting image 8 or 16 (MSB machines only!)
        argument: ``--depth %s``
title: (a boolean or a unicode string)
        argument: ``%s``
title_size: (an integer (int or long))
        Font point size for the title.
        argument: ``--title_size %s``
        requires: title
annotated_bar: (a boolean)
        create an annotated bar to match the image (use height of the output
        image)
        argument: ``--anot_bar``
minc_range: (a tuple of the form: (a float, a float))
        Valid range of values for MINC file.
        argument: ``--range %s %s``
image_range: (a tuple of the form: (a float, a float))
        Range of image values to use for pixel intensity.
        argument: ``--image_range %s %s``
        mutually_exclusive: image_range, auto_range
auto_range: (a boolean)
        Automatically determine image range using a 5 and 95% PcT.
        (histogram)
        argument: ``--auto_range``
        mutually_exclusive: image_range, auto_range
start: (an integer (int or long))
        Slice number to get. (note this is in voxel co-ordinates).
        argument: ``--slice %s``
slice_z: (a boolean)
        Get an axial/transverse (z) slice.
        argument: ``-z``
        mutually_exclusive: slice_z, slice_y, slice_x
slice_y: (a boolean)
        Get a coronal (y) slice.
        argument: ``-y``
        mutually_exclusive: slice_z, slice_y, slice_x
slice_x: (a boolean)
        Get a sagittal (x) slice.
        argument: ``-x``
        mutually_exclusive: slice_z, slice_y, slice_x
triplanar: (a boolean)
        Create a triplanar view of the input file.
        argument: ``--triplanar``
tile_size: (an integer (int or long))
        Pixel size for each image in a triplanar.
        argument: ``--tilesize %s``
sagittal_offset: (an integer (int or long))
        Offset the sagittal slice from the centre.
        argument: ``--sagittal_offset %s``
sagittal_offset_perc: (0 <= a long integer <= 100)
        Offset the sagittal slice by a percentage from the centre.
        argument: ``--sagittal_offset_perc %d``
vertical_triplanar_view: (a boolean)
        Create a vertical triplanar view (Default).
        argument: ``--vertical``
        mutually_exclusive: vertical_triplanar_view,
          horizontal_triplanar_view
horizontal_triplanar_view: (a boolean)
        Create a horizontal triplanar view.
        argument: ``--horizontal``
        mutually_exclusive: vertical_triplanar_view,
          horizontal_triplanar_view
lookup: (a unicode string)
        Arguments to pass to minclookup
        argument: ``--lookup %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:

output_file: (an existing file name)
        output image

Resample

Link to code

Wraps the executable command mincresample.

Resample a minc file.’

Examples

>>> from nipype.interfaces.minc import Resample
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> r = Resample(input_file=minc2Dfile, output_file='/tmp/out.mnc') # Resample the file.
>>> r.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file for resampling
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
input_grid_files: (a list of items which are a file name)
        input grid file(s)
two: (a boolean)
        Create a MINC 2 output file.
        argument: ``-2``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
trilinear_interpolation: (a boolean)
        Do trilinear interpolation.
        argument: ``-trilinear``
        mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
          nearest_neighbour_interpolation, sinc_interpolation
tricubic_interpolation: (a boolean)
        Do tricubic interpolation.
        argument: ``-tricubic``
        mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
          nearest_neighbour_interpolation, sinc_interpolation
nearest_neighbour_interpolation: (a boolean)
        Do nearest neighbour interpolation.
        argument: ``-nearest_neighbour``
        mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
          nearest_neighbour_interpolation, sinc_interpolation
sinc_interpolation: (a boolean)
        Do windowed sinc interpolation.
        argument: ``-sinc``
        mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
          nearest_neighbour_interpolation, sinc_interpolation
half_width_sinc_window: (5 or 1 or 2 or 3 or 4 or 6 or 7 or 8 or 9 or
          10)
        Set half-width of sinc window (1-10). Default value: 5.
        argument: ``-width %s``
        requires: sinc_interpolation
sinc_window_hanning: (a boolean)
        Set sinc window type to Hanning.
        argument: ``-hanning``
        mutually_exclusive: sinc_window_hanning, sinc_window_hamming
        requires: sinc_interpolation
sinc_window_hamming: (a boolean)
        Set sinc window type to Hamming.
        argument: ``-hamming``
        mutually_exclusive: sinc_window_hanning, sinc_window_hamming
        requires: sinc_interpolation
transformation: (a file name)
        File giving world transformation. (Default = identity).
        argument: ``-transformation %s``
invert_transformation: (a boolean)
        Invert the transformation before using it.
        argument: ``-invert_transformation``
vio_transform: (a boolean)
        VIO_Transform the input sampling with the transform (default).
        argument: ``-tfm_input_sampling``
        mutually_exclusive: vio_transform, no_input_sampling
no_input_sampling: (a boolean)
        Use the input sampling without transforming (old behaviour).
        argument: ``-use_input_sampling``
        mutually_exclusive: vio_transform, no_input_sampling
like: (a file name)
        Specifies a model file for the resampling.
        argument: ``-like %s``
format_byte: (a boolean)
        Write out byte data.
        argument: ``-byte``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_short: (a boolean)
        Write out short integer data.
        argument: ``-short``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_int: (a boolean)
        Write out 32-bit integer data.
        argument: ``-int``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_long: (a boolean)
        Superseded by -int.
        argument: ``-long``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_float: (a boolean)
        Write out single-precision floating-point data.
        argument: ``-float``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_double: (a boolean)
        Write out double-precision floating-point data.
        argument: ``-double``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_signed: (a boolean)
        Write signed integer data.
        argument: ``-signed``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
format_unsigned: (a boolean)
        Write unsigned integer data (default).
        argument: ``-unsigned``
        mutually_exclusive: format_byte, format_short, format_int,
          format_long, format_float, format_double, format_signed,
          format_unsigned
output_range: (a tuple of the form: (a float, a float))
        Valid range for output data. Default value: -1.79769e+308
        -1.79769e+308.
        argument: ``-range %s %s``
transverse_slices: (a boolean)
        Write out transverse slices.
        argument: ``-transverse``
        mutually_exclusive: transverse, sagittal, coronal
sagittal_slices: (a boolean)
        Write out sagittal slices
        argument: ``-sagittal``
        mutually_exclusive: transverse, sagittal, coronal
coronal_slices: (a boolean)
        Write out coronal slices
        argument: ``-coronal``
        mutually_exclusive: transverse, sagittal, coronal
no_fill: (a boolean)
        Use value zero for points outside of input volume.
        argument: ``-nofill``
        mutually_exclusive: nofill, fill
fill: (a boolean)
        Use a fill value for points outside of input volume.
        argument: ``-fill``
        mutually_exclusive: nofill, fill
fill_value: (a float)
        Specify a fill value for points outside of input volume.Default
        value: 1.79769e+308.
        argument: ``-fillvalue %s``
        requires: fill
keep_real_range: (a boolean)
        Keep the real scale of the input volume.
        argument: ``-keep_real_range``
        mutually_exclusive: keep_real_range, nokeep_real_range
nokeep_real_range: (a boolean)
        Do not keep the real scale of the data (default).
        argument: ``-nokeep_real_range``
        mutually_exclusive: keep_real_range, nokeep_real_range
spacetype: (a unicode string)
        Set the spacetype attribute to a specified string.
        argument: ``-spacetype %s``
talairach: (a boolean)
        Output is in Talairach space.
        argument: ``-talairach``
origin: (a tuple of the form: (a float, a float, a float))
        Origin of first pixel in 3D space.Default value: 1.79769e+308
        1.79769e+308 1.79769e+308.
        argument: ``-origin %s %s %s``
standard_sampling: (a boolean)
        Set the sampling to standard values (step, start and dircos).
        argument: ``-standard_sampling``
units: (a unicode string)
        Specify the units of the output sampling.
        argument: ``-units %s``
nelements: (a tuple of the form: (an integer (int or long), an
          integer (int or long), an integer (int or long)))
        Number of elements along each dimension (X, Y, Z).
        argument: ``-nelements %s %s %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
xnelements: (an integer (int or long))
        Number of elements along the X dimension.
        argument: ``-xnelements %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
        requires: ynelements, znelements
ynelements: (an integer (int or long))
        Number of elements along the Y dimension.
        argument: ``-ynelements %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
        requires: xnelements, znelements
znelements: (an integer (int or long))
        Number of elements along the Z dimension.
        argument: ``-znelements %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
        requires: xnelements, ynelements
step: (a tuple of the form: (an integer (int or long), an integer
          (int or long), an integer (int or long)))
        Step size along each dimension (X, Y, Z). Default value: (0, 0, 0).
        argument: ``-step %s %s %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
xstep: (an integer (int or long))
        Step size along the X dimension. Default value: 0.
        argument: ``-xstep %s``
        mutually_exclusive: step, step_x_y_or_z
        requires: ystep, zstep
ystep: (an integer (int or long))
        Step size along the Y dimension. Default value: 0.
        argument: ``-ystep %s``
        mutually_exclusive: step, step_x_y_or_z
        requires: xstep, zstep
zstep: (an integer (int or long))
        Step size along the Z dimension. Default value: 0.
        argument: ``-zstep %s``
        mutually_exclusive: step, step_x_y_or_z
        requires: xstep, ystep
start: (a tuple of the form: (a float, a float, a float))
        Start point along each dimension (X, Y, Z).Default value:
        1.79769e+308 1.79769e+308 1.79769e+308.
        argument: ``-start %s %s %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
xstart: (a float)
        Start point along the X dimension. Default value: 1.79769e+308.
        argument: ``-xstart %s``
        mutually_exclusive: start, start_x_y_or_z
        requires: ystart, zstart
ystart: (a float)
        Start point along the Y dimension. Default value: 1.79769e+308.
        argument: ``-ystart %s``
        mutually_exclusive: start, start_x_y_or_z
        requires: xstart, zstart
zstart: (a float)
        Start point along the Z dimension. Default value: 1.79769e+308.
        argument: ``-zstart %s``
        mutually_exclusive: start, start_x_y_or_z
        requires: xstart, ystart
dircos: (a tuple of the form: (a float, a float, a float))
        Direction cosines along each dimension (X, Y, Z). Default
        value:1.79769e+308 1.79769e+308 1.79769e+308 1.79769e+308 ...
        1.79769e+308 1.79769e+308 1.79769e+308 1.79769e+308 1.79769e+308.
        argument: ``-dircos %s %s %s``
        mutually_exclusive: nelements, nelements_x_y_or_z
xdircos: (a float)
        Direction cosines along the X dimension.Default value: 1.79769e+308
        1.79769e+308 1.79769e+308.
        argument: ``-xdircos %s``
        mutually_exclusive: dircos, dircos_x_y_or_z
        requires: ydircos, zdircos
ydircos: (a float)
        Direction cosines along the Y dimension.Default value: 1.79769e+308
        1.79769e+308 1.79769e+308.
        argument: ``-ydircos %s``
        mutually_exclusive: dircos, dircos_x_y_or_z
        requires: xdircos, zdircos
zdircos: (a float)
        Direction cosines along the Z dimension.Default value: 1.79769e+308
        1.79769e+308 1.79769e+308.
        argument: ``-zdircos %s``
        mutually_exclusive: dircos, dircos_x_y_or_z
        requires: xdircos, ydircos
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:

output_file: (an existing file name)
        output file

Reshape

Link to code

Wraps the executable command mincreshape.

Cut a hyperslab out of a minc file, with dimension reordering.

This is also useful for rewriting with a different format, for example converting to short (see example below).

Examples

>>> from nipype.interfaces.minc import Reshape
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> input_file = nonempty_minc_data(0)
>>> reshape_to_short = Reshape(input_file=input_file, write_short=True)
>>> reshape_to_short.run() 

Inputs:

[Mandatory]
input_file: (a file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
write_short: (a boolean)
        Convert to short integer data.
        argument: ``-short``
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:

output_file: (an existing file name)
        output file

ToEcat

Link to code

Wraps the executable command minctoecat.

Convert a 2D image, a 3D volumes or a 4D dynamic volumes written in MINC file format to a 2D, 3D or 4D Ecat7 file.

Examples

>>> from nipype.interfaces.minc import ToEcat
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> c = ToEcat(input_file=minc2Dfile)
>>> c.run() 
>>> c = ToEcat(input_file=minc2Dfile, voxels_as_integers=True)
>>> c.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to convert
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
ignore_patient_variable: (a boolean)
        Ignore informations from the minc patient variable.
        argument: ``-ignore_patient_variable``
ignore_study_variable: (a boolean)
        Ignore informations from the minc study variable.
        argument: ``-ignore_study_variable``
ignore_acquisition_variable: (a boolean)
        Ignore informations from the minc acquisition variable.
        argument: ``-ignore_acquisition_variable``
ignore_ecat_acquisition_variable: (a boolean)
        Ignore informations from the minc ecat_acquisition variable.
        argument: ``-ignore_ecat_acquisition_variable``
ignore_ecat_main: (a boolean)
        Ignore informations from the minc ecat-main variable.
        argument: ``-ignore_ecat_main``
ignore_ecat_subheader_variable: (a boolean)
        Ignore informations from the minc ecat-subhdr variable.
        argument: ``-ignore_ecat_subheader_variable``
no_decay_corr_fctr: (a boolean)
        Do not compute the decay correction factors
        argument: ``-no_decay_corr_fctr``
voxels_as_integers: (a boolean)
        Voxel values are treated as integers, scale andcalibration factors
        are set to unity
        argument: ``-label``
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:

output_file: (an existing file name)
        output file

ToRaw

Link to code

Wraps the executable command minctoraw.

Dump a chunk of MINC file data. This program is largely superceded by mincextract (see Extract).

Examples

>>> from nipype.interfaces.minc import ToRaw
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> toraw = ToRaw(input_file=minc2Dfile)
>>> toraw.run() 
>>> toraw = ToRaw(input_file=minc2Dfile, write_range=(0, 100))
>>> toraw.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
write_byte: (a boolean)
        Write out data as bytes.
        argument: ``-byte``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_short: (a boolean)
        Write out data as short integers.
        argument: ``-short``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_int: (a boolean)
        Write out data as 32-bit integers.
        argument: ``-int``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_long: (a boolean)
        Superseded by write_int.
        argument: ``-long``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_float: (a boolean)
        Write out data as single precision floating-point values.
        argument: ``-float``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_double: (a boolean)
        Write out data as double precision floating-point values.
        argument: ``-double``
        mutually_exclusive: write_byte, write_short, write_int, write_long,
          write_float, write_double
write_signed: (a boolean)
        Write out signed data.
        argument: ``-signed``
        mutually_exclusive: write_signed, write_unsigned
write_unsigned: (a boolean)
        Write out unsigned data.
        argument: ``-unsigned``
        mutually_exclusive: write_signed, write_unsigned
write_range: (a tuple of the form: (a float, a float))
        Specify the range of output values.Default value: 1.79769e+308
        1.79769e+308.
        argument: ``-range %s %s``
normalize: (a boolean)
        Normalize integer pixel values to file max and min.
        argument: ``-normalize``
        mutually_exclusive: normalize, nonormalize
nonormalize: (a boolean)
        Turn off pixel normalization.
        argument: ``-nonormalize``
        mutually_exclusive: normalize, nonormalize
out_file: (a file name)
        argument: ``> %s``, position: -1
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:

output_file: (an existing file name)
        output file in raw format

VolSymm

Link to code

Wraps the executable command volsymm.

Make a volume symmetric about an axis either linearly and/or nonlinearly. This is done by registering a volume to a flipped image of itself.

This tool is part of the minc-widgets package:

https://github.com/BIC-MNI/minc-widgets/blob/master/volsymm/volsymm

Examples

>>> from nipype.interfaces.minc import VolSymm
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data
>>> input_file = nonempty_minc_data(0)
>>> volsymm = VolSymm(input_file=input_file)
>>> volsymm.run() 

Inputs:

[Mandatory]
input_file: (a file name)
        input file
        argument: ``%s``, position: -3

[Optional]
trans_file: (a file name)
        output xfm trans file
        argument: ``%s``, position: -2
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
input_grid_files: (a list of items which are a file name)
        input grid file(s)
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
fit_linear: (a boolean)
        Fit using a linear xfm.
        argument: ``-linear``
fit_nonlinear: (a boolean)
        Fit using a non-linear xfm.
        argument: ``-nonlinear``
nofit: (a boolean)
        Use the input transformation instead of generating one.
        argument: ``-nofit``
config_file: (an existing file name)
        File containing the fitting configuration (nlpfit -help for info).
        argument: ``-config_file %s``
x: (a boolean)
        Flip volume in x-plane (default).
        argument: ``-x``
y: (a boolean)
        Flip volume in y-plane.
        argument: ``-y``
z: (a boolean)
        Flip volume in z-plane.
        argument: ``-z``
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:

output_file: (an existing file name)
        output file
trans_file: (an existing file name)
        xfm trans file
output_grid: (an existing file name)
        output grid file

Volcentre

Link to code

Wraps the executable command volcentre.

Centre a MINC image’s sampling about a point, typically (0,0,0).

Example

>>> from nipype.interfaces.minc import Volcentre
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> vc = Volcentre(input_file=minc2Dfile)
>>> vc.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to centre
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
com: (a boolean)
        Use the CoM of the volume for the new centre (via mincstats).
        Default: False
        argument: ``-com``
centre: (a tuple of the form: (a float, a float, a float))
        Centre to use (x,y,z) [default: 0 0 0].
        argument: ``-centre %s %s %s``
zero_dircos: (a boolean)
        Set the direction cosines to identity [default].
        argument: ``-zero_dircos``
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:

output_file: (an existing file name)
        output file

Voliso

Link to code

Wraps the executable command voliso.

Changes the steps and starts in order that the output volume has isotropic sampling.

Examples

>>> from nipype.interfaces.minc import Voliso
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> viso = Voliso(input_file=minc2Dfile, minstep=0.1, avgstep=True)
>>> viso.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to convert to isotropic sampling
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``--verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``--clobber``
maxstep: (a float)
        The target maximum step desired in the output volume.
        argument: ``--maxstep %s``
minstep: (a float)
        The target minimum step desired in the output volume.
        argument: ``--minstep %s``
avgstep: (a boolean)
        Calculate the maximum step from the average steps of the input
        volume.
        argument: ``--avgstep``
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:

output_file: (an existing file name)
        output file

Volpad

Link to code

Wraps the executable command volpad.

Centre a MINC image’s sampling about a point, typically (0,0,0).

Examples

>>> from nipype.interfaces.minc import Volpad
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> vp = Volpad(input_file=minc2Dfile, smooth=True, smooth_distance=4)
>>> vp.run() 

Inputs:

[Mandatory]
input_file: (an existing file name)
        input file to centre
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
auto: (a boolean)
        Automatically determine padding distances (uses -distance as max).
        Default: False.
        argument: ``-auto``
auto_freq: (a float)
        Frequency of voxels over bimodalt threshold to stop at [default:
        500].
        argument: ``-auto_freq %s``
distance: (an integer (int or long))
        Padding distance (in voxels) [default: 4].
        argument: ``-distance %s``
smooth: (a boolean)
        Smooth (blur) edges before padding. Default: False.
        argument: ``-smooth``
smooth_distance: (an integer (int or long))
        Smoothing distance (in voxels) [default: 4].
        argument: ``-smooth_distance %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:

output_file: (an existing file name)
        output file

XfmAvg

Link to code

Wraps the executable command xfmavg.

Average a number of xfm transforms using matrix logs and exponents. The program xfmavg calls Octave for numerical work.

This tool is part of the minc-widgets package:

https://github.com/BIC-MNI/minc-widgets/tree/master/xfmavg

Examples

>>> from nipype.interfaces.minc import XfmAvg
>>> from nipype.interfaces.minc.testdata import nonempty_minc_data, nlp_config
>>> from nipype.testing import example_data
>>> xfm1 = example_data('minc_initial.xfm')
>>> xfm2 = example_data('minc_initial.xfm')  # cheating for doctest
>>> xfmavg = XfmAvg(input_files=[xfm1, xfm2])
>>> xfmavg.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s)
        argument: ``%s``, position: -2

[Optional]
input_grid_files: (a list of items which are a file name)
        input grid file(s)
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
avg_linear: (a boolean)
        average the linear part [default].
        argument: ``-avg_linear``
avg_nonlinear: (a boolean)
        average the non-linear part [default].
        argument: ``-avg_nonlinear``
ignore_linear: (a boolean)
        opposite of -avg_linear.
        argument: ``-ignore_linear``
ignore_nonlinear: (a boolean)
        opposite of -avg_nonlinear.
        argument: ``-ignore_nonline``
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:

output_file: (an existing file name)
        output file
output_grid: (an existing file name)
        output grid file

XfmConcat

Link to code

Wraps the executable command xfmconcat.

Concatenate transforms together. The output transformation is equivalent to applying input1.xfm, then input2.xfm, …, in that order.

Examples

>>> from nipype.interfaces.minc import XfmConcat
>>> from nipype.interfaces.minc.testdata import minc2Dfile
>>> conc = XfmConcat(input_files=['input1.xfm', 'input1.xfm'])
>>> conc.run() 

Inputs:

[Mandatory]
input_files: (a list of items which are a file name)
        input file(s)
        argument: ``%s``, position: -2

[Optional]
input_grid_files: (a list of items which are a file name)
        input grid file(s)
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
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:

output_file: (an existing file name)
        output file
output_grids: (a list of items which are an existing file name)
        output grids

XfmInvert

Link to code

Wraps the executable command xfminvert.

Invert an xfm transform file.

Examples

>>> from nipype.interfaces.minc import XfmAvg
>>> from nipype.testing import example_data
>>> xfm = example_data('minc_initial.xfm')
>>> invert = XfmInvert(input_file=xfm)
>>> invert.run() 

Inputs:

[Mandatory]
input_file: (a file name)
        input file
        argument: ``%s``, position: -2

[Optional]
output_file: (a file name)
        output file
        argument: ``%s``, position: -1
verbose: (a boolean)
        Print out log messages. Default: False.
        argument: ``-verbose``
clobber: (a boolean, nipype default value: True)
        Overwrite existing file.
        argument: ``-clobber``
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:

output_file: (an existing file name)
        output file
output_grid: (an existing file name)
        output grid file