Learn R Programming

espadon (version 1.11.3)

save.T.MAT: Save a T.MAT class object

Description

The save.T.MAT function saves the data required by load.T.MAT, load.patient.from.dicom or load.patient.from.Rdcm to generate T.MAT, as pre-formatted Rdcm files.

Usage

save.T.MAT(T.MAT, dirname)

Value

Returns TRUE, if all reg files generating T.MAT are saved.

Arguments

T.MAT

"t.mat" class object to save.

dirname

Directory where new reg .Rdcm files will be saved.

Details

Reg files from DICOM files cannot be updated with the save.T.MAT function. Only transfer matrices added with ref.add or ref.cutplane.add will be saved.

Examples

Run this code
# loading of toy-patient objects (decrease dxyz for  better result)
step <- 5
patient <- toy.load.patient (modality = c("ct", "mr"), roi.name = "", 
                             dxyz = rep (step, 3))
                             
# Save T.MAT to a temporary file pat.dir
pat.dir <- file.path (tempdir(), "PM_Rdcm") 
dir.create (pat.dir, recursive = TRUE) 
save.T.MAT (patient$T.MAT, dirname = pat.dir)
list.files(pat.dir)

# Cleaning  temporary directory
unlink (pat.dir, recursive = TRUE)

Run the code above in your browser using DataLab