|
MeVisLab Toolbox Reference
|
Class for filtering/selection clusters. More...
#include <mlSelectedClusters.h>
Public Member Functions | |
| SelectedClusters (Clusters *clusters) | |
| SelectedClusters (SelectedClusters *selectedClusters) | |
| void | runSelectionByClusterSizes () |
| Runs the selection by cluster sizes. | |
| void | setSelectedAtVoxelPositions (const std::vector< ImageVector > &voxelPositions) |
| Sets the clusters at the given voxel positions selected. | |
| void | setSelectedByRank (MLuint rank) |
| Sets the cluster with the given rank selected. | |
| void | setLargestClusterSelected () |
| Sets only the largest cluster to be selected. | |
| bool | setLargestClusterOnEachSliceSelected () |
| Sets the largest cluster on each slice to be selected. | |
| MLuint | getNumSelectedClusters () const |
| Returns the number of selected clusters. | |
| bool | isSelected (MLint x, MLint y, MLint z) const |
| Returns whether a cluster at the position in the cluster volume is selected. | |
| bool | isSelected (MLuint clusterRank) const |
| Returns whether a cluster with the given rank is selected. | |
| void | deselectAllClusters () |
| Deselects all clusters. | |
| void | selectAllClusters () |
| Selects all clusters. | |
| void | setVolumeFactor (MLdouble volumeFactor) |
| Sets a volume factor for a single voxel for filtering by cluster size. | |
| void | setMinClusterSize (MLdouble minSize) |
| Sets the minimum cluster size under consideration of the volume factor. | |
| void | setMaxClusterSize (MLdouble maxSize) |
| Sets the maximum cluster size under consideration of the volume factor. | |
| void | setInvertSelection (bool shouldInvert) |
| Sets whether the whole selection should be inverted. | |
| bool | isSelectionInverted () const |
| Returns whether the selection should be inverted. | |
| void | setSelected (MLuint clusterRank, bool selectionState=true) |
| Sets the selection state of the cluster at the given rank. | |
| MLuint | getMinRankOfSelectedClusters () const |
| Returns the minimum rank of selected clusters, 0 if no cluster is selected. | |
| MLuint | getMaxRankOfSelectedClusters () const |
| Returns the maximum rank of selected clusters, 0 if no cluster is selected. | |
| Vector3 | getBoundingBoxMinOfSelectedClusters () const |
| Returns the min bounding box of the selected clusters, (-1,-1,-1) if no cluster is selected. | |
| Vector3 | getBoundingBoxMaxOfSelectedClusters () const |
| Returns the max 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. | |
| Vector3 | getBoundingBoxMaxOfClusterWithRank (MLuint rank) const |
| Returns the max bounding box of a cluster with the given rank. | |
| Clusters * | clusters () |
| Returns a pointer to the internal clusters. | |
Public Member Functions inherited from ml::RefCountedBase | |
| RefCountedBase () | |
| Constructor. | |
| RefCountedBase (const RefCountedBase &) | |
| Explicit copy constructor. | |
| virtual void | incRefCount () const |
| Increases the reference count. | |
| virtual void | decRefCount () const |
| Decreases the reference count (object will be deleted if the reference count is decremented to 0). | |
| bool | isRefCountedBase () const override |
| Returns whether the instance is derived from RefCountedBase. | |
Public Member Functions inherited from ml::EventSource | |
| EventSource () | |
| EventSource (const EventSource &evSource) | |
| ~EventSource () override | |
| void | addEventListener (BaseEventCallback *cb, void *userData) |
| Adds event listener callback to this Base object. | |
| void | removeEventListener (BaseEventCallback *cb, void *userData) |
| Removes event listener callback from this Base object. | |
| bool | hasEventListeners () const |
| Checks whether any event listeners have been added to this Base object; this can be used to skip the sendEvent call and the potentially expensive building of the event object altogether. | |
Public Member Functions inherited from ml::Base | |
| Base () | |
| Constructor. | |
| virtual | ~Base () |
| Destructor. | |
| virtual Base * | deepCopy () const |
| Creates a deep copy of the given object. | |
| bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const |
| Checks whether this object's type is equal to or derived from one of the types given in the argument. | |
| virtual std::string | detailString () const |
| Returns a string describing this object. | |
| virtual bool | implementsPersistence (PersistenceInterface) const |
| Override this method to declare which persistence interfaces are implemented by your derived class. | |
| virtual std::string | persistentState () const |
| Returns a string describing the object's internal state. | |
| virtual void | setPersistentState (const std::string &state) |
| Restores the object's internal state from a string that had been previously generated using persistentState(). | |
| virtual void | addStateToTree (TreeNode *) const |
| Attaches the object state as children of the given parent node. | |
| virtual void | readStateFromTree (TreeNode *) |
| Reads the object state from the children of the given parent node. | |
| virtual void | writeTo (AbstractPersistenceOutputStream *) const |
| Writes the objects state to the data stream object. | |
| virtual void | readFrom (AbstractPersistenceInputStream *, int) |
| Reads the objects state from the data stream object. | |
Additional Inherited Members | |
Public Types inherited from ml::Base | |
| enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
| This enum describes the different persistence interfaces available. More... | |
Static Public Member Functions inherited from ml::RefCountedBase | |
| static void | updateReferenceCountingIfSupported (Base *oldValue, Base *newValue, bool &isRefCountedBase) |
| Helper method that handles incrementing/decrementing of the reference count if base instances support it. | |
Protected Member Functions inherited from ml::RefCountedBase | |
| ~RefCountedBase () override | |
| Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. | |
Protected Member Functions inherited from ml::EventSource | |
| void | sendEvent (BaseEvent *event, void *skipListener=nullptr) |
| Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. | |
Protected Attributes inherited from ml::RefCountedBase | |
| std::atomic_int_least32_t | _refCount |
| Reference count. | |
Class for filtering/selection clusters.
Contains a pointer to the computed clusters and selection information. The actual clusters are not copied, so there can be successive filtering without wasting memory.
Definition at line 26 of file mlSelectedClusters.h.
| ml::SelectedClusters::SelectedClusters | ( | Clusters * | clusters | ) |
| ml::SelectedClusters::SelectedClusters | ( | SelectedClusters * | selectedClusters | ) |
|
inline |
Returns a pointer to the internal clusters.
Definition at line 93 of file mlSelectedClusters.h.
| void ml::SelectedClusters::deselectAllClusters | ( | ) |
Deselects all clusters.
Returns the max bounding box of a cluster with the given rank.
| Vector3 ml::SelectedClusters::getBoundingBoxMaxOfSelectedClusters | ( | ) | const |
Returns the max bounding box of the selected clusters, (-1,-1,-1) if no cluster is selected.
Returns the min bounding box of a cluster with the given rank.
| Vector3 ml::SelectedClusters::getBoundingBoxMinOfSelectedClusters | ( | ) | const |
Returns the min bounding box of the selected clusters, (-1,-1,-1) if no cluster is selected.
| MLuint ml::SelectedClusters::getMaxRankOfSelectedClusters | ( | ) | const |
Returns the maximum rank of selected clusters, 0 if no cluster is selected.
| MLuint ml::SelectedClusters::getMinRankOfSelectedClusters | ( | ) | const |
Returns the minimum rank of selected clusters, 0 if no cluster is selected.
| MLuint ml::SelectedClusters::getNumSelectedClusters | ( | ) | const |
Returns the number of selected clusters.
Returns whether a cluster at the position in the cluster volume is selected.
| bool ml::SelectedClusters::isSelected | ( | MLuint | clusterRank | ) | const |
Returns whether a cluster with the given rank is selected.
|
inline |
Returns whether the selection should be inverted.
Definition at line 72 of file mlSelectedClusters.h.
| void ml::SelectedClusters::runSelectionByClusterSizes | ( | ) |
Runs the selection by cluster sizes.
| void ml::SelectedClusters::selectAllClusters | ( | ) |
Selects all clusters.
|
inline |
Sets whether the whole selection should be inverted.
Note that the background cluster is never inverted.
Definition at line 70 of file mlSelectedClusters.h.
| bool ml::SelectedClusters::setLargestClusterOnEachSliceSelected | ( | ) |
Sets the largest cluster on each slice to be selected.
It is only searched within [minClusterSize..maxClusterSize]. This only works if the cluster algorithm was using a 2D neighborhood, returns whether the operation was successful.
| void ml::SelectedClusters::setLargestClusterSelected | ( | ) |
Sets only the largest cluster to be selected.
It is only searched within [minClusterSize..maxClusterSize].
|
inline |
Sets the maximum cluster size under consideration of the volume factor.
A value of -1 means no restriction.
Definition at line 66 of file mlSelectedClusters.h.
|
inline |
Sets the minimum cluster size under consideration of the volume factor.
Definition at line 63 of file mlSelectedClusters.h.
| void ml::SelectedClusters::setSelected | ( | MLuint | clusterRank, |
| bool | selectionState = true |
||
| ) |
Sets the selection state of the cluster at the given rank.
Note that the background cluster cannot be selected.
| void ml::SelectedClusters::setSelectedAtVoxelPositions | ( | const std::vector< ImageVector > & | voxelPositions | ) |
Sets the clusters at the given voxel positions selected.
| void ml::SelectedClusters::setSelectedByRank | ( | MLuint | rank | ) |
Sets the cluster with the given rank selected.
|
inline |
Sets a volume factor for a single voxel for filtering by cluster size.
Definition at line 61 of file mlSelectedClusters.h.