XMarkerListPruning¶
- MLModule¶
author
Christian Schumann
package
dll
definition
see also
keywords
Purpose¶
Reduces an XMarkerList by iteratively keeping a marker and removing nearby markers within an axis-aligned ellipsoid centered on it.
Usage¶
Connect an XMarkerList to inXMarkerList and set Prune Ellipse Radii in world-coordinate units. Optionally connect a radius image to inPruneEllipseRadii and enable Use extern radii. Press Update to compute the result, or select AutoUpdate in Update Mode for automatic updates.
Details¶
The first remaining input marker is copied to the output unchanged. All other remaining markers on or inside its pruning ellipsoid are removed. This process repeats until no markers remain. The result depends on input order, and retained markers preserve their original order and attributes.
Only the x, y and z coordinates contribute to the distance test. For nonzero radii, a marker is removed when the sum of the squared coordinate offsets divided by the corresponding squared radii is at most one. A zero radius requires an exactly matching coordinate on that axis; any nonzero offset on that axis places the marker outside the ellipsoid. Negative radii produce the same distance test as their positive magnitudes.
With external radii enabled, the image is sampled separately at each retained marker. Its x, y and z world coordinates are mapped to image voxel coordinates, while its c, t and u coordinates select the corresponding image dimensions. All six coordinates are rounded down to integer voxel indices; no interpolation is performed. Up to three whitespace-separated numeric components of the voxel value replace the x, y and z radii in order. Zero components and components not supplied by the voxel value leave the corresponding configured radii unchanged. If no valid image is available or the sampling position is outside the image or non-finite, the configured radii are used.
Interaction¶
Pruning is controlled through the parameter panel. Changing an input, the radii, the external-radii setting or the update mode marks the result as requiring an update; Update Mode determines whether the output is retained, recomputed or cleared.
Tips¶
Arrange the input list so that preferred markers occur first. Use equal positive radii for spherical pruning, unequal radii for anisotropic pruning, or zero radii to restrict removal to markers with matching coordinates on selected axes. A radius image can vary the pruning neighborhood for each retained marker.
Windows¶
The panel provides pruning radii, optional image-based radii and update controls.
Input Fields¶
An XMarkerList is required for pruning. The radius image is optional.
inPruneEllipseRadii¶
- name: inPruneEllipseRadii, type: Image¶
Optional image supplying local pruning radii when
Use extern radiiis enabled. It is sampled at each retained marker as described in Details. Nonzero numeric voxel components override the corresponding values ofPrune Ellipse Radii; zero or unavailable components retain the configured values.
inXMarkerList¶
- name: inXMarkerList, type: XMarkerList(MLBase)¶
Input markers in pruning priority order. The first remaining marker is retained at each iteration. Only spatial coordinates determine which other markers are removed.
For accessing this object via scripting, see the Scripting Reference:
MLXMarkerListWrapper.
Output Fields¶
The output contains the retained subset of the input markers.
outXMarkerList¶
- name: outXMarkerList, type: XMarkerList(MLBase)¶
Pruned XMarkerList with retained markers copied unchanged and in input order. An empty input list produces an empty output list. Updating without a valid input XMarkerList sets this field to null.
For accessing this object via scripting, see the Scripting Reference:
MLXMarkerListWrapper.
Parameter Fields¶
Configure the pruning neighborhood and when the output is refreshed.
Visible Fields¶
Prune Ellipse Radii¶
- name: pruneEllipseRadii, type: Vector3, default: 1 1 1¶
Radii of the axis-aligned pruning ellipsoid along x, y and z, in world-coordinate units. Markers on the ellipsoid boundary are removed as well. A zero radius restricts removal to markers whose coordinate exactly matches the retained marker on that axis. These values also serve as fallback radii for image sampling.
Use extern radii¶
- name: useExternRadii, type: Bool, default: FALSE¶
Enables sampling of
inPruneEllipseRadiito obtain local radii at each retained marker. When disabled, onlyPrune Ellipse Radiiis used.
Update Mode¶
- name: updateMode, type: Enum, default: Off¶
Controls the response to changes in inputs, pruning parameters and the update mode itself.
Values:
Title |
Name |
Description |
|---|---|---|
Off |
Off |
Keeps the current output unchanged until |
Auto Update |
AutoUpdate |
Recomputes the pruned list automatically when an input, pruning parameter or the update mode changes. |
Auto Clear |
AutoClear |
Clears the output list when an input, pruning parameter or the update mode changes. Press |
Update¶
- name: update, type: Trigger¶
Computes the pruned list if an update is pending. Repeated presses without relevant changes do not recompute the result. This trigger works in all update modes.