FilterConnectedComponents¶
-
MLModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCluster
definition MLCluster.def see also ComputeConnectedComponents
,ConnectedComponentsToImage
,ConnectedComponentsInfo
keywords region
,segmentation
,cluster
,neighborhood
,select
Purpose¶
The module FilterConnectedComponents
filters and selects certain clusters that were computed by a connected component analysis.
Details¶
The input clusters are first filtered by their size. The filtering is optional. By default, all clusters are used for selection.
Then, a selection can be performed on the resulting cluster subset. All background voxels are stored in one cluster which cannot be selected.
The input cluster structure consists of voxel-based cluster information and a selection part. The output cluster structure shares the voxel-based cluster information of the input structure but yields its own selection information. So the output structure is a copy of the input structure but the memory-intensive clusters themselves are just shared.
Input Fields¶
inClusters¶
-
name:
inClusters
, type:
SelectedClusters(MLBase)
¶ - For accessing this object via scripting see the Scripting Reference:
MLSelectedClustersWrapper
.
inMarkerList¶
-
name:
inMarkerList
, type:
XMarkerList(MLBase)
¶ - For accessing this object via scripting see the Scripting Reference:
MLXMarkerListWrapper
.
Output Fields¶
outClusters¶
-
name:
outClusters
, type:
SelectedClusters(MLBase)
¶ - For accessing this object via scripting see the Scripting Reference:
MLSelectedClustersWrapper
.
Parameter Fields¶
Field Index¶
Clear : Trigger |
Cluster Size Interpretation : Enum |
Invert selection : Bool |
Max Cluster Size : Double |
Min Cluster Size : Double |
Selection Mode : Enum |
Update : Trigger |
Update Mode : Enum |
Visible Fields¶
Update Mode¶
-
name:
updateMode
, type:
Enum
, default:
AutoClear
¶ Defines the update behavior of this module.
Values:
Title | Name | Description |
---|---|---|
Clear | AutoClear | On any input or parameter field change, the module clears its output. |
Update | AutoUpdate | On any input or parameter field, the module filters/selects the output cluster structure anew. |
Min Cluster Size¶
-
name:
minClusterSize
, type:
Double
, default:
0
, minimum:
0
¶ Sets a minimum cluster size for filtering. See
Cluster Size Interpretation
.A value of 0 mean no filtering by a minimum size.
Max Cluster Size¶
-
name:
maxClusterSize
, type:
Double
, default:
-1
, minimum:
-1
¶ Sets a maximum cluster size for filtering. See
Cluster Size Interpretation
.A value of -1 means no filtering by a maximum size.
Cluster Size Interpretation¶
-
name:
clusterSizeInterpretation
, type:
Enum
, default:
Voxels
¶ Defines how the minimum and the maximum cluster size for filtering should be interpreted.
Values:
Title | Name | Description |
---|---|---|
Voxels | Voxels | The min and max sizes are interpreted as number of voxels. |
ml | ml | The min and max sizes are interpreted as milliliters. The cluster structure knows how many milliliters a voxel has. |
Invert selection¶
-
name:
shouldInvertSelection
, type:
Bool
, default:
FALSE
¶ If checked, the selection is inverted. Note that the background is never selected.
Selection Mode¶
-
name:
selectionMode
, type:
Enum
, default:
AllFiltered
¶ Defines the selection mode.
Values:
Title | Name | Description |
---|---|---|
All Filtered | AllFiltered | Sets all filtered clusters as selected. |
Selected By Coordinates | SelectedByCoordinates | Sets those clusters selected where at least one position of the module’s The markers are given in world position, the module converts those positions to voxel positions. Note that every cluster will only be selected once, even if more than one marker lies within the cluster. Also note that the background is never selected. |
Largest | Largest | Selects the largest cluster. If there are multiple largest clusters with the same size, the first of these clusters is selected. |
Largest On Slice | LargestOnSlice | Selects the largest cluster on each slice. Note that this mode is only available if the cluster algorithm was using a 2D neighborhood. If this option is chosen but the cluster algorithm was using a 3D neighborhood, an error message is printed to the console and the module does not select any cluster. |