{espadon}R Documentation

Indices relating to the coordinates of the points


The function calculates the i, j, k DICOM indices of the points given in the patient's reference frame.

Usage = matrix(c(0, 0, 0), ncol = 3), vol, verbose = FALSE)



Vector of length 3, corresponding to the x, y, z coordinates (in mm) of a point in the patient's frame of reference, or 3-column matrix of x, y, z coordinates of several points.


"volume" class object.


Boolean, default to FALSE. If verbose = TRUE, then the xyz coordinates are printed.


Returns a vector or a matrix of the i, j, k DICOM indices of the x, y, z coordinate points in the patient's frame of reference.


The vector or matrix is made up of real numbers. It is up to the user to make the indices as integer.

The indices of the first voxel vol are 0, 0, 0. WARNING: As i,j,k are DICOM indices, they are not directly related to array indices. To get the value of the vol$, use the function get.value.from.ijk.


# loading of toy-patient objects (decrease dxyz for better result)
step <- 4
patient <- toy.load.patient (modality = "ct", = "", 
                             dxyz = rep (step, 3))
CT <- patient$ct[[1]] (xyz = CT$xyz0[1,], vol = CT, verbose = TRUE) (xyz = c (1,1,1), vol = CT, verbose = TRUE)

index <- (xyz = c (1,1,1), vol = CT)
floor (index)

index <- (xyz = matrix (c (0,0,0,1,1,1), ncol = 3, byrow = TRUE), 
                           vol = CT)
floor (index)

[Package espadon version 1.2.0 Index]