mincIO.setProperty-methods: Set a specified property from a mincIO object

Description Usage Arguments Value Author(s) See Also Examples

Description

Basically, these methods provide “setter” functions to slot values within all mincIO objects. Unlike the “getter” functions which allow access to all slots, these setters only allow specific slots to be modified, in order to prevent the user from creating an inconsistent mincIO object.

Usage

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

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

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

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

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

Arguments

mincIOobj

A mincIO object of interest.

propertyId

A string specifying the property whose value is to be modified. Only specific properties are permitted to be modified. Use the str() function to see the object identifiers (as shown in the examples).

value

The new value to which the property is to be set. The value type (e.g. numeric, character, etc.) must match the slot type.

Value

An updated mincIO object containing the new property value.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

mincIO.getProperty 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
23
24
25
## 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 before update
str(vol)

# set selected properties
mincIO.setProperty(vol,"filename", "billy_bob.mnc")
mincIO.setProperty(vol,"volumeIntensityRange", c(0,123))
mincIO.setProperty(vol,"volumeType", "label")
mincIO.setProperty(vol,"colorMap", "AAL")

# show the raw attributes before update
str(vol)

## End(Not run)

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