Reformat an image with a CMTK registration using the reformatx tool
cmtk.reformatx( floating, registrations, output, target, mask = FALSE, direction = NULL, interpolation = c("linear", "nn", "cubic", "pv", "sinc-cosine", "sinc-hamming"), dryrun = FALSE, Verbose = TRUE, MakeLock = TRUE, OverWrite = c("no", "update", "yes"), filesToIgnoreModTimes = NULL, ... )
The floating image to be reformatted
One or more CMTK format registrations on disk
The path to the output image (defaults to
A character vector specifying an image file on disk, an
Whether to treat target as a binary mask (only reformatting positive voxels)
Whether to transform image from sample space to reference
space (called forward by CMTK) or from reference to sample space
(called inverse by CMTK). Default (when
What interpolation scheme to use for output image (defaults to linear - see details)
Just print command
Whether to show cmtk status messages and be verbose about file
update checks. Sets command line
Whether to use a lock file to allow simple parallelisation
Whether to OverWrite an existing output file. One of
c("no","update","yes"). When OverWrite='update'
Input files whose modification time should not be checked when determining if new output is required.
additional arguments passed to CMTK
the path to the output image (whether or not it was re-created afresh)
NA_character_ if no output was possible.
Note that if you are reformatting a mask then you will need to
change the interpolation to "nn", since interpolating between e.g. mask
levels 72 and 74 with 73 may have unintended consequences. Presently we
have no way of knowing whether an image should be treated as a mask, so the
interpolation must be handled manually.