## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
#### 1- lesion ####
## manual allocation
maskN <- c("MASK_DWI_t0","MASK_T2_FLAIR_t2")
resTable <- calcTableLesion(MRIaggr.Pat1_red, maskN = maskN, numeric2logical = TRUE)
allocTable(MRIaggr.Pat1_red, type = "lesion", overwrite = TRUE) <- resTable
## automatic allocation
resTable <- calcTableLesion(MRIaggr.Pat1_red, maskN = maskN,
numeric2logical = TRUE, update.object = TRUE, overwrite = TRUE)
## display
selectTable(MRIaggr.Pat1_red, type = "lesion")
#### 2- hypoperfusion and reperfusion ####
## manual allocation
resTable <- calcTableHypoReperf(MRIaggr.Pat1_red, param = c("TTP","MTT"), timepoint=c("t0","t1"))
allocTable(MRIaggr.Pat1_red, type = "hypoperfusion", overwrite = TRUE) <- resTable$volume_hypo
allocTable(MRIaggr.Pat1_red, type = "reperfusion", overwrite = TRUE) <- resTable$volume_reperf
## automatic allocation
resTable <- calcTableHypoReperf(MRIaggr.Pat1_red, param = c("TTP","MTT"),
timepoint = c("t0","t1"), update.object = TRUE, overwrite = TRUE)
## display
selectTable(MRIaggr.Pat1_red, type = "reperfusion")
Run the code above in your browser using DataLab