## load NIFTI files
path.Pat1 <- system.file(file.path("nifti"), package = "MRIaggr")
Pat1.TTP.t0.nifti <- readMRI(file.path(path.Pat1, "TTP_t0"), format = "nifti")
Pat1.DWI.t0.nifti <- readMRI(file.path(path.Pat1, "DWI_t0"), format = "nifti")
Pat1.MASK_DWI.t0.nifti <- readMRI(file.path(path.Pat1, "MASK_DWI_t0"), format = "nifti")
Pat1.MASK_T2_FLAIR.t2.nifti <- readMRI(file.path(path.Pat1, "MASK_T2_FLAIR_t2"),
format = "nifti")
## convert them to Carto3D
Pat1.TTP.t0.Carto3D <- constCarto3D(Pat1.TTP.t0.nifti,
identifier = "Pat1", param = "TTP_t0", default_value = NA)
Pat1.DWI.t0.Carto3D <- constCarto3D(Pat1.DWI.t0.nifti,
identifier = "Pat1", param = "DWI_t0", default_value = NA)
Pat1.MASK_DWI.t0.Carto3D <- constCarto3D(Pat1.MASK_DWI.t0.nifti,
identifier = "Pat1", param = "MASK_DWI_t0", default_value = NA)
Pat1.MASK_T2_FLAIR.t2.Carto3D <- constCarto3D(Pat1.MASK_T2_FLAIR.t2.nifti,
identifier = "Pat1", param = "MASK_T2_t2", default_value = NA)
## convert Carto3D to MRIaggr
MRIaggr.Pat1 <- Carto3D2MRIaggr(list(Pat1.TTP.t0.Carto3D,
Pat1.DWI.t0.Carto3D,
Pat1.MASK_DWI.t0.Carto3D,
Pat1.MASK_T2_FLAIR.t2.Carto3D)
)
Run the code above in your browser using DataLab