Flip a NRRD image along one axis

NrrdFlip(infile, outfile, axes, suffix = NULL,
  flip_space_directions = TRUE, OverWrite = c("no", "update", "yes"),
  endian = .Platform$endian, CreateDirs = TRUE, UseLock = FALSE,
  Verbose = TRUE)

Arguments

infile

Input/output files

outfile

Input/output files

axes

Which axes to flip (0-indexed integer)

suffix

Suffix to add to input file to construct output file.

flip_space_directions

Whether to multiply the space directions of the selected axes by -1. This is the default behaviour of unu, but sometimes you just want to flip the image data without touching the metadata - if so set flip_space_directions=FALSE.

OverWrite

Whether to overwrite (yes or no) or update output image.

endian

Whether output image should be big or little endian for multibyte data types (essentially all other than 8 bit). Defaults to endianness of current machine.

CreateDirs

Whether to create implied output directories

UseLock

Whether to use file-based locking to enable simple parallelisation

Verbose

Print status messages

Value

TRUE if output exists

Examples

# NOT RUN {
# flip the first (x) axis
# will make input-flip.nrrd
NrrdFlip('input.nrrd', axes=0)

# same but specify outfile name
NrrdFlip('input.nrrd', outfile='output.nrrd', axes=0)

# flip both axes (nb will do so from left to right)
NrrdFlip('input.nrrd', axes=0:1)

# flip y axis image data but leave space directions untouched
NrrdFlip('input.nrrd', axes=1, flip_space_directions=FALSE)
# }