ComputeMajorAxis

MLModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLGeometry1
definition MLGeometry1.def

Purpose

The ComputeMajorAxis computes the longest diameter of a segmentation mask on a set of 2D slices. The background is defined as 0, and every other voxel value is considered ‘inside.’ Typically, the ‘inside’ voxel value should be set to 1.

This module runs separately on each of the 2D slices and identifies the slice with the longest diameter. It does not perform a connected components analysis, meaning the diameters will not account for the connectedness of voxels. If there are separated objects on the slice, the diameter will span across those objects.

The algorithm supports concave objects but will only calculate the largest diameter on the convex hull of the concave object. This means the resulting axis might partially lie outside the object, for example, when measuring the largest diameter of a banana.

If only a single voxel is found, the extent will be set to the maximum of the voxel size in the x and y directions, and the major axis points will be positioned at the center of that voxel.

The minor axis is less precise compared to the major axis, as it is determined by scanning the image along perpendicular line segments to the major axis. The identified minor axis positions are snapped to the voxel center, meaning the resulting minor axis is only approximately perpendicular to the major axis.

Parameter Fields

Field Index

Compute Minor Axis: Bool Update: Trigger
Major Axis Extent: Double Valid: Bool
Major Axis Point0: Vector3  
Major Axis Point1: Vector3  
Minor Axis Extent: Double  
Minor Axis Point0: Vector3  
Minor Axis Point1: Vector3  
Minor Valid: Bool  

Visible Fields

Major Axis Point0

name: majorAxisPoint0, type: Vector3, persistent: no

Shows the starting point of the major axis (in world coordinates).

This is set to the center of the starting voxel.

Major Axis Point1

name: majorAxisPoint1, type: Vector3, persistent: no

Shows the end point of the major axis (in world coordinates).

This is set to the center of the end voxel.

Major Axis Extent

name: majorAxisExtent, type: Double, persistent: no

Shows the extent of the major diameter from voxel center to voxel center.

Minor Axis Point0

name: minorAxisPoint0, type: Vector3, persistent: no

Shows the starting point of the minor axis.

Minor Axis Point1

name: minorAxisPoint1, type: Vector3, persistent: no

Shows the end point of the minor axis.

Minor Axis Extent

name: minorAxisExtent, type: Double, persistent: no

Shows the extent of the minor axis.

Update

name: update, type: Trigger

Calculates the axes and diameters.

Valid

name: valid, type: Bool, persistent: no

Shows whether the major axis is valid.

Minor Valid

name: minorValid, type: Bool, persistent: no

Shows whether the minor axis is valid.

Compute Minor Axis

name: computeMinorAxis, type: Bool, default: TRUE

If checked, the minor axis will be calculated as well.

If only the major axis is required, it is recommended to keep this option disabled, as calculating the minor axis requires additional performance.