Learn R Programming

espadon (version 1.11.3)

vol.abserror: Absolute error volume

Description

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

Usage

vol.abserror(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 absolute 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 "absolute error".

See Also

vol.error

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
vAE <- vol.abserror (patient$ct[[2]], patient$ct[[1]], T.MAT = patient$T.MAT)

# Display
palette_vAE <- colorRampPalette(c("#00005F", "#0000FF", "#00FFFF", "#00FF00",
                                  "#FFFF00", "#FF7F00", "#FF0000", "#7F0000",
                                  "#5F0000")) (100)
breaks_vAE <- seq(floor (vAE$min.pixel), ceiling (vAE$max.pixel), 
                  length.out = 101)
                  
layout (mat = matrix(c(rep(1,6),2,2), ncol=4))                                
plot (vAE, view.coord =61, view.type = "trans", 
      col = palette_vAE, breaks = breaks_vAE)
display.palette(palette_vAE, breaks = breaks_vAE, 
                cex.axis = 1.2, main = vAE$unit)
par(mfrow=c(1,1))

Run the code above in your browser using DataLab