volume.explodeLabelVolume: Explode a Label Volume into its Components

Description Usage Arguments Value Author(s) Examples

View source: R/volumetric.R

Description

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.

Usage

1
volume.explodeLabelVolume(label_vol, labels=NULL, civetLabels=TRUE)

Arguments

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.).

Value

A list is returned with each list item holding a mask volume reflecting a particular label.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

Examples

 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)

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