ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members

#include <itkWatershedSegmentTable.h>

+ Inheritance diagram for itk::watershed::SegmentTable< TScalar >:
+ Collaboration diagram for itk::watershed::SegmentTable< TScalar >:

Classes

struct  edge_pair_t
 
struct  segment_t
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using ScalarType = TScalar
 
using Self = SegmentTable
 
using Superclass = DataObject
 
- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector< Pointer >::size_type
 
using Pointer = SmartPointer< Self >
 
using Self = DataObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::DataObject
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual void Initialize ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual void PrepareForNewData ()
 
virtual void DataHasBeenGenerated ()
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual bool VerifyRequestedRegion ()
 
virtual void CopyInformation (const DataObject *)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void Graft (const DataObject *)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
using edge_list_t = std::list< edge_pair_t >
 
using HashMapType = std::unordered_map< IdentifierType, segment_t >
 
using Iterator = typename HashMapType::iterator
 
using ConstIterator = typename HashMapType::const_iterator
 
using ValueType = typename HashMapType::value_type
 
using DataType = typename HashMapType::mapped_type
 
HashMapType m_HashMap
 
ScalarType m_MaximumDepth
 
bool Add (IdentifierType a, const segment_t &t)
 
void PruneEdgeLists (ScalarType maximum_saliency)
 
segment_tLookup (const IdentifierType a)
 
const segment_tLookup (const IdentifierType a) const
 
bool IsEntry (const IdentifierType a) const
 
void Erase (const IdentifierType a)
 
void Clear ()
 
bool Empty () const
 
void SortEdgeLists ()
 
HashMapType::size_type Size () const
 
Iterator Begin ()
 
Iterator End ()
 
ConstIterator Begin () const
 
ConstIterator End () const
 
unsigned int GetSegmentMemorySize () const
 
void SetMaximumDepth (ScalarType s)
 
ScalarType GetMaximumDepth () const
 
void Copy (const Self &o)
 
 SegmentTable ()
 
 ~SegmentTable () override=default
 
void operator= (const Self &)
 

Additional Inherited Members

- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
 ~DataObject () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void PropagateResetPipeline ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TScalar>
class itk::watershed::SegmentTable< TScalar >

A table for storing segmentation information in various component filters of the watershed segmentation algorithm. See itk::WatershedImageFilter for an overview.

This is a hash table that holds information about labeled segments in an image. Keys in the table are label values (IdentifierType). Each entry in the table records the minimum value in the segment region and a list of all the adjacent segments in the image. The adjacency (edge) list also holds a saliency value (likelihood of merge) for each adjacency.
See also
itk::WatershedImageFilter

Definition at line 48 of file itkWatershedSegmentTable.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::ConstIterator = typename HashMapType::const_iterator

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 105 of file itkWatershedSegmentTable.h.

◆ ConstPointer

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::ConstPointer = SmartPointer<const Self>

Definition at line 56 of file itkWatershedSegmentTable.h.

◆ DataType

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::DataType = typename HashMapType::mapped_type

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 107 of file itkWatershedSegmentTable.h.

◆ edge_list_t

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::edge_list_t = std::list<edge_pair_t>

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 93 of file itkWatershedSegmentTable.h.

◆ HashMapType

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::HashMapType = std::unordered_map<IdentifierType, segment_t>

Define the container type for the table

Definition at line 103 of file itkWatershedSegmentTable.h.

◆ Iterator

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::Iterator = typename HashMapType::iterator

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 104 of file itkWatershedSegmentTable.h.

◆ Pointer

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::Pointer = SmartPointer<Self>

Definition at line 55 of file itkWatershedSegmentTable.h.

◆ ScalarType

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::ScalarType = TScalar

Definition at line 57 of file itkWatershedSegmentTable.h.

◆ Self

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::Self = SegmentTable

Define smart pointers for this object

Definition at line 53 of file itkWatershedSegmentTable.h.

◆ Superclass

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::Superclass = DataObject

Definition at line 54 of file itkWatershedSegmentTable.h.

◆ ValueType

template<typename TScalar >
using itk::watershed::SegmentTable< TScalar >::ValueType = typename HashMapType::value_type

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 106 of file itkWatershedSegmentTable.h.

Constructor & Destructor Documentation

◆ SegmentTable()

template<typename TScalar >
itk::watershed::SegmentTable< TScalar >::SegmentTable ( )
inlineprotected

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 275 of file itkWatershedSegmentTable.h.

◆ ~SegmentTable()

template<typename TScalar >
itk::watershed::SegmentTable< TScalar >::~SegmentTable ( )
overrideprotecteddefault

Structure for storing lists of adjacencies (edges) and their saliencies.

Member Function Documentation

◆ Add()

template<typename TScalar >
bool itk::watershed::SegmentTable< TScalar >::Add ( IdentifierType  a,
const segment_t t 
)

Inserts a segment into the table

◆ Begin() [1/2]

template<typename TScalar >
Iterator itk::watershed::SegmentTable< TScalar >::Begin ( )
inline

Merges two entries of the table. from->to
Returns an iterator pointing to the first element in the (unordered) table.

Definition at line 210 of file itkWatershedSegmentTable.h.

◆ Begin() [2/2]

template<typename TScalar >
ConstIterator itk::watershed::SegmentTable< TScalar >::Begin ( ) const
inline

Returns a const iterator pointing to the first element in the (unordered) table.

Definition at line 226 of file itkWatershedSegmentTable.h.

◆ Clear()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::Clear ( )
inline

Removes all the entries in the table.

Definition at line 179 of file itkWatershedSegmentTable.h.

◆ Copy()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::Copy ( const Self o)
inline

Copies the contents of another segment table into this segment table. This is really operator= in disguise, although superclass information is not copied.

Definition at line 268 of file itkWatershedSegmentTable.h.

◆ CreateAnother()

template<typename TScalar >
virtual::itk::LightObject::Pointer itk::watershed::SegmentTable< TScalar >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ Empty()

template<typename TScalar >
bool itk::watershed::SegmentTable< TScalar >::Empty ( ) const
inline

Returns true if the table is empty and false if the table is not empty.

Definition at line 187 of file itkWatershedSegmentTable.h.

◆ End() [1/2]

template<typename TScalar >
Iterator itk::watershed::SegmentTable< TScalar >::End ( )
inline

Returns an iterator pointing to one element past the last element in the (unordered table).

Definition at line 218 of file itkWatershedSegmentTable.h.

◆ End() [2/2]

template<typename TScalar >
ConstIterator itk::watershed::SegmentTable< TScalar >::End ( ) const
inline

Returns a const iterator pointing to one element past the last element in the (unordered table).

Definition at line 234 of file itkWatershedSegmentTable.h.

◆ Erase()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::Erase ( const IdentifierType  a)
inline

Deletes an entry from the table.

Definition at line 172 of file itkWatershedSegmentTable.h.

◆ GetMaximumDepth()

template<typename TScalar >
ScalarType itk::watershed::SegmentTable< TScalar >::GetMaximumDepth ( ) const
inline

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 259 of file itkWatershedSegmentTable.h.

◆ GetNameOfClass()

template<typename TScalar >
virtual const char* itk::watershed::SegmentTable< TScalar >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::DataObject.

◆ GetSegmentMemorySize()

template<typename TScalar >
unsigned int itk::watershed::SegmentTable< TScalar >::GetSegmentMemorySize ( ) const
inline

Convenience methods for debugging

Definition at line 241 of file itkWatershedSegmentTable.h.

◆ IsEntry()

template<typename TScalar >
bool itk::watershed::SegmentTable< TScalar >::IsEntry ( const IdentifierType  a) const
inline

Returns TRUE if the entry key is found in the table. FALSE if the key is not found in the table.

Definition at line 157 of file itkWatershedSegmentTable.h.

◆ Lookup() [1/2]

template<typename TScalar >
segment_t* itk::watershed::SegmentTable< TScalar >::Lookup ( const IdentifierType  a)
inline

Lookup a segment in the table. Returns a pointer to the entry. On failure, returns a null pointer.

Definition at line 123 of file itkWatershedSegmentTable.h.

◆ Lookup() [2/2]

template<typename TScalar >
const segment_t* itk::watershed::SegmentTable< TScalar >::Lookup ( const IdentifierType  a) const
inline

Lookup a segment in the table. Returns a const pointer to the entry. On failure, returns a null pointer.

Definition at line 140 of file itkWatershedSegmentTable.h.

◆ New()

template<typename TScalar >
static Pointer itk::watershed::SegmentTable< TScalar >::New ( )
static

◆ operator=()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::operator= ( const Self )
inlineprivate

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 286 of file itkWatershedSegmentTable.h.

◆ PruneEdgeLists()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::PruneEdgeLists ( ScalarType  maximum_saliency)

Iterates through the table and removes edges in every edge list whose saliencies are above the specified maximum. Requires that the edge lists have been sorted prior to calling this method.

◆ SetMaximumDepth()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::SetMaximumDepth ( ScalarType  s)
inline

Set/Get the maximum depth of image on which this segment table is based. (Should set really be calling modified? jc 11/16/01)

Definition at line 251 of file itkWatershedSegmentTable.h.

◆ Size()

template<typename TScalar >
HashMapType::size_type itk::watershed::SegmentTable< TScalar >::Size ( ) const
inline

Returns the number of entries in the table.

Definition at line 199 of file itkWatershedSegmentTable.h.

◆ SortEdgeLists()

template<typename TScalar >
void itk::watershed::SegmentTable< TScalar >::SortEdgeLists ( )

Sorts all the entries in the edge lists from least to greatest saliency.

Member Data Documentation

◆ m_HashMap

template<typename TScalar >
HashMapType itk::watershed::SegmentTable< TScalar >::m_HashMap
protected

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 280 of file itkWatershedSegmentTable.h.

◆ m_MaximumDepth

template<typename TScalar >
ScalarType itk::watershed::SegmentTable< TScalar >::m_MaximumDepth
protected

Structure for storing lists of adjacencies (edges) and their saliencies.

Definition at line 282 of file itkWatershedSegmentTable.h.


The documentation for this class was generated from the following file: