mesh.spheric.proj {espadon}R Documentation

Adding spherical coordinates to a mesh

Description

The mesh.spheric.proj function adds latitude and longitude coordinates to a mesh. These features map the mesh surface to a sphere. Latitude and longitude are computed using the heat diffusion approach explained by Brechbühler and al [1].

Usage

mesh.spheric.proj(mesh, verbose = TRUE)

Arguments

mesh

"mesh" class object.

verbose

Boolean, by default set to FALSE. Allows you to inhibit comments.

Value

returns a "mesh" class object in which $mesh contains Lat and lon evaluated at vertices. The function allows to have a parameterized surface for later computations as curvature or shape index, hence, nor the surface, nor the angles are preserved. In the DICOM frame of reference, latitude goes along Z axis (from feet = -1 to head = +1) and longitude turns counter clockwise (from -1 to +1).

Note

This funtion is time consuming.

References

[1] Brechbuhler C, Gerig G, Kubler O (1995). “Parametrization of Closed Surfaces for 3-D Shape Description.” Computer Vision and Image Understanding, 61(2), 154-170. ISSN 1077-3142, doi:10.1006/cviu.1995.1013.

Examples

# loading of toy-patient objects (decrease dxyz for better result)
step <- 5
patient <- toy.load.patient (modality = c("ct", "rtstruct"), roi.name = "", 
                             dxyz = rep (step, 3))
CT <- patient$ct[[1]]
S <- patient$rtstruct[[1]]

#creation of the patient mesh
bin <- bin.from.roi (CT, struct = S, roi.name = "patient")
m.patient <- mesh.from.bin (bin)
m.skin <- mesh.repair (m.patient, verbose = FALSE)

m.proj <- mesh.spheric.proj (m.skin, verbose = FALSE)

library (rgl)
col <- hcl.colors (12, "Blue-Red 3")
open3d()
shade3d (m.proj$mesh, meshColors = "vertices",
         color = col[round ((m.proj$mesh$Lat/2 + 0.5) * 11) + 1],
         specular = "#404040")
open3d()         
shade3d (m.proj$mesh, meshColors = "vertices",
         color = col[round ((m.proj$mesh$Lon/2 + 0.5) * 11) + 1],
         specular = "#404040")


[Package espadon version 1.7.0 Index]