Carto3D-constCarto3D: Array constructor for Carto3D objects

Description Usage Arguments Details Value Examples

Description

Creates a Carto3D object from an array.

Usage

1
2
constCarto3D(array, identifier, param, default_value = NULL,            
         pos_default_value = c(1,1,1), voxelDim = NULL, rm.array = FALSE)

Arguments

array

the values of the contrast parameter. array. REQUIRED.

identifier

the identifier of the patient from which the data originated. character. REQUIRED.

param

the contrast parameter. character. REQUIRED.

default_value

the reference values of the contrast parameters (e.g. the background value). character or NULL leading to search the reference value in array[pos_default_value].

pos_default_value

the coordinates of the observation that contains the reference value. numeric vector with length the number of dimension of array.

voxelDim

the voxel size with its unit of measure. A four columns data.frame with names "i", "j", "k" and "unit".

rm.array

should the object on which array argument points be removed form the global environment ? logical.

Details

ARGUMENTS:
pos_default_value is active only if default_value is set to NULL.

Value

An object of class Carto3D.

Examples

1
2
3
4
5
6
7
## load NIFTI files
path.Pat1 <- system.file(file.path("nifti"), package = "MRIaggr")
nifti.Pat1_TTP_t0 <- readMRI(file.path(path.Pat1, "TTP_t0"), format = "nifti")

## convert them to Carto3D
Carto3D.Pat1_TTP_t0 <- constCarto3D(nifti.Pat1_TTP_t0, identifier = "Pat1", param = "TTP_t0")
class(Carto3D.Pat1_TTP_t0)

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