description wraps unu resample

NrrdResample(infile, outfile = NULL, size = NULL, voxdims = NULL,
  centering = c("cell", "node"), otherargs = NULL, gzip = TRUE,
  suffix = NULL, CreateDirs = TRUE, Verbose = TRUE, Force = FALSE,
  UseLock = FALSE, ...)

Arguments

infile, outfile

Input/output files

size

Numeric vector of scale factors (NA=> don't touch) or integer vector of pixel dimensions.

voxdims

Target voxel dimensions

centering

Whether to assume node or cell centering if not specified in input file.

otherargs

Passed to unu resample

gzip

Whether or not to gzip encode the output file?

suffix

A suffix added to the input file to construct an output filename

CreateDirs

Whether to create implied output directories

Verbose

Print status messages

Force

Whether to overwrite an existing file

UseLock

Whether to use file-based locking to enable simple parallelisation

...

Additional params passed to unu

Value

The output file

Details

If outfile is NULL a default filename wil be constructed.

When size is explicitly an integer (e.g. c(512L,512L,100L) then it is assumed to represent the size of the desired output in pixels.

unu resample defaults to cell centering in the asbence of information, but I prefer node.

* downsampling a **cell** image (e.g. x2) will result in

  • an origin shift **iff** an origin was specified in the input file

  • a change in the space directions that is not an exact multiple of the downsampling factor

.

Downsampling a node image (e.g. x2) will result in:

  • no change in origin

  • a doubling in the space directions field