rmincUtil.getDataClassCode: Get a Data Class 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 class to be written.

Usage

1
rmincUtil.getDataClassCode(dataClassAsString)

Details

Returns a single numeric code reflecting the Minc2 data class to be written. Note that the data type reflects the class of data to be written. The possible classes include: "REAL", "INTEGER", "LABEL", "COMPLEX", "UNIFORM_RECORD", "NON_UNIFORM_RECORD".

Value

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

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

rmincUtil.getDataClasses rmincUtil.getDataTypeCode

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("INTEGER"))
# ... set type as double
mincIO.setProperty(newVolumeFilled.vol, "volumeDataType", rmincUtil.getDataClassCode("LONG"))
# ... 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.