MRIaggr-allocHemisphere: Allocate the position of the mid-saggital plan

Description Usage Arguments Details Value See Also Examples

Description

Allocate information about the position of the mid-saggital plan to a MRIaggr object.

Usage

1
2
3
## S4 replacement method for signature 'MRIaggr'
allocHemisphere(object, 
         overwrite = FALSE, verbose = optionsMRIaggr("verbose")) <- value

Arguments

object

an object of class MRIaggr. REQUIRED.

value

a list of data.frame. Names must be among "midplane", "hemispheres" "data". See the Details section. REQUIRED.

overwrite

if the characteristics of a mid-saggital plan are already stored in object, can they be overwritten ? logical.

verbose

should the execution of the function be traced ? logical.

Details

ARGUMENTS:
The "midplane" element indicates the position of the observations of the mid-saggital plan. It has to be a two columns data.frame with the coordinates ("i","j") in columns and the observations in rows.

The "data" element must contains the position of each voxel with respect to the mid-sagittal plan (column "i_hemisphere" and "j_hemisphere") the hemisphere ("left", "right" or "undefined") to which the voxel belongs (column "hemisphere").

The "hemispheres" element indicates in which hemisphere is the lesion (denoted by "lesion"). The others hemispheries are denoted by "contralateral". It has to be a one line two columns data.frame with names "left" "right".

Value

None.

See Also

calcHemisphere to obtain the position of the mid-saggital plan and the position of the lesion in the hemispheres.
selectParameter to extract the previous elements.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## automatic allocation
resHemi <- calcHemisphere(MRIaggr.Pat1_red, param = "T2_GRE_t0", gridSearch = FALSE, num = 1,
                          update.object = TRUE, overwrite = TRUE)

## manual allocation
allocHemisphere(MRIaggr.Pat1_red, overwrite = TRUE) <- list(midplane = resHemi$midplane,
                                                            data = resHemi$data)

## display
index1 <- data.frame(selectMidplane(MRIaggr.Pat1_red), 15)
names(index1) <- c("i","j","k")
multiplot(MRIaggr.Pat1_red, param = "T2_GRE_t0", num = 1, midplane = TRUE, window = FALSE,
             index1 = list(coords = index1, pch = 20, cex = 2, col = "purple")
             
)

selectMidplane(MRIaggr.Pat1_red)
selectHemispheres(MRIaggr.Pat1_red)

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