VLscatter

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - VM/Voxels
Introduced first in SolidGeometry 2.1, Creation date: 2015-01-22, Last change: 2025-09-14

plots a vertex list with a corresponding image intensity list

Description

add a colorbar if desired
use colormap(jet) to see extrem values better


See Also: VLplotGraphics , VLplot , VLofVM

Example Illustration

 missing image of VLscatter(VL,C,n,cmap)

Syntax

h=VLscatter(VL,[C,n,cmap])

Input Parameter

VL: Vertex list
C: Intensity List (Hounsfield)
n: step size for vertex selection
cmap: optional colormap; such as 'gray'

Output Parameter

h: handle to plot

Examples

Scatter a Voxelmodel
VLscatter(VLofVM(V>1600),V(find(V>1600)),10);




Copyright 2015-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, VLscatter, is designed to plot a vertex list with a corresponding image intensity list. It is part of the SG-Library and was introduced in SolidGeometry 2.1. The function is used to visualize voxel models by plotting vertices in 3D space with color intensities.

Input Parameters

Output Results

Algorithm Steps

  1. Check if VL is a 3D matrix. If so, an error is raised, suggesting the use of VMscatter for 3D matrices.
  2. If VL has only two columns, a z-coordinate is added using VLaddz.
  3. Retrieve the intensity list C from the input parameters. If not provided, a default intensity of 4096 is used for all vertices.
  4. Retrieve the step size n from the input parameters. If not provided, a default value of 1 is used.
  5. Retrieve the colormap cmap from the input parameters. If provided, it is applied to the plot.
  6. Set the color limits of the plot to [0, 4095].
  7. Use scatter3 to plot the vertices in 3D space, using the specified step size n and color intensities C. The size of the markers is set to 20*n, and the markers are filled.
  8. Set the color limits to auto, allowing the plot to adjust based on the data.

The function is useful for visualizing voxel models by plotting a subset of vertices with color intensities, allowing for a clear representation of the data in 3D space.

Algorithm explaination created using ChatGPT on 2025-08-19 06:48. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21