MRIaggr-selectDefault_value: Extract reference values

Description Usage Arguments Value Examples

Description

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

Usage

1
2
3
4
5
## S4 method for signature 'Carto3D'
selectDefault_value(object)

## S4 method for signature 'MRIaggr'
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#### 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)

bozenne/MRIaggr documentation built on May 13, 2019, 1:39 a.m.