mincIO.getProperty-methods: Get a specified property from a mincIO object

Description Usage Arguments Value Author(s) See Also Examples

Description

Basically, these methods provide accessor functions to slot values within all mincIO objects. One is still free to access slots directly using the “object@slot” syntax, however, use of accessors are to be preferred since they insulate the user from implementation details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'MincInfo,character'
mincIO.getProperty(mincIOobj, propertyId)

## S4 method for signature 'MincVolumeIO,character'
mincIO.getProperty(mincIOobj, propertyId)

## S4 method for signature 'MincSlice,character'
mincIO.getProperty(mincIOobj, propertyId)

## S4 method for signature 'MincSliceIO,character'
mincIO.getProperty(mincIOobj, propertyId)

## S4 method for signature 'MincVoxelIO,character'
mincIO.getProperty(mincIOobj, propertyId)

Arguments

mincIOobj

A mincIO object of interest.

propertyId

A string specifying the property whose value is to be returned. All values that are contained within the object can be retrieved via the appropriate identifier. Use the str() function to see the object identifiers (as shown in the examples).

Value

An entity whose structure is appropriate to the value of the property being retrieved.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

mincIO.setProperty MincInfo MincVolumeIO MincSlice MincSliceIO MincVoxelIO

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
\dontshow{
# clear debug flag and get full volume pathname
# ... dunno why zzz.R debug setting is not passed
    R_DEBUG_rmincIO <- 0      
    volDir <- system.file("packageData/volumes", package="rmincIO")
}
# load the ICBM-152 volume
vIcbm <- "icbm_avg_152_t1_tal_lin.mnc"
vIcbm <- file.path(volDir, vIcbm)
vol <- mincIO.readVolume(vIcbm)

# show the raw attributes
str(vol)

# retrieve selected properties
mincIO.getProperty(vol, "sizes")         # dim sizes; in xyz order
mincIO.getProperty(vol, "starts")        # dim starts
mincIO.getProperty(vol, "nDimensions")   # number of dimensions
mincIO.getProperty(vol, "volumeType")    # type of volume

## End(Not run)

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