Description Usage Arguments Value Author(s) Examples
Given a label volume object, this function splits the volume by label and then returns a list() containing a mask volume for each of the labels.
1 | volume.explodeLabelVolume(label_vol, labels=NULL, civetLabels=TRUE)
|
label_vol |
A mincIO volume object. |
labels |
A vector of labels identifying which of the labels of the label volume are to be extracted. By default, all labels are extracted. |
civetLabels |
A logical variable indicating whether the label volume is using the Civet convention with regards to naming tissue type (e.g., 0=background, 1=csf, etc). If TRUE, the returned list components are named using Civet tissue types (bg, csf, gm. wm), else components are simply labelled by label number e.g. (“label_0”, “label_2”, etc.). |
A list is returned with each list item holding a mask volume reflecting a particular label.
Jim Nikelski nikelski@bic.mni.mcgill.ca
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
library(rmincIO)
# set Civet root path and scan-identifier
scanID <- "0548-F-NC"
baseDir <- "~/tmp/ADNI/civet/pipeOut"
# read in the final tissue classify volume
labelVolname <- civet.getFilenameClassify(scanID, baseDir)
label_vol <- mincIO.readVolume(labelVolname)
# explode the classify vol into its 4 components
components <- volume.explodeLabelVolume(label_vol)
# display the gray matter mask volume
plot(components$gm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.