List of my modules...
Module: Topological Numbers
Description:
Computes Minkowsky functionals and/or Betti numbers, with normal or periodic boundary conditions.
If this is the object on which to compute topological numbers (this is the motor.am volume from Avizo's data\tutorials directory, binarized at greater than 128), then the module gives, for non-periodic boundaries, e.g. an Euler cahracteristic of 143 (the fourth Minkowsky functional), and a number of tunnels of 191 (Betti number b1).
NOTES:
- The results are displayed in information ports, shown depending on which numbers were asked for: port Minkowski for the Minkowski functionals (in the following order: volume, surface, mean breadth, Euler number), port Betti for the Betti numbers (b0, b1, b2).
Connections:
Data
[required]
The input image, of type HxUniformScalarField3 comes in through this port.
Ports:
Threshold

Used to define, along with the comparison operator, which pixels are in the object.
Comparison

Used to define how the threshold value is used for defining the object.
Value

Chooses which numbers to compute (if you choose none, it will go very fast).
Boundary_conditions

For periodic boundary conditions, a neighbourhood of a pixel on the left side of the image contains pixels of the right side.
Action button

Push the button to start the computation.
Commands:
Additional options can be accessed when typing in the console Topological_Numbers COMMAND_NAME. Typing the command again usually reverts back to original settings.
verbose
Displays internal numbers used to compute the topological numbers. Also displays timing information for the computation. Retype to hide info.
create
Runs the computation. Although the numbers are displayed in the relevant information ports, they can be read more easily in a script with a command such as set _nums [Topological_Numbers create].
Scripting:
Typical use in a TCL script would look like so:
set TN [create Topological_Numbers]
$TN Image connect $INPUT_IMAGE; $TN fire
$TN Number setValue 0 0; $TN Number setValue 1 1;
set _nums [$TN create]
set nbTunnels [lindex $_nums 2]