ITK  4.6.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
itk::watershed::SegmentTable< TScalar > Class Template Reference

#include <itkWatershedSegmentTable.h>

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

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 47 of file itkWatershedSegmentTable.h.

Classes

struct  edge_pair_t
 
struct  segment_t
 

Public Types

typedef HashMapType::const_iterator ConstIterator
 
typedef SmartPointer< const SelfConstPointer
 
typedef HashMapType::data_type DataType
 
typedef std::list< edge_pair_tedge_list_t
 
typedef itksys::hash_map
< IdentifierType, segment_t,
itksys::hash< IdentifierType > > 
HashMapType
 
typedef HashMapType::iterator Iterator
 
typedef SmartPointer< SelfPointer
 
typedef TScalar ScalarType
 
typedef SegmentTable Self
 
typedef DataObject Superclass
 
typedef HashMapType::value_type ValueType
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

bool Add (IdentifierType a, const segment_t &t)
 
Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 
void Copy (const Self &o)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
bool Empty () const
 
Iterator End ()
 
ConstIterator End () const
 
void Erase (const IdentifierType a)
 
ScalarType GetMaximumDepth () const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetSegmentMemorySize () const
 
segment_tLookup (const IdentifierType a)
 
const segment_tLookup (const IdentifierType a) const
 
void PruneEdgeLists (ScalarType maximum_saliency)
 
HashMapType::size_type Size () const
 
void SortEdgeLists ()
 
bool IsEntry (const IdentifierType a) const
 
void SetMaximumDepth (ScalarType s)
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointerForwardReference
< ProcessObject
GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Graft (const DataObject *)
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
virtual bool VerifyRequestedRegion ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) 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
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
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 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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 SegmentTable ()
 
virtual ~SegmentTable ()
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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

HashMapType m_HashMap
 
ScalarType m_MaximumDepth
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

Private Member Functions

void operator= (const Self &)
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

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

Definition at line 98 of file itkWatershedSegmentTable.h.

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

Definition at line 54 of file itkWatershedSegmentTable.h.

template<typename TScalar >
typedef HashMapType::data_type itk::watershed::SegmentTable< TScalar >::DataType

Definition at line 100 of file itkWatershedSegmentTable.h.

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

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

Definition at line 86 of file itkWatershedSegmentTable.h.

template<typename TScalar >
typedef itksys::hash_map< IdentifierType, segment_t, itksys::hash< IdentifierType > > itk::watershed::SegmentTable< TScalar >::HashMapType

Define the container type for the table

Definition at line 96 of file itkWatershedSegmentTable.h.

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

Definition at line 97 of file itkWatershedSegmentTable.h.

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

Definition at line 53 of file itkWatershedSegmentTable.h.

template<typename TScalar >
typedef TScalar itk::watershed::SegmentTable< TScalar >::ScalarType

Definition at line 55 of file itkWatershedSegmentTable.h.

template<typename TScalar >
typedef SegmentTable itk::watershed::SegmentTable< TScalar >::Self

Define smart pointers for this object

Definition at line 51 of file itkWatershedSegmentTable.h.

template<typename TScalar >
typedef DataObject itk::watershed::SegmentTable< TScalar >::Superclass

Definition at line 52 of file itkWatershedSegmentTable.h.

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

Definition at line 99 of file itkWatershedSegmentTable.h.

Constructor & Destructor Documentation

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

Definition at line 210 of file itkWatershedSegmentTable.h.

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

Definition at line 213 of file itkWatershedSegmentTable.h.

Member Function Documentation

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

Inserts a segment into the table

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

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

Definition at line 166 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

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

Definition at line 174 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

Removes all the entries in the table.

Definition at line 145 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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 203 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap, and itk::watershed::SegmentTable< TScalar >::m_MaximumDepth.

template<typename TScalar >
virtual::itk::LightObject::Pointer itk::watershed::SegmentTable< TScalar >::CreateAnother ( void  ) 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.

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 150 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

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

Definition at line 170 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

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

Definition at line 178 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

Deletes an entry from the table.

Definition at line 141 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

Run-time type information (and related methods).

Reimplemented from itk::DataObject.

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

Convenience methods for debugging

Definition at line 181 of file itkWatershedSegmentTable.h.

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 133 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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 113 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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 123 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

Definition at line 220 of file itkWatershedSegmentTable.h.

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.

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 190 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_MaximumDepth, and itk::Object::Modified().

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

Returns the number of entries in the table.

Definition at line 158 of file itkWatershedSegmentTable.h.

References itk::watershed::SegmentTable< TScalar >::m_HashMap.

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

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

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