Learn R Programming

MRIaggr (version 1.1.5)

selectDefault_value: Extract reference values

Description

Extract the reference values of the contrast parameters from a Carto3D or from a MRIaggr object.

Usage

"selectDefault_value"(object)
"selectDefault_value"(object, param = NULL, character2numeric = FALSE)

Arguments

object
an object of class Carto3D or MRIaggr. REQUIRED.
param
the contrast parameters for which the reference values should be returned. character vector or NULL leading to extract reference values for all available contrast parameters.
character2numeric
should the default values be converted from character to numeric. logical.

Value

A data.frame with one line an several columns containing the default value of each parameter.

Examples

Run this code
#### 1- Carto3D method ####
## load nifti files and convert them to Carto3D
path.Pat1 <- system.file("nifti", package = "MRIaggr")
nifti.Pat1_TTP_t0 <- readMRI(file.path(path.Pat1, "TTP_t0"), format = "nifti")
Carto3D.Pat1_TTP_t0 <- constCarto3D(nifti.Pat1_TTP_t0, identifier = "Pat1", param = "TTP_t0")

## selection
selectDefault_value(Carto3D.Pat1_TTP_t0)

#### 2- MRIaggr method ####
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## select default values for all parameters
res <- selectDefault_value(MRIaggr.Pat1_red)

## select default values for T2_FLAIR_t2 and DWI_t0
res <- selectDefault_value(MRIaggr.Pat1_red, param=c("T2_FLAIR_t2", "DWI_t0"))

## select default values for T2_FLAIR_t2 and DWI_t0 and convert them in numeric
res <- selectDefault_value(MRIaggr.Pat1_red, param=c("T2_FLAIR_t2", "DWI_t0"), 
         character2numeric = TRUE)

Run the code above in your browser using DataLab