VMintensityscale

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - VM/Voxels
Introduced first in SolidGeometry 3.8, Creation date: 2017-04-02, Last change: 2025-09-14

returns an intensity scaled voxel image



See Also: VMplot , VMmontage , VMresize

Example Illustration

 missing image of VMintensityscale(V,cax)

Syntax

[c,V]=VMintensityscale(V,[cax])

Input Parameter

V: Voxel mode
cax: desired intensity interval; default is [0 1]

Output Parameter

c: [minc maxc]
V: scaled to 0 to 1

Examples


load AIM.mat
VMintensityscale(V)




Copyright 2017-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, VMintensityscale, is designed to scale the intensity of a voxel image to a specified range. It is part of the SG-Library and was introduced in SolidGeometry 3.8.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize cax to [0, 1]. If a second argument is provided and is not empty, update cax with this value.
  2. Calculate the minimum and maximum intensity values of the voxel model V and store them in c.
  3. Store the original voxel model in VO for later use.
  4. Scale the voxel model V to the range [0, 1] using the formula: V = (V - c(1)) / (c(2) - c(1)).
  5. Adjust the scaled voxel model to the desired intensity range specified by cax using the formula: V = V * (cax(2) - cax(1)) + cax(1).
  6. If a second argument is provided, update c with the scaled voxel model V.
  7. If no output arguments are specified, display a histogram of the original voxel model VO and print the intensity range.

Example Usage

To use this function, load a voxel model from a file (e.g., AIM.mat) and call VMintensityscale(V) to scale its intensity.

Algorithm explaination created using ChatGPT on 2025-08-18 23:38. (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