rmincUtil.getDataTypeCode: Get a Data Type Numeric Code

Description Usage Details Value Author(s) See Also Examples

View source: R/rmincUtil.R

Description

Returns a single numeric code reflecting the Minc2 data type to be written.

Usage

1
rmincUtil.getDataTypeCode(dataTypeAsString)

Details

Returns a single numeric code reflecting the Minc2 data type to be written. Note that the data type reflects the actual storage format used within the minc volume. The possible storage formats include, for example, "MI_TYPE_BYTE", "MI_TYPE_SHORT", "MI_TYPE_INT", "MI_TYPE_FLOAT", "MI_TYPE_DOUBLE", etc. The following, more memorable, short-cut values are also permitted: "FLOAT", "DOUBLE", "INTEGER", "LONG", "SHORT", "BYTE".

Value

A single numeric code reflecting the Minc2 data type to be written.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

rmincUtil.getDataTypes rmincUtil.getDataClassCode

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# write new volume as real/double
# ... set class as real in object property
mincIO.setProperty(newVolumeFilled.vol, "volumeDataClass", rmincUtil.getDataClassCode("REAL"))
# ... set type as double
mincIO.setProperty(newVolumeFilled.vol, "volumeDataType", rmincUtil.getDataTypeCode("DOUBLE"))
# ... write it out
mincIO.writeVolume(newVolumeFilled.vol, "volume_out.mnc", clobber=TRUE)

## End(Not run)

jnikelski/rmincIO documentation built on May 19, 2019, 2:58 p.m.