Learn R Programming

tractor.base (version 1.1.0)

newMriImageMetadataFromTemplate: Duplicates an MriImageMetadata object, possibly with modification

Description

Duplicates an MriImageMetadata object, possibly with modification.

Usage

newMriImageMetadataFromTemplate(metadata, imageDims = NA, voxelDims = NA, voxelUnit = NA, source = "internal", datatype = NA, origin = NA, endian = NA)

Arguments

metadata
An existing MriImageMetadata object.
imageDims
Image dimensions.
voxelDims
Voxel dimensions.
voxelUnit
Voxel dimension unit, usually "mm".
source
The file source of the image. Generally should be left as "internal", which identifies the image as unsaved.
datatype
Image data type. See getDataTypeByNiftiCode.
origin
Coordinate origin.
endian
Endianness: "big" or "little".

Value

  • An MriImageMetadata object, like the one specified in the first argument, but with the specified fields replaced by new values. Any field with value NA (the default except for source) will be taken from the original metadata object.

See Also

MriImageMetadata, MriImage, getDataTypeByNiftiCode.