Scroll to navigation

reformatx(1) The Computational Morphometry Toolkit reformatx(1)


reformatx - Volume reformatter


reformatx [options] --floating floatingImg target x0 [x1 ...]
OR reformatx [options] target [x0 x1 ...] {-j,--jacobian} xx0 [xx1 ...]
OR WHERE x0 ... xN and xx0 ... xxN is [{-i,--inverse}] transformation##. (If the first transformation in the sequence is inverted, then '--inverse' must be preceded by '--', i.e., use '-- --inverse xform.path').


Extended volume reformatter tool to compute reformatted images and Jacobian maps from arbitrary sequences of concatenated transformations


Global Toolkit Options (these are shared by all CMTK tools)

Write list of basic command line options to standard output.
Write complete list of basic and advanced command line options to standard output.
Write list of command line options to standard output in MediaWiki markup.
Write man page source in 'nroff' markup to standard output.
Write toolkit version to standard output.
Write the current command line to standard output.
Set verbosity level.
Increment verbosity level by 1 (deprecated; supported for backward compatibility).
Set maximum number of parallel threads (for POSIX threads and OpenMP).
Scalar data type for the output image. Supported values: "char", "byte", "short", "ushort", "int", "uint", "float", "double", or use one of the following:
8 bits, signed
8 bits, unsigned
16 bits, signed
16 bits, unsigned
32 bits signed
32 bits unsigned
32 bits floating point
64 bits floating point

Padding value for output image [Default: 0]

Options for Plain Reformatting

Image interpolation method. Supported values: "linear", "nn", "cubic", "pv", "sinc-cosine", "sinc-hamming", where the default is "linear", or use one of the following:
Trilinear interpolation [This is the default]
Nearest neighbor interpolation
Tricubic interpolation
Partial volume interpolation
Sinc interpolation with cosine window
Sinc interpolation with Hamming window
Window radius for Sinc interpolation [Default: 3]
Mass-preserving reformatting: multiply every reformatted value with the Jacobian determinant of the applied transformation.

Options for Jacobian Map Reformatting

Correct Jacobian maps for global scale.
Do not correct Jacobian maps for global scale. [This is the default]

Input Options

Define target grid for reformating as Nx,Ny,Nz:dX,dY,dZ[:Ox,Oy,Oz] (dims:pixel:offset)
Use target pixel data as binary mask.
Crop target image: x0,y0,z0,x1,y1,z2
Override target image offset and set to x,y,z mm
Override target image offset and set to dx,dy,dz pixels
Format and path of floating image. [Default: NONE]
Padding value for the floating image [Default: disabled]

Output Options

Format and path of output image. [Default: reformat.nii ]

Image/Transformation Database

Path to image/transformation database that should be updated with the newly created image. [Default: NONE]


Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko



Report bugs at


CMTK is developed with support from the NIAAA under Grant AA021697, National Consortium on Alcohol and Neurodevelopment in Adolescence (N-CANDA): Data Integration Component. From April 2009 through September 2011, CMTK development and maintenance was supported by the NIBIB under Grant EB008381.

Jun 6 2022 CMTK 3.3.1p2