convertx - Convert between image file formats and data types.
convertx [options] infile outfile
This tool converts between image file formats and pixel data
types. It can also apply simple, general-purpose image operations in the
process. An arbitrary number of operations can be specified on the command
line, which will be applied exactly in the order given.
- --help
- Write list of basic command line options to standard output.
- --help-all
- Write complete list of basic and advanced command line options to standard
output.
- --wiki
- Write list of command line options to standard output in MediaWiki
markup.
- --man
- Write man page source in 'nroff' markup to standard output.
- --version
- Write toolkit version to standard output.
- --echo
- Write the current command line to standard output.
- --verbose-level
<integer>
- Set verbosity level.
- --verbose,
-v
- Increment verbosity level by 1 (deprecated; supported for backward
compatibility).
- --threads
<integer>
- Set maximum number of parallel threads (for POSIX threads and
OpenMP).
- --db
<string>
- Path to image/transformation database that should be updated with the
newly created image. [Default: NONE]
- --set-padding
<double>
- Set padding value: all pixels in the input image that have this value will
be ignored in all subsequent operations.
- --unset-padding
- Unset padding value: for all subsequent operations, all pixels will be
treated according to their value.
- --labels
- Specify that the image values are to be treated as discrete labels. This
will result in the appropriate intent code to be set in output files in
NIfTI format.
- --grey
- Specify that the image values are to be treated as continuous grey levels.
This will reset the intent code in files read from NIfTI format.
- --map-values
<string>
- Apply mapping function to pixel values. Mapping is defined as
'VAL0[,VAL1,...][:NEWVAL]' to map values VAL0, VAL1, etc. to new value
NEWVAL. If NEWVAL is not given, values are set to padding.
- --map-values-only
<string>
- Apply mapping function to pixel values and replace unmapped pixels with
padding. Multiple such mapping rules can be concatenated as
RULE0+RULE1[+...]; all concatenated rules will be applied
simultaneously.Mapping is defined as 'VAL0[,VAL1,...][:NEWVAL]' to map
values VAL0, VAL1, etc. to new value NEWVAL. If NEWVAL is not given,
values are set to padding. Multiple such mapping rules can be concatenated
as RULE0+RULE1[+...]; all concatenated rules will be applied
simultaneously.
- --replace-padding
<double>
- Replace padded pixel data with given value.
- --replace-inf-nan
<double>
- Replace all infinite and not-a-number pixels with given value.
- --flip-x
- Flip (mirror) along x-direction
- --flip-y
- Flip (mirror) along y-direction
- --flip-z
- Flip (mirror) along z-direction
- --median-filter
<string>
- Median filter. This operation takes the filter radius in pixels as the
parameter. A single integer defines the kernel radius in all three
dimensions. Three comma-separated integers define separate radii for the
three dimensions.
- --mean-filter
<string>
- Regional mean filter. This operation takes the filter radius in pixels as
the parameter. A single integer defines the kernel radius in all three
dimensions. Three comma-separated integers define separate radii for the
three dimensions.
- --fast-mean-filter
<string>
- Regional mean filter (fast, linear time implementation). This operation
takes the filter radius in pixels as the parameter. A single integer
defines the kernel radius in all three dimensions. Three comma-separated
integers define separate radii for the three dimensions.
- --variance-filter
<string>
- Regional variance filter. This operation takes the filter radius in pixels
as the parameter. A single integer defines the kernel radius in all three
dimensions. Three comma-separated integers define separate radii for the
three dimensions.
- --fast-variance-filter
<string>
- Fast (linear-time) regional variance filter. This operation takes the
filter radius in pixels as the parameter. A single integer defines the
kernel radius in all three dimensions. Three comma-separated integers
define separate radii for the three dimensions.
- --third-moment-filter
<string>
- Regional third moment filter. This operation takes the filter radius in
pixels as the parameter. A single integer defines the kernel radius in all
three dimensions. Three comma-separated integers define separate radii for
the three dimensions.
- --standard-deviation-filter
<string>
- Regional standard deviation filter. This operation takes the filter radius
in pixels as the parameter. A single integer defines the kernel radius in
all three dimensions. Three comma-separated integers define separate radii
for the three dimensions.
- --smoothness-filter
<string>
- Regional 'smoothness' filter. This operation takes the filter radius in
pixels as the parameter. A single integer defines the kernel radius in all
three dimensions. Three comma-separated integers define separate radii for
the three dimensions.
- --gaussian-filter-sigma
<double>
- Filter image with Gaussian kernel. This operation takes a single
real-valued parameter, which specifies the kernel coefficient sigma in
world units [e.g., mm] as the parameter.
- --gaussian-filter-fwhm
<double>
- Filter image with Gaussian kernel. This operation takes a single
real-valued parameter, which specifies the kernel full width at half
maximum in world units [e.g., mm].
- --laplace-filter
- Filter image with edge-enhancing Laplacian kernel.
- --downsample-select
<string>
- Downsample image by pixel selection using per-axis factors 'Fx,Fy,Fz' or
using single factor 'Fxyz'
- --downsample-average
<string>
- Downsample image by averaging using per-axis factors 'Fx,Fy,Fz' or using
single factor 'Fxyz'
- --resample
<double>
- Resample image to near-isotropic pixels while preserving the image
field-of-view. Takes one argument, the target resolution in world units
[e.g., mm]
- --resample-exact
<double>
- Resample image to exactly isotropic pixels of the given resolution while
matching the image field-of-view as closely as possible. Takes one
argument, the target resolution in world units [e.g., mm]
- --crop-by-index
<string>
- Crop image to a region specified by a set of six grid index coordinates
given as comma-separated integers x0,y0,z0,x1,y1,z1
- --crop-by-threshold
<double>
- Crop image to region determined via a given threshold. The resulting image
will contain all pixels larger than the given parameter.
- --crop-by-threshold-write-region
<double>
- Crop image to region determined via a given threshold and write cropping
region to standard output.
- --crop-by-threshold-write-xform
<double>
- Crop image to region determined via a given threshold and write cropping
transformation to standard output.
Torsten Rohlfing, with contributions from Michael P. Hasak, Greg
Jefferis, Calvin R. Maurer, Daniel B. Russakoff, and Yaroslav Halchenko
http://www.fsf.org/licensing/licenses/gpl.html
Report bugs at http://nitrc.org/projects/cmtk/
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.