Learn R Programming

molaR (version 6.0)

DNE3dDiscard: Plot discarded-face results of a DNE analysis (HTML widget; no Quartz)

Description

Produces a three-dimensional rendering that highlights the faces discarded from the DNE calculation---boundary faces and statistical outliers---along with optional concavity marking. The plot is returned as an HTML widget with a simple, readable legend panel to the right.

Usage

DNE3dDiscard(
  DNE_File,
  baseCol = "gray",
  boundCol = "red",
  outlierCol = "lawngreen",
  concaveCol = baseCol,
  main = "",
  cex = 1,
  legend = TRUE,
  widget_size_px = 768,
  scene_zoom = 1.5,
  leftOffset = 0,
  fieldofview = 0,
  title_font_size_px = 30,
  legend_magnify = 1,
  legendTextCol = "black",
  legendLineCol = "black",
  fileName = NA,
  binary = FALSE
)

Value

An htmltools-browsable object containing the title, 3D widget, and legend.

Arguments

DNE_File

An object that stores the output of DNE()

baseCol

Base color for typical faces (default "gray")

boundCol

Color for boundary faces discarded from DNE (default "red")

outlierCol

Color for faces discarded as outliers (default "lawngreen")

concaveCol

Color for concave faces; when left equal to baseCol the concave category is not distinguished or shown in the legend (default = baseCol)

main

Character; plot title (default "")

cex

Numeric; relative size multiplier for legend text (default 1)

legend

Logical; show legend panel (default TRUE)

widget_size_px

Integer; square size of the 3D widget in pixels (default 768)

scene_zoom

Numeric; initial zoom on the 3D scene (default 1.5)

leftOffset

Numeric (-1..1); small horizontal camera nudge (default 0)

fieldofview

Numeric; field of view in degrees; 0 = isometric (default 0)

title_font_size_px

Integer; title font size in pixels (default 30)

legend_magnify

Numeric; additional legend scale factor (default 1)

legendTextCol

Color for legend text (default "black")

legendLineCol

Color for legend swatch borders/lines (default "black")

fileName

Character or NA; if non-NA, write a colorized *.ply to disk (default NA)

binary

Logical; write PLY as binary (default FALSE, i.e., ascii)

Details

Run DNE() first to compute per-face values and discard sets.

What this shows

  • Boundary faces (e.g., with >=1 boundary vertex) and outlier faces (top extreme tail) that were excluded from DNE are colored distinctly; all other faces get baseCol. If concaveCol differs from baseCol, concave regions are tinted accordingly and labeled in the legend.

HTML widget

  • Uses a headless rgl device and returns an rglwidget embedded beside a simple HTML legend (no Quartz window). Layout and centering mirror the updated DNE3d.

Saving a PLY

  • If fileName is provided, a colorized PLY is written. For ascii PLY, a comment line noting the generator/version is inserted (as in the updated DNE3d).

Examples

Run this code
# DNE_out <- DNE(Tooth)
if(interactive()){DNE3dDiscard(DNE_out, main = "DNE -- Discarded Faces")}

Run the code above in your browser using DataLab