mesh.repair: Repair of a mesh

View source: R/mesh_repair.R

mesh.repairR Documentation

Repair of a mesh

Description

The mesh.repair function repairs holes in a mesh class object.

Usage

mesh.repair(mesh, verbose = TRUE)

Arguments

mesh

"mesh" class object.

verbose

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

Value

Returns a mesh, repaired by removing degenerated triangles and filling holes.

Examples

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

# creation of the gizzard mesh
bin <- bin.from.roi(CT, struct = S, roi.name = "gizzard", verbose = FALSE)
mesh.gizzard <- mesh.from.bin(bin, alias = "gizzard", verbose = FALSE)

repair.mesh.gizzard <- mesh.repair(mesh.gizzard, verbose = FALSE)
str(mesh.gizzard)
str(repair.mesh.gizzard)

espadon documentation built on May 8, 2026, 9:07 a.m.