ConvexHull

MLModule
genre Region
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLFuzzy
definition MLFuzzy.def
see also Rank
keywords gaps, holes, close, 2D

Purpose

The module ConvexHull calculates the 2D (slice-wise) convex hull of one or more objects.

Objects are defined by voxels of the same non-zero value. For every object in the image, first all pixels with at least one zero valued neighbor are collected and then connected. After that, holes inside the object are filled. Background pixels are assigned zero values.

Note that the module is designed to find multiple objects in an image. All those different objects need to be identify-able by their unique voxel values. The input image is scanned Num Objects-times (which may be slow for large numbers of objects), and at each scan the input image is investigated to contain voxels with the value of the current object number.

Details

Depending on the object size the calculation can take a while but is quite fast for 2D.

If the module’s Num Objects field is set to 1 (default), only voxels with value 1 are taken into consideration for computing the convex hull.

If the input image yields an object consisting of voxels with a value of, for example, 255, the Num Objects field needs to be set to 255 in order to detect the object in the input image correctly. Note that this would also result in 254 scans of the entire input image with no objects to be found and in a 255th scan that finally detects the object. In such a case, leave the Num Objects field to 1 and alter the input image’s object voxel values to 1 (e.g. by using a Scale or thresholding module).

Windows

Default Panel

../../../Modules/ML/MLFuzzy/mhelp/Images/Screenshots/ConvexHull._default.png

Input Fields

input0

name: input0, type: Image

The input image of a scalar type.

Since the objects are found by their voxel value and this value needs to correspond to the object number, the objects’ voxel values should be of an integer type.

Output Fields

output0

name: output0, type: Image

The convex hull of the objects in the input image.

The voxel values of the convex hull(s) in the output image correspond to the object number and thus to the voxel values in the input image.

Parameter Fields

Visible Fields

Num Objects

name: numObjects, type: Integer, default: 0

Sets the number of objects to scan for and by that, the number of scans. In each scan, the module searches for objects with the voxel value that correspond to the current object number

If the field is set to 2, the module scans first for voxels of value 1 forming an object, and then for voxels with value 2, forming another object.