Module: Interactive Top-Hat ()
The Top-Hat segmentation extracts small elements and details from given images. It detects the dark or the white area, corresponding to the valleys or the narrow peaks.
There exist two types of Top-Hat transform:
- The Black Top-Hat: it is defined as the difference between the cube closing with a given size kernel and the input image. The smaller is the kernel, the smaller are the elements in the Top-Hat image. A threshold allows selecting the darker elements of the Top-Hat result, i.e., the depth of the selected valleys. See Figure 1.
- The White Top-Hat: it is defined as the difference between the input image and its opening cube (using a given size kernel). The threshold allows selecting the brighter elements of the Top-Hat result.
![]()
Figure 1: Black Top-Hat computation The Top-Hat module is divided into two phases:
- The Top-Hat image computation, depending on the Top-Hat type and the closing/opening parameters; (step 1 and 2 on figure 1)
- The Thresholding, to select the valleys/narrow peaks depth. (step 3 on figure 1)
Data [required]
The input data to be segmented.
Top Hat Type [available on phase 1 / Top-hat computation]
This port allows selecting the type of Top-Hat to compute.Neighborhood [available on phase 1 / Top-hat computation]
Neighborhood is the neighborhood used for the morphological operation (closing for black Top-Hat, opening for white Top-Hat). It defines also the connectivity used for this operation.Kernel Size [available on phase 1 / Top-hat computation]
This port defines the kernel size for the closing/opening operation. The smaller is the kernel, the smaller are the elements detected.Colormap
The colormap used to display the input data.Slice Number
The number of the slice to display.Orientation
The orientation of the slice to display.Intensity Range [available on phase 2 / Thresholding]
This port allows selecting the elements to keep. See the module description for more information.Preview [available on phase 2 / Thresholding]
Options for the threshold preview. The color of the preview can be chosen in this port. Select 2D to display the threshold on the current displayed slice (default value). Select on 3D to get a 3D preview of the segmentation (slower display).Input [available on phase 2 / Thresholding]
This port allows displaying the threshold preview:
- On the original image (Original image)
- On the Top-Hat image, computed at the previous step (Top Hat image)
- On nothing (None): only the threshold will be displayed.