13#ifndef ML_SELECTED_CLUSTERS_H
14#define ML_SELECTED_CLUSTERS_H
101 void clearSelectionStates();
104 bool isInsideImage(
const ImageVector& position);
105 void invertSelection();
107 std::vector<char> _isSelected;
114 bool _invertSelection;
116 bool _hasInputSelection;
117 std::vector<char> _isInputSelected;
119 bool isEligibleForSelection(
const ClusterInfo&
cInfo,
MLuint& rank);
#define MLCLUSTERALGORITHM_EXPORT
Structure computes and holds all cluster information. For internal use.
RefCountedBase class adds intrusive reference counting support to the Base class.
Class for filtering/selection clusters.
MLuint getNumSelectedClusters() const
Returns the number of selected clusters.
MLuint getMaxRankOfSelectedClusters() const
Returns the maximum rank of selected clusters, 0 if no cluster is selected.
SelectedClusters(Clusters *clusters)
void setSelected(MLuint clusterRank, bool selectionState=true)
Sets the selection state of the cluster at the given rank.
void setLargestClusterSelected()
Sets only the largest cluster to be selected.
Vector3 getBoundingBoxMaxOfSelectedClusters() const
Returns the max bounding box of the selected clusters, (-1,-1,-1) if no cluster is selected.
void setMaxClusterSize(MLdouble maxSize)
Sets the maximum cluster size under consideration of the volume factor.
SelectedClusters(SelectedClusters *selectedClusters)
Vector3 getBoundingBoxMinOfSelectedClusters() const
Returns the min bounding box of the selected clusters, (-1,-1,-1) if no cluster is selected.
Vector3 getBoundingBoxMinOfClusterWithRank(MLuint rank) const
Returns the min bounding box of a cluster with the given rank.
void selectAllClusters()
Selects all clusters.
void runSelectionByClusterSizes()
Runs the selection by cluster sizes.
Clusters * clusters()
Returns a pointer to the internal clusters.
bool isSelected(MLint x, MLint y, MLint z) const
Returns whether a cluster at the position in the cluster volume is selected.
bool setLargestClusterOnEachSliceSelected()
Sets the largest cluster on each slice to be selected.
void setMinClusterSize(MLdouble minSize)
Sets the minimum cluster size under consideration of the volume factor.
MLuint getMinRankOfSelectedClusters() const
Returns the minimum rank of selected clusters, 0 if no cluster is selected.
bool isSelectionInverted() const
Returns whether the selection should be inverted.
void deselectAllClusters()
Deselects all clusters.
Vector3 getBoundingBoxMaxOfClusterWithRank(MLuint rank) const
Returns the max bounding box of a cluster with the given rank.
void setVolumeFactor(MLdouble volumeFactor)
Sets a volume factor for a single voxel for filtering by cluster size.
void setSelectedByRank(MLuint rank)
Sets the cluster with the given rank selected.
void setSelectedAtVoxelPositions(const std::vector< ImageVector > &voxelPositions)
Sets the clusters at the given voxel positions selected.
void setInvertSelection(bool shouldInvert)
Sets whether the whole selection should be inverted.
bool isSelected(MLuint clusterRank) const
Returns whether a cluster with the given rank is selected.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_REFCOUNTED_PTR(CLASSNAME)
Macro that defines convenience Ptr/ConstPtr typedefs to be used instead of intrusive_ptr templates.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...