interfaces.minc.minc¶
Average¶
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]
filelist: (a file name)
Specify the name of a file containing input file names.
argument: ``-filelist %s``
mutually_exclusive: input_files, filelist
input_files: (a list of items which are a file name)
input file(s)
argument: ``%s``, position: -2
mutually_exclusive: input_files, filelist
[Optional]
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
verbose: (a boolean)
Print out log messages (default).
argument: ``-verbose``
mutually_exclusive: verbose, quiet
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``
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
normalize: (a boolean)
Normalize data sets for mean intensity.
argument: ``-normalize``
mutually_exclusive: normalize, nonormalize
output_file: (a file name)
output file
argument: ``%s``, position: -1
two: (a boolean)
Create a MINC 2 output file.
argument: ``-2``
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
check_dimensions: (a boolean)
Check that dimension info matches across files (default).
argument: ``-check_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
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_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
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
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
sdfile: (a file name)
Specify an output sd file (default=none).
argument: ``-sdfile %s``
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
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
max_buffer_size_in_kb: (an integer >= 0, nipype default value: 4096)
Specify the maximum size of the internal buffers (in kbytes).
argument: ``-max_buffer_size_in_kb %d``
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
width_weighted: (a boolean)
Weight by dimension widths when -avgdim is used.
argument: ``-width_weighted``
requires: avgdim
no_check_dimensions: (a boolean)
Do not check dimension info.
argument: ``-nocheck_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
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
avgdim: (a unicode string)
Specify a dimension along which we wish to average.
argument: ``-avgdim %s``
quiet: (a boolean)
Do not print out log messages.
argument: ``-quiet``
mutually_exclusive: verbose, quiet
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
binarize: (a boolean)
Binarize the volume by looking for values in a given range.
argument: ``-binarize``
weights: (a list of items which are a unicode string)
Specify weights for averaging ("<w1>,<w2>,...").
argument: ``-weights %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
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``
debug: (a boolean)
Print out debugging messages.
argument: ``-debug``
binvalue: (a float)
Specify a target value (+/- 0.5) forbinarization. Default value:
-1.79769e+308
argument: ``-binvalue %s``
nonormalize: (a boolean)
Do not normalize data sets (default).
argument: ``-nonormalize``
mutually_exclusive: normalize, nonormalize
Outputs:
output_file: (an existing file name)
output file
BBox¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
out_file: (a file name)
argument: ``> %s``, position: -1
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
format_mincresample: (a boolean)
Output format for mincresample: (-step x y z -start x y z -nelements
x y z
argument: ``-mincresample``
output_file: (a file name)
output file containing bounding box corners
format_mincreshape: (a boolean)
Output format for mincreshape: (-start x,y,z -count dx,dy,dz
argument: ``-mincreshape``
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
format_minccrop: (a boolean)
Output format for minccrop: (-xlim x1 x2 -ylim y1 y2 -zlim z1 z2
argument: ``-minccrop``
threshold: (an integer (int or long))
VIO_Real value threshold for bounding box. Default value: 0.
argument: ``-threshold``
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
Outputs:
output_file: (an existing file name)
output file containing bounding box corners
Beast¶
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]
output_file: (a file name)
output file
argument: ``%s``, position: -1
same_resolution: (a boolean)
Output final mask with the same resolution as input file.
argument: ``-same_resolution``
number_selected_images: (an integer (int or long), nipype default
value: 20)
Specify number of selected images. Default value: 20
argument: ``-selection_num %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``
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``
load_moments: (a boolean)
Do not calculate moments instead use precalculatedlibrary moments.
(for optimization purposes)
argument: ``-load_moments``
configuration_file: (a file name)
Specify configuration file.
argument: ``-configuration %s``
probability_map: (a boolean)
Output the probability map instead of crisp mask.
argument: ``-probability``
nlm_filter: (a boolean)
Apply an NLM filter on the probability map (experimental).
argument: ``-nlm_filter``
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``
threshold_patch_selection: (a float, nipype default value: 0.95)
Specify threshold for patch selection. Default value: 0.95
argument: ``-threshold %s``
abspath: (a boolean, nipype default value: True)
File paths in the library are absolute (default is relative to
library root).
argument: ``-abspath``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
smoothness_factor_beta: (a float, nipype default value: 0.5)
Specify smoothness factor Beta. Default value: 0.25
argument: ``-beta %s``
fill_holes: (a boolean)
Fill holes in the binary output.
argument: ``-fill``
flip_images: (a boolean)
Flip images around the mid-sagittal plane to increase patch count.
argument: ``-flip``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
median_filter: (a boolean)
Apply a median filter on the probability map.
argument: ``-median``
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
confidence_level_alpha: (a float, nipype default value: 0.5)
Specify confidence level Alpha. Default value: 0.5
argument: ``-alpha %s``
Outputs:
output_file: (an existing file name)
output mask file
BestLinReg¶
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_mnc: (a file name)
output mnc file
argument: ``%s``, position: -1
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_xfm: (a file name)
output xfm file
argument: ``%s``, position: -2
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
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
Outputs:
output_xfm: (an existing file name)
output xfm file
output_mnc: (an existing file name)
output mnc file
BigAverage¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``--verbose``
output_file: (a file name)
output file
argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``--clobber``
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
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``
sd_file: (a file name)
Place standard deviation image in specified file.
argument: ``--sdfile %s``
tmpdir: (a directory name)
temporary files directory
argument: ``-tmpdir %s``
Outputs:
output_file: (an existing file name)
output file
sd_file: (an existing file name)
standard deviation image
Blob¶
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]
determinant: (a boolean)
compute the determinant (exact growth and shrinkage) -- SLOW
argument: ``-determinant``
output_file: (a file name)
output file
argument: ``%s``, position: -1
trace: (a boolean)
compute the trace (approximate growth and shrinkage) -- FAST
argument: ``-trace``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
magnitude: (a boolean)
compute the magnitude of the displacement vector
argument: ``-magnitude``
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
translation: (a boolean)
compute translation (structure displacement)
argument: ``-translation``
Outputs:
output_file: (an existing file name)
output file
Blur¶
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.
- 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]
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
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
input_file: (an existing file name)
input file
argument: ``%s``, position: -2
[Optional]
output_file_base: (a file name)
output file base
argument: ``%s``, position: -1
partial: (a boolean)
Create the partial derivative and gradient magnitude volumes as
well.
argument: ``-partial``
dimensions: (3 or 1 or 2)
Number of dimensions to blur (either 1,2 or 3). Default value: 3.
argument: ``-dimensions %s``
gradient: (a boolean)
Create the gradient magnitude volume as well.
argument: ``-gradient``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
gaussian: (a boolean)
Use a gaussian smoothing kernel (default).
argument: ``-gaussian``
mutually_exclusive: gaussian, rect
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
no_apodize: (a boolean)
Do not apodize the data before blurring.
argument: ``-no_apodize``
rect: (a boolean)
Use a rect (box) smoothing kernel.
argument: ``-rect``
mutually_exclusive: gaussian, rect
Outputs:
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.
output_file: (an existing file name)
Blurred output file.
gradient_dxyz: (a file name)
Gradient dxyz.
Calc¶
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]
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
filelist: (a file name)
Specify the name of a file containing input file names.
argument: ``-filelist %s``
mutually_exclusive: input_files, filelist
input_files: (a list of items which are a file name)
input file(s) for calculation
argument: ``%s``, position: -2
[Optional]
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
verbose: (a boolean)
Print out log messages (default).
argument: ``-verbose``
mutually_exclusive: verbose, quiet
output_zero: (a boolean)
Output zero when an illegal operation is done.
argument: ``-zero``
mutually_exclusive: output_nan, output_zero, output_illegal_value
output_nan: (a boolean)
Output NaN when an illegal operation is done (default).
argument: ``-nan``
mutually_exclusive: output_nan, output_zero, output_illegal_value
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
propagate_nan: (a boolean)
Invalid data in any file at a voxel produces a NaN (default).
argument: ``-propagate_nan``
output_file: (a file name)
output file
argument: ``%s``, position: -1
two: (a boolean)
Create a MINC 2 output file.
argument: ``-2``
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
check_dimensions: (a boolean)
Check that files have matching dimensions (default).
argument: ``-check_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
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_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
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
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
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
ignore_nan: (a boolean)
Ignore invalid data (NaN) for accumulations.
argument: ``-ignore_nan``
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
no_check_dimensions: (a boolean)
Do not check that files have matching dimensions.
argument: ``-nocheck_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
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
quiet: (a boolean)
Do not print out log messages.
argument: ``-quiet``
mutually_exclusive: verbose, quiet
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
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
copy_header: (a boolean)
Copy all of the header from the first file.
argument: ``-copy_header``
mutually_exclusive: copy_header, no_copy_header
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``
debug: (a boolean)
Print out debugging messages.
argument: ``-debug``
outfiles: (a list of items which are a tuple of the form: (a unicode
string, a file name))
max_buffer_size_in_kb: (an integer >= 0)
Specify the maximum size of the internal buffers (in kbytes).
argument: ``-max_buffer_size_in_kb %d``
eval_width: (an integer (int or long))
Number of voxels to evaluate simultaneously.
argument: ``-eval_width %s``
Outputs:
output_file: (an existing file name)
output file
Convert¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
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: (an integer >= 0)
Set the target block size for chunking (0 default, >1 block size).
argument: ``-chunk %d``
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``
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
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``
Outputs:
output_file: (an existing file name)
output file
Copy¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
output_file: (a file name)
output file
argument: ``%s``, position: -1
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
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
Outputs:
output_file: (an existing file name)
output file
Dump¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
out_file: (a file name)
argument: ``> %s``, position: -1
annotations_full: (u'c' or u'f')
Full annotations for C or Fortran indices in data.
argument: ``-f %s``
mutually_exclusive: annotations_brief, annotations_full
header_data: (a boolean)
Header information only, no data.
argument: ``-h``
mutually_exclusive: coordinate_data, header_data
variables: (a list of items which are a unicode string)
Output data for specified variables only.
argument: ``-v %s``
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``
coordinate_data: (a boolean)
Coordinate variable data and header information.
argument: ``-c``
mutually_exclusive: coordinate_data, header_data
output_file: (a file name)
output file
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
annotations_brief: (u'c' or u'f')
Brief annotations for C or Fortran indices in data.
argument: ``-b %s``
mutually_exclusive: annotations_brief, annotations_full
line_length: (an integer >= 0)
Line length maximum in data section (default 80).
argument: ``-l %d``
Outputs:
output_file: (an existing file name)
output file
Extract¶
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]
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
output_file: (a file name)
output file
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
out_file: (a file name)
argument: ``> %s``, position: -1
image_maximum: (a float)
Specify the maximum real image value for normalization.Default
value: 1.79769e+308.
argument: ``-image_maximum %s``
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
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
nonormalize: (a boolean)
Turn off pixel normalization.
argument: ``-nonormalize``
mutually_exclusive: normalize, nonormalize
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
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``
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
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_unsigned: (a boolean)
Write out unsigned data.
argument: ``-unsigned``
mutually_exclusive: write_signed, write_unsigned
start: (a list of items which are an integer (int or long))
Specifies corner of hyperslab (C conventions for indices).
argument: ``-start %s``
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
normalize: (a boolean)
Normalize integer pixel values to file max and min.
argument: ``-normalize``
mutually_exclusive: normalize, nonormalize
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
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
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
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_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
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_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
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
count: (a list of items which are an integer (int or long))
Specifies edge lengths of hyperslab to read.
argument: ``-count %s``
image_minimum: (a float)
Specify the minimum real image value for normalization.Default
value: 1.79769e+308.
argument: ``-image_minimum %s``
write_signed: (a boolean)
Write out signed data.
argument: ``-signed``
mutually_exclusive: write_signed, write_unsigned
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
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
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
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_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
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``
Outputs:
output_file: (an existing file name)
output file in raw/text format
Gennlxfm¶
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]
ident: (a boolean)
Generate an identity xfm. Default: False.
argument: ``-ident``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
step: (an integer (int or long))
Output ident xfm step [default: 1].
argument: ``-step %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
like: (an existing file name)
Generate a nlxfm like this file.
argument: ``-like %s``
Outputs:
output_grid: (an existing file name)
output grid
output_file: (an existing file name)
output file
Math¶
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]
filelist: (a file name)
Specify the name of a file containing input file names.
argument: ``-filelist %s``
mutually_exclusive: input_files, filelist
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
[Optional]
clamp: (a tuple of the form: (a float, a float))
Clamp a volume to lie between two values.
argument: ``-clamp -const2 %s %s``
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
square: (a boolean)
Take square of a volume.
argument: ``-square``
output_zero: (a boolean)
Output zero when an illegal operation is done.
argument: ``-zero``
mutually_exclusive: output_nan, output_zero, output_illegal_value
dimension: (a unicode string)
Specify a dimension along which we wish to perform a calculation.
argument: ``-dimension %s``
output_nan: (a boolean)
Output NaN when an illegal operation is done (default).
argument: ``-nan``
mutually_exclusive: output_nan, output_zero, output_illegal_value
minimum: (a boolean)
Find minimum of N volumes.
argument: ``-minimum``
ignore_nan: (a boolean)
Ignore invalid data (NaN) for accumulations.
argument: ``-ignore_nan``
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
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_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
isnan: (a boolean)
Test for NaN values in vol1.
argument: ``-isnan``
scale: (a tuple of the form: (a float, a float))
Scale a volume: volume * c1 + c2.
argument: ``-scale -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``
propagate_nan: (a boolean)
Invalid data in any file at a voxel produces a NaN (default).
argument: ``-propagate_nan``
output_file: (a file name)
output file
argument: ``%s``, position: -1
two: (a boolean)
Create a MINC 2 output file.
argument: ``-2``
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
calc_and: (a boolean)
Calculate vol1 && vol2 (&& ...).
argument: ``-and``
check_dimensions: (a boolean)
Check that dimension info matches across files (default).
argument: ``-check_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
abs: (a boolean)
Take absolute value of a volume.
argument: ``-abs``
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_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
test_lt: (a boolean or a float)
Test for vol1 < vol2 or vol1 < constant.
argument: ``-lt``
calc_add: (a boolean or a float)
Add N volumes or volume + constant.
argument: ``-add``
test_gt: (a boolean or a float)
Test for vol1 > vol2 or vol1 > constant.
argument: ``-gt``
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
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
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
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
test_ge: (a boolean or a float)
Test for vol1 >= vol2 or vol1 >= const.
argument: ``-ge``
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
sqrt: (a boolean)
Take square root of a volume.
argument: ``-sqrt``
calc_mul: (a boolean or a float)
Multiply N volumes or volume * constant.
argument: ``-mult``
calc_not: (a boolean)
Calculate !vol1.
argument: ``-not``
test_eq: (a boolean or a float)
Test for integer vol1 == vol2 or vol1 == constant.
argument: ``-eq``
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``
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
nsegment: (a tuple of the form: (a float, a float))
Opposite of -segment: within range = 0, outside range = 1.
argument: ``-nsegment -const2 %s %s``
no_check_dimensions: (a boolean)
Do not check dimension info.
argument: ``-nocheck_dimensions``
mutually_exclusive: check_dimensions, no_check_dimensions
test_le: (a boolean or a float)
Test for vol1 <= vol2 or vol1 <= const.
argument: ``-le``
count_valid: (a boolean)
Count the number of valid values in N volumes.
argument: ``-count_valid``
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``
nisnan: (a boolean)
Negation of -isnan.
argument: ``-nisnan``
maximum: (a boolean)
Find maximum of N volumes.
argument: ``-maximum``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
test_ne: (a boolean or a float)
Test for integer vol1 != vol2 or vol1 != const.
argument: ``-ne``
percentdiff: (a float)
Percent difference between 2 volumes, thresholded (const def=0.0).
argument: ``-percentdiff``
calc_div: (a boolean or a float)
Divide 2 volumes or volume / constant.
argument: ``-div``
calc_sub: (a boolean or a float)
Subtract 2 volumes or volume - constant.
argument: ``-sub``
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``
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
max_buffer_size_in_kb: (an integer >= 0, nipype default value: 4096)
Specify the maximum size of the internal buffers (in kbytes).
argument: ``-max_buffer_size_in_kb %d``
invert: (a float)
Calculate 1/c.
argument: ``-invert -const %s``
calc_or: (a boolean)
Calculate vol1 || vol2 (|| ...).
argument: ``-or``
Outputs:
output_file: (an existing file name)
output file
NlpFit¶
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_mask: (an existing file name)
Source mask to use during fitting.
argument: ``-source_mask %s``
config_file: (an existing file name)
File containing the fitting configuration use.
argument: ``-config_file %s``
target: (an existing file name)
target Minc file
argument: ``%s``, position: -2
init_xfm: (an existing file name)
Initial transformation (default identity).
argument: ``-init_xfm %s``
source: (an existing file name)
source Minc file
argument: ``%s``, position: -3
[Optional]
input_grid_files: (a list of items which are a file name)
input grid file(s)
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_xfm: (a file name)
output xfm file
argument: ``%s``, position: -1
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
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
Outputs:
output_grid: (an existing file name)
output grid file
output_xfm: (an existing file name)
output xfm file
Norm¶
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]
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``
output_threshold_mask: (a file name)
File in which to store the threshold mask.
argument: ``-threshold_mask %s``
threshold_bmt: (a boolean)
Use the resulting image BiModalT as the threshold.
argument: ``-threshold_bmt``
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``
upper: (a float)
Upper real value to use.
argument: ``-upper %s``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
mask: (a file name)
Calculate the image normalisation within a mask.
argument: ``-mask %s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
out_floor: (a float)
Output files maximum [default: 0]
argument: ``-out_floor %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
threshold: (a boolean)
Threshold the image (set values below threshold_perc to -out_floor).
argument: ``-threshold``
out_ceil: (a float)
Output files minimum [default: 100]
argument: ``-out_ceil %s``
threshold_blur: (a float)
Blur FWHM for intensity edges then thresholding [default: 2].
argument: ``-threshold_blur %s``
Outputs:
output_threshold_mask: (a file name)
threshold mask file
output_file: (an existing file name)
output file
Pik¶
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]
auto_range: (a boolean)
Automatically determine image range using a 5 and 95% PcT.
(histogram)
argument: ``--auto_range``
mutually_exclusive: image_range, auto_range
jpg: (a boolean)
Output a jpg file.
mutually_exclusive: jpg, png
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
minc_range: (a tuple of the form: (a float, a float))
Valid range of values for MINC file.
argument: ``--range %s %s``
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``
title_size: (an integer (int or long))
Font point size for the title.
argument: ``--title_size %s``
requires: title
title: (a boolean or a unicode string)
argument: ``%s``
output_file: (a file name)
output file
argument: ``%s``, position: -1
start: (an integer (int or long))
Slice number to get. (note this is in voxel co-ordinates).
argument: ``--slice %s``
lookup: (a unicode string)
Arguments to pass to minclookup
argument: ``--lookup %s``
sagittal_offset: (an integer (int or long))
Offset the sagittal slice from the centre.
argument: ``--sagittal_offset %s``
slice_y: (a boolean)
Get a coronal (y) slice.
argument: ``-y``
mutually_exclusive: slice_z, slice_y, slice_x
slice_z: (a boolean)
Get an axial/transverse (z) slice.
argument: ``-z``
mutually_exclusive: slice_z, slice_y, slice_x
tile_size: (an integer (int or long))
Pixel size for each image in a triplanar.
argument: ``--tilesize %s``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
slice_x: (a boolean)
Get a sagittal (x) slice.
argument: ``-x``
mutually_exclusive: slice_z, slice_y, slice_x
annotated_bar: (a boolean)
create an annotated bar to match the image (use height of the output
image)
argument: ``--anot_bar``
sagittal_offset_perc: (0 <= an integer <= 100)
Offset the sagittal slice by a percentage from the centre.
argument: ``--sagittal_offset_perc %d``
png: (a boolean)
Output a png file (default).
mutually_exclusive: jpg, png
vertical_triplanar_view: (a boolean)
Create a vertical triplanar view (Default).
argument: ``--vertical``
mutually_exclusive: vertical_triplanar_view,
horizontal_triplanar_view
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
depth: (8 or 16)
Bitdepth for resulting image 8 or 16 (MSB machines only!)
argument: ``--depth %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
width: (an integer (int or long))
Autoscale the resulting image to have a fixed image width (in
pixels).
argument: ``--width %s``
triplanar: (a boolean)
Create a triplanar view of the input file.
argument: ``--triplanar``
horizontal_triplanar_view: (a boolean)
Create a horizontal triplanar view.
argument: ``--horizontal``
mutually_exclusive: vertical_triplanar_view,
horizontal_triplanar_view
Outputs:
output_file: (an existing file name)
output image
Resample¶
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]
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``
invert_transformation: (a boolean)
Invert the transformation before using it.
argument: ``-invert_transformation``
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
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
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
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
two: (a boolean)
Create a MINC 2 output file.
argument: ``-2``
coronal_slices: (a boolean)
Write out coronal slices
argument: ``-coronal``
mutually_exclusive: transverse, sagittal, coronal
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
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
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
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
fill: (a boolean)
Use a fill value for points outside of input volume.
argument: ``-fill``
mutually_exclusive: nofill, fill
input_grid_files: (a list of items which are a file name)
input grid file(s)
tricubic_interpolation: (a boolean)
Do tricubic interpolation.
argument: ``-tricubic``
mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
nearest_neighbour_interpolation, sinc_interpolation
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
output_file: (a file name)
output file
argument: ``%s``, position: -1
sinc_window_hanning: (a boolean)
Set sinc window type to Hanning.
argument: ``-hanning``
mutually_exclusive: sinc_window_hanning, sinc_window_hamming
requires: sinc_interpolation
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
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
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
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_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
units: (a unicode string)
Specify the units of the output sampling.
argument: ``-units %s``
trilinear_interpolation: (a boolean)
Do trilinear interpolation.
argument: ``-trilinear``
mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
nearest_neighbour_interpolation, sinc_interpolation
spacetype: (a unicode string)
Set the spacetype attribute to a specified string.
argument: ``-spacetype %s``
transformation: (a file name)
File giving world transformation. (Default = identity).
argument: ``-transformation %s``
transverse_slices: (a boolean)
Write out transverse slices.
argument: ``-transverse``
mutually_exclusive: transverse, sagittal, coronal
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
sagittal_slices: (a boolean)
Write out sagittal slices
argument: ``-sagittal``
mutually_exclusive: transverse, sagittal, coronal
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
sinc_interpolation: (a boolean)
Do windowed sinc interpolation.
argument: ``-sinc``
mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
nearest_neighbour_interpolation, sinc_interpolation
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
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
talairach: (a boolean)
Output is in Talairach space.
argument: ``-talairach``
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
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
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
no_input_sampling: (a boolean)
Use the input sampling without transforming (old behaviour).
argument: ``-use_input_sampling``
mutually_exclusive: vio_transform, no_input_sampling
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_fill: (a boolean)
Use value zero for points outside of input volume.
argument: ``-nofill``
mutually_exclusive: nofill, fill
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
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``
sinc_window_hamming: (a boolean)
Set sinc window type to Hamming.
argument: ``-hamming``
mutually_exclusive: sinc_window_hanning, sinc_window_hamming
requires: sinc_interpolation
like: (a file name)
Specifies a model file for the resampling.
argument: ``-like %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
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
nearest_neighbour_interpolation: (a boolean)
Do nearest neighbour interpolation.
argument: ``-nearest_neighbour``
mutually_exclusive: trilinear_interpolation, tricubic_interpolation,
nearest_neighbour_interpolation, sinc_interpolation
fill_value: (a float)
Specify a fill value for points outside of input volume.Default
value: 1.79769e+308.
argument: ``-fillvalue %s``
requires: fill
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
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
standard_sampling: (a boolean)
Set the sampling to standard values (step, start and dircos).
argument: ``-standard_sampling``
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
Outputs:
output_file: (an existing file name)
output file
Reshape¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
output_file: (a file name)
output file
argument: ``%s``, position: -1
write_short: (a boolean)
Convert to short integer data.
argument: ``-short``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
Outputs:
output_file: (an existing file name)
output file
ToEcat¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
voxels_as_integers: (a boolean)
Voxel values are treated as integers, scale andcalibration factors
are set to unity
argument: ``-label``
ignore_ecat_subheader_variable: (a boolean)
Ignore informations from the minc ecat-subhdr variable.
argument: ``-ignore_ecat_subheader_variable``
ignore_patient_variable: (a boolean)
Ignore informations from the minc patient variable.
argument: ``-ignore_patient_variable``
output_file: (a file name)
output file
argument: ``%s``, position: -1
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
ignore_ecat_main: (a boolean)
Ignore informations from the minc ecat-main variable.
argument: ``-ignore_ecat_main``
ignore_ecat_acquisition_variable: (a boolean)
Ignore informations from the minc ecat_acquisition variable.
argument: ``-ignore_ecat_acquisition_variable``
ignore_acquisition_variable: (a boolean)
Ignore informations from the minc acquisition variable.
argument: ``-ignore_acquisition_variable``
ignore_study_variable: (a boolean)
Ignore informations from the minc study variable.
argument: ``-ignore_study_variable``
no_decay_corr_fctr: (a boolean)
Do not compute the decay correction factors
argument: ``-no_decay_corr_fctr``
Outputs:
output_file: (an existing file name)
output file
ToRaw¶
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]
normalize: (a boolean)
Normalize integer pixel values to file max and min.
argument: ``-normalize``
mutually_exclusive: normalize, nonormalize
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_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
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
write_signed: (a boolean)
Write out signed data.
argument: ``-signed``
mutually_exclusive: write_signed, write_unsigned
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_unsigned: (a boolean)
Write out unsigned data.
argument: ``-unsigned``
mutually_exclusive: write_signed, write_unsigned
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
output_file: (a file name)
output file
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_byte: (a boolean)
Write out data as bytes.
argument: ``-byte``
mutually_exclusive: write_byte, write_short, write_int, write_long,
write_float, write_double
nonormalize: (a boolean)
Turn off pixel normalization.
argument: ``-nonormalize``
mutually_exclusive: normalize, nonormalize
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
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``
out_file: (a file name)
argument: ``> %s``, position: -1
Outputs:
output_file: (an existing file name)
output file in raw format
VolSymm¶
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
input_grid_files: (a list of items which are a file name)
input grid file(s)
config_file: (an existing file name)
File containing the fitting configuration (nlpfit -help for info).
argument: ``-config_file %s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
nofit: (a boolean)
Use the input transformation instead of generating one.
argument: ``-nofit``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
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
x: (a boolean)
Flip volume in x-plane (default).
argument: ``-x``
fit_nonlinear: (a boolean)
Fit using a non-linear xfm.
argument: ``-nonlinear``
y: (a boolean)
Flip volume in y-plane.
argument: ``-y``
fit_linear: (a boolean)
Fit using a linear xfm.
argument: ``-linear``
z: (a boolean)
Flip volume in z-plane.
argument: ``-z``
Outputs:
trans_file: (an existing file name)
xfm trans file
output_file: (an existing file name)
output file
output_grid: (an existing file name)
output grid file
Volcentre¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
output_file: (a file name)
output file
argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
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``
com: (a boolean)
Use the CoM of the volume for the new centre (via mincstats).
Default: False
argument: ``-com``
Outputs:
output_file: (an existing file name)
output file
Voliso¶
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]
maxstep: (a float)
The target maximum step desired in the output volume.
argument: ``--maxstep %s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``--verbose``
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``
minstep: (a float)
The target minimum step desired in the output volume.
argument: ``--minstep %s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``--clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
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
Outputs:
output_file: (an existing file name)
output file
Volpad¶
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]
distance: (an integer (int or long))
Padding distance (in voxels) [default: 4].
argument: ``-distance %s``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
auto: (a boolean)
Automatically determine padding distances (uses -distance as max).
Default: False.
argument: ``-auto``
output_file: (a file name)
output file
argument: ``%s``, position: -1
smooth: (a boolean)
Smooth (blur) edges before padding. Default: False.
argument: ``-smooth``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
smooth_distance: (an integer (int or long))
Smoothing distance (in voxels) [default: 4].
argument: ``-smooth_distance %s``
auto_freq: (a float)
Frequency of voxels over bimodalt threshold to stop at [default:
500].
argument: ``-auto_freq %s``
Outputs:
output_file: (an existing file name)
output file
XfmAvg¶
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)
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
avg_linear: (a boolean)
average the linear part [default].
argument: ``-avg_linear``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
avg_nonlinear: (a boolean)
average the non-linear part [default].
argument: ``-avg_nonlinear``
ignore_linear: (a boolean)
opposite of -avg_linear.
argument: ``-ignore_linear``
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
ignore_nonlinear: (a boolean)
opposite of -avg_nonlinear.
argument: ``-ignore_nonline``
Outputs:
output_grid: (an existing file name)
output grid file
output_file: (an existing file name)
output file
XfmConcat¶
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)
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
output_file: (a file name)
output file
argument: ``%s``, position: -1
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
Outputs:
output_grids: (a list of items which are an existing file name)
output grids
output_file: (an existing file name)
output file
XfmInvert¶
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]
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
verbose: (a boolean)
Print out log messages. Default: False.
argument: ``-verbose``
output_file: (a file name)
output file
argument: ``%s``, position: -1
clobber: (a boolean, nipype default value: True)
Overwrite existing file.
argument: ``-clobber``
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
Outputs:
output_grid: (an existing file name)
output grid file
output_file: (an existing file name)
output file