| mesh.spheric.proj | R Documentation | 
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].
mesh.spheric.proj(mesh, verbose = TRUE)
| mesh | "mesh" class object. | 
| verbose | Boolean, by default set to  | 
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).
This funtion is time consuming.
[1] \insertRefBRECHBUHLER1995154espadon
# loading of toy-patient objects (decrease dxyz for better result)
step <- 6
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", verbose = FALSE)
m.skin <- mesh.from.bin (bin)
m.proj <- mesh.spheric.proj (m.skin, verbose = FALSE)
if (interactive()) {
  col <- hcl.colors (12, "Blue-Red 3")
  rgl::open3d()
  rgl::shade3d (m.proj$mesh, meshColors = "vertices",
                color = col[round ((m.proj$mesh$Lat/2 + 0.5) * 11) + 1],
                specular = "#404040")
  rgl::open3d()         
  rgl::shade3d (m.proj$mesh, meshColors = "vertices",
                color = col[round ((m.proj$mesh$Lon/2 + 0.5) * 11) + 1],
                specular = "#404040")
                
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.