get.value.from.ijk {espadon}R Documentation

Value of the volume at a selection of DICOM indices

Description

The get.value.from.ijk function calculates the value of a "volume" class object at DICOM indices i, j, k, whether they are integers or not.

Usage

get.value.from.ijk(ijk, vol, interpolate = TRUE)

Arguments

ijk

Vector or 3-column matrix of DICOM indices.

vol

"volume" class object.

interpolate

Boolean, default to TRUE. If interpolate = TRUE, a trilinear interpolation of the value of the voxels, relative to the values of adjacent voxels, is performed.

Value

Returns a vector of the values of the volume at the requested DICOM indices.

See Also

get.ijk.from.index.

Examples

# loading of toy-patient objects (decrease dxyz and increase beam.nb for 
# better result)
step <- 4
patient <- toy.load.patient (modality = "rtdose", roi.name = "", 
                             dxyz = rep (step, 3), beam.nb = 3)
D <- patient$rtdose[[1]]
# isodose
Dmax <- max (D$vol3D.data, na.rm = TRUE)
Dmax
idx <- which (D$vol3D.data >= (Dmax -1) & D$vol3D.data <= (Dmax - 0.2))
ijk <- get.ijk.from.index (idx, D)
get.value.from.ijk (ijk, vol = D, interpolate = FALSE)

[Package espadon version 1.2.0 Index]