FuzzyCluster¶
- MLModule¶
genre
author
package
dll
definition
see also
keywords
Purpose¶
The module FuzzyCluster implements a fuzzy c-means algorithm that classifies an image into different clusters based on the gray values.
Image voxels are assigned a membership value ranging from 0 to 1 for each cluster. This allows, for example, the segmentation of regions in the image by selecting clusters and applying membership thresholds.
Usage¶
Choose a number of classes you want the image to be classified into. Press the Calculate Cluster button. Since the calculation can be quite time-consuming, it is only started on demand and even then only if essential fields (Fuzziness, Epsilon, etc.) were changed.
output1 always shows all clusters, with voxels assigned to the clusters in which they have the highest membership (this is what you usually want). To be able to see something at output0, you also have to provide one or more valid markers at the inputMarkersVol input. After changing the markers, you will need to press Calculate Cluster again, to see the clusters corresponding to the marked voxels. By adjusting the Membership Threshold, you can define how high the membership of a voxel in relation to the chosen clusters has to be to be included in the output0 image.
It is highly recommended to use only images of an integer type (int, uint, etc.) as input!
The calculation time is significantly higher for floating-point images, and the module cannot handle large non-integer images.
Details¶
For details about the algorithm, read this.
Windows¶
Default Panel¶
Input Fields¶
input0¶
- name: input0, type: Image¶
The scalar input image.
inputMarkersVol¶
- name: inputMarkersVol, type: XMarkerList(MLBase)¶
XMarkerList for selecting a specific cluster for
output0.For accessing this object via scripting, see the Scripting Reference:
MLXMarkerListWrapper.
Output Fields¶
output0¶
- name: output0, type: Image¶
Output image showing the selected clusters.
The background voxels have value 0, the cluster voxels maximum image value.
output1¶
- name: output1, type: Image¶
Output image showing all clusters.
The gray value of a voxel represents the index of the cluster it most belongs to.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
Num Classes¶
- name: classes, type: Integer, default: 3¶
Sets the number of clusters into which the image will be divided.
Max Membership Difference¶
- name: calcCounter, type: Double, persistent: no¶
Shows the value difference between the current and the previous calculation.
Epsilon¶
Membership Threshold¶
Fuzziness¶
- name: fuzziness, type: Double, default: 2, minimum: 1, maximum: 5¶
Sets the fuzzyness parameter.
Calculate Cluster¶
- name: cluster, type: Trigger¶
When pressed, the module computes the output anew.
Use gray value limit¶
- name: useGrayValueLimit, type: Bool, default: FALSE¶
If checked, the module works only on voxels with a value within
Lower Gray Value LimitandUpper Gray Value Limit.
Lower Gray Value Limit¶
- name: lowerGrayValueLimit, type: Double, default: 0¶
Sets the lower gray value limit for cluster computation.
Upper Gray Value Limit¶
- name: upperGrayValueLimit, type: Double, default: 4095¶
Sets the upper gray value limit for cluster computation.
Cluster Index¶
- name: clusterIndex, type: Integer, default: 0¶
Sets the index of the cluster for which information should be displayed.
Value of Center¶
- name: clusterCenterGray, type: Double, persistent: no¶
Shows the gray value of the center of the cluster selected with
Cluster Index.
Iteration Limit¶
- name: iterationLimit, type: Integer, default: 1000¶
Sets the maximum amount of iterations that are performed in the fuzzy c-means calculation.
This is needed for cases where the fuzzy clustering does not converge.
A value of 0 means no limit.
Performed Iterations¶
- name: performedIterations, type: Integer, persistent: no¶
Shows the number of performed iterations.
If this field shows the same number as
Iteration Limit, the fuzzy clustering probably did not converge.