Learn R Programming

espadon (version 1.11.3)

vol.error: Error volume

Description

The function vol.error provides the error volume between 2 volumes.

Usage

vol.error(vol, vol.ref, T.MAT = NULL, alias = "", description = NULL)

Value

Returns a "volume" class object (see espadon.class

for class definitions), with the same grid as vol.ref, and representing the error between vol and vol.ref.

Arguments

vol, vol.ref

"volume" class objects.

T.MAT

"t.mat" class object to link the reference frames of vol and vol.ref. T.MAT can be created by load.patient.from.Rdcm or load.T.MAT. If T.MAT = NULL, vol$ref.pseudo must be equal to vol.ref$ref.pseudo.

alias

Character string, $alias of the created object.

description

Character string, describing the created object. If description = NULL (default value), it will be set to "error".

See Also

vol.abserror

Examples

Run this code
# loading of toy-patient objects (decrease dxyz)
step <- 5
patient <- toy.load.patient (modality = c("ct", "sct","rtstruct"), 
                             roi.name = c("eye", "brain","gizzard"),
                             dxyz = rep (step, 3))

patient$ct[[1]]$description
patient$ct[[2]]$description
# Creation of the absolute error volume between ct and synthetic ct
vE <- vol.error (patient$ct[[2]], patient$ct[[1]], T.MAT = patient$T.MAT)

# Display
palette_vE <- colorRampPalette(c("#0000FF","#FFFFFF","#FF0000")) (100)
breaks_vE <- seq(floor (vE$min.pixel), ceiling (vE$max.pixel), 
                  length.out = 101)
                  
layout (mat = matrix(c(rep(1,6),2,2), ncol=4))                                
plot (vE, view.coord =61, view.type = "trans", 
      col = palette_vE, breaks = breaks_vE)
display.palette(palette_vE, breaks = breaks_vE, 
                cex.axis = 1.2, main = vE$unit)
par(mfrow=c(1,1))

Run the code above in your browser using DataLab