View source: R/cmtk-reformat.R
cmtk.reformatx | R Documentation |
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,
...
)
floating |
The floating image to be reformatted |
registrations |
One or more CMTK format registrations on disk |
output |
The path to the output image (defaults to
|
target |
A character vector specifying an image file on disk, an
|
mask |
Whether to treat target as a binary mask (only reformatting positive voxels) |
direction |
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 |
interpolation |
What interpolation scheme to use for output image (defaults to linear - see details) |
dryrun |
Just print command |
Verbose |
Whether to show cmtk status messages and be verbose about file
update checks. Sets command line |
MakeLock |
Whether to use a lock file to allow simple parallelisation
(see |
OverWrite |
Whether to OverWrite an existing output file. One of
c("no","update","yes"). When OverWrite='update'
|
filesToIgnoreModTimes |
Input files whose modification time should not be checked when determining if new output is required. |
... |
additional arguments passed to CMTK |
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 unintened consequences. Presently we have
no way of knowing whether an image should be treated as a mask, so the
interpolation
must be handled manually.
the path to the ouput image (whether or not it was re-created afresh)
or NA_character_
if no output was possible.
cmtk.bindir, cmtk.call, makelock,
RunCmdForNewerInput
## Not run:
cmtk.reformatx('myimage.nrrd', target='template.nrrd',
registrations='template_myimage.list')
# get full listing of command line options
system(cmtk.call('reformatx', help=TRUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.