ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkOneWayEquivalencyTable.h>
Hash table to manage integral label equivalencies that are order dependent.
OneWayEquivalencyTable is a variation on itk::EquivalencyTable that preserves the order of equivalencies. For example, the entries { 5 = 4 } and {4 = 5} are not equivalent in this table, yet are the treated as the same entry in EquivalencyTable. Because of the one-way logic of the table, reflexive equivalencies will result in cycling from recursive lookups or flattening of the table. The responsibility is on the user for preventing recursive cycling.
Definition at line 45 of file itkOneWayEquivalencyTable.h.
Public Types | |
typedef HashTableType::const_iterator | ConstIterator |
typedef itksys::hash_map < unsigned long, unsigned long, itksys::hash< unsigned long > > | HashTableType |
typedef HashTableType::iterator | Iterator |
typedef HashTableType::value_type | ValueType |
Public Types inherited from itk::DataObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef std::string | DataObjectIdentifierType |
typedef std::vector< Pointer > ::size_type | DataObjectPointerArraySizeType |
typedef SmartPointer< Self > | Pointer |
typedef DataObject | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
bool | Add (unsigned long a, unsigned long b) |
Iterator | Begin () |
void | Clear () |
bool | Empty () const |
Iterator | End () |
void | Erase (const unsigned long a) |
void | Flatten () |
unsigned long | Lookup (const unsigned long a) const |
unsigned long | RecursiveLookup (const unsigned long a) const |
bool | IsEntry (const unsigned long a) const |
Public Member Functions inherited from itk::DataObject | |
virtual void | CopyInformation (const DataObject *) |
virtual void | DataHasBeenGenerated () |
void | DisconnectPipeline () |
bool | GetDataReleased () const |
virtual const bool & | GetReleaseDataFlag () |
SmartPointerForwardReference < ProcessObject > | GetSource () const |
DataObjectPointerArraySizeType | GetSourceOutputIndex () const |
const DataObjectIdentifierType & | GetSourceOutputName () 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 ModifiedTimeType & | GetPipelineMTime () |
virtual void | SetRealTimeStamp (RealTimeStamp _arg) |
virtual const RealTimeStamp & | GetRealTimeStamp () |
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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary (void) |
const MetaDataDictionary & | GetMetaDataDictionary (void) const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
virtual void | Register () const |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () 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 |
Protected Member Functions | |
OneWayEquivalencyTable () | |
OneWayEquivalencyTable (const Self &) | |
void | operator= (const Self &) |
void | PrintSelf (std::ostream &os, Indent indent) const |
virtual | ~OneWayEquivalencyTable () |
Protected Member Functions inherited from itk::DataObject | |
DataObject () | |
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 | |
HashTableType | m_HashMap |
typedef OneWayEquivalencyTable | Self |
typedef DataObject | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
static Pointer | New () |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::DataObject | |
static bool | GetGlobalReleaseDataFlag () |
static void | GlobalReleaseDataFlagOff () |
static void | GlobalReleaseDataFlagOn () |
static void | SetGlobalReleaseDataFlag (bool val) |
Protected Types inherited from itk::LightObject | |
typedef int | InternalReferenceCountType |
typedef HashTableType::const_iterator itk::OneWayEquivalencyTable::ConstIterator |
Definition at line 62 of file itkOneWayEquivalencyTable.h.
typedef SmartPointer< const Self > itk::OneWayEquivalencyTable::ConstPointer |
Standard typedefs and smart pointer declarations.
Definition at line 52 of file itkOneWayEquivalencyTable.h.
typedef itksys::hash_map< unsigned long, unsigned long, itksys::hash< unsigned long > > itk::OneWayEquivalencyTable::HashTableType |
Define the container type for this table
Definition at line 54 of file itkOneWayEquivalencyTable.h.
typedef HashTableType::iterator itk::OneWayEquivalencyTable::Iterator |
Definition at line 61 of file itkOneWayEquivalencyTable.h.
typedef SmartPointer< Self > itk::OneWayEquivalencyTable::Pointer |
Standard typedefs and smart pointer declarations.
Definition at line 51 of file itkOneWayEquivalencyTable.h.
Standard typedefs and smart pointer declarations.
Definition at line 49 of file itkOneWayEquivalencyTable.h.
Standard typedefs and smart pointer declarations.
Definition at line 50 of file itkOneWayEquivalencyTable.h.
typedef HashTableType::value_type itk::OneWayEquivalencyTable::ValueType |
Definition at line 63 of file itkOneWayEquivalencyTable.h.
|
inlineprotected |
Convenience method for debugging.
Definition at line 129 of file itkOneWayEquivalencyTable.h.
|
inlineprotectedvirtual |
Definition at line 130 of file itkOneWayEquivalencyTable.h.
|
protected |
bool itk::OneWayEquivalencyTable::Add | ( | unsigned long | a, |
unsigned long | b | ||
) |
Insert an equivalency into the table. A return value of TRUE indicates that the equivalency did not previously exist in the table and was successfully added. A FALSE return value indicates that the equivalency was not added to the table because a conflict with an existing entry occurred (most likely, the equivalency was already recorded directly or indirectly).
|
inline |
Returns an iterator pointing to the first element of the (unordered) table.
Definition at line 119 of file itkOneWayEquivalencyTable.h.
|
inline |
Erases all the entries in the table.
Definition at line 110 of file itkOneWayEquivalencyTable.h.
|
virtual |
Standard typedefs and smart pointer declarations.
Reimplemented from itk::Object.
|
inline |
Returns TRUE if the table is empty, FALSE if it is not empty.
Definition at line 114 of file itkOneWayEquivalencyTable.h.
|
inline |
Returns and iterator pointing to one position past the last element of the (unordered) table.
Definition at line 123 of file itkOneWayEquivalencyTable.h.
|
inline |
Erases the entry with key a.
Definition at line 106 of file itkOneWayEquivalencyTable.h.
void itk::OneWayEquivalencyTable::Flatten | ( | ) |
``Flattens'' the equivalency table by eliminating all redundant and recursive equivalencies. I.e. the set { 2=1; 3=2; 4=3 } is converted to {4=1; 3=1; 2=1}.
|
virtual |
Standard typedefs and smart pointer declarations.
Reimplemented from itk::DataObject.
|
inline |
Returns TRUE if the label is found in the table and FALSE is the label is not found in the table.
Definition at line 98 of file itkOneWayEquivalencyTable.h.
|
inline |
Lookup an equivalency in the table. If no entry is found in the table, the method returns its the value of the argument. Does not recursively descent through equivalencies.
Definition at line 82 of file itkOneWayEquivalencyTable.h.
|
static |
Standard typedefs and smart pointer declarations.
|
protected |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::DataObject.
unsigned long itk::OneWayEquivalencyTable::RecursiveLookup | ( | const unsigned long | a | ) | const |
Lookup an equivalency in the table by recursing through all successive equivalencies. For example, if the follow entries exist in the table {8=7, 7=6, 6=5}, then RecursiveLookup(8) returns 5.
|
protected |
Definition at line 136 of file itkOneWayEquivalencyTable.h.