ITK  4.4.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
itk::TreeNode< TValueType > Class Template Reference

#include <itkTreeNode.h>

+ Inheritance diagram for itk::TreeNode< TValueType >:
+ Collaboration diagram for itk::TreeNode< TValueType >:

Detailed Description

template<class TValueType>
class itk::TreeNode< TValueType >

Represents a node in a tree.

This class derives from the Object class.

The class is templated over the type of the elements.

Template Parameters
TValueType= Element type stored in the node

Definition at line 43 of file itkTreeNode.h.

Public Types

typedef ::itk::OffsetValueType ChildIdentifier
 
typedef std::vector< PointerChildrenListType
 
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef TreeNode< TValueType > 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

void AddChild (Self *node)
 
virtual void AddChild (ChildIdentifier number, Self *node)
 
ChildIdentifier ChildPosition (const Self *node) const
 
ChildIdentifier ChildPosition (TValueType node) const
 
ChildIdentifier CountChildren () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
const TValueType & Get () const
 
SelfGetChild (ChildIdentifier number) const
 
virtual ChildrenListTypeGetChildren (unsigned int depth=0, char *name=NULL) const
 
virtual ChildrenListTypeGetChildrenList ()
 
virtual const char * GetNameOfClass () const
 
ChildIdentifier GetNumberOfChildren (unsigned int depth=0, char *name=NULL) const
 
SelfGetParent () const
 
bool HasChildren () const
 
bool HasParent () const
 
bool Remove (Self *n)
 
bool ReplaceChild (Self *oldChild, Self *newChild)
 
TValueType Set (const TValueType data)
 
void SetParent (Self *n)
 
- 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
 
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
 

Static Public Member Functions

static Pointer New ()
 
- 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

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

ChildrenListType m_Children
 
TValueType m_Data
 
Selfm_Parent
 

Private Member Functions

void operator= (const Self &)
 
 TreeNode (const Self &)
 

Additional Inherited Members

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

Member Typedef Documentation

template<class TValueType>
typedef ::itk::OffsetValueType itk::TreeNode< TValueType >::ChildIdentifier

Definition at line 53 of file itkTreeNode.h.

template<class TValueType>
typedef std::vector< Pointer > itk::TreeNode< TValueType >::ChildrenListType

Definition at line 52 of file itkTreeNode.h.

template<class TValueType>
typedef SmartPointer< const Self > itk::TreeNode< TValueType >::ConstPointer

Definition at line 51 of file itkTreeNode.h.

template<class TValueType>
typedef SmartPointer< Self > itk::TreeNode< TValueType >::Pointer

Definition at line 50 of file itkTreeNode.h.

template<class TValueType>
typedef TreeNode< TValueType > itk::TreeNode< TValueType >::Self

Definition at line 49 of file itkTreeNode.h.

template<class TValueType>
typedef Object itk::TreeNode< TValueType >::Superclass

Standard typedefs

Definition at line 48 of file itkTreeNode.h.

Constructor & Destructor Documentation

template<class TValueType>
itk::TreeNode< TValueType >::TreeNode ( )
protected

Set the data of the node

template<class TValueType>
virtual itk::TreeNode< TValueType >::~TreeNode ( )
protectedvirtual
template<class TValueType>
itk::TreeNode< TValueType >::TreeNode ( const Self )
private

Member Function Documentation

template<class TValueType>
void itk::TreeNode< TValueType >::AddChild ( Self node)

Add a child to the node

template<class TValueType>
virtual void itk::TreeNode< TValueType >::AddChild ( ChildIdentifier  number,
Self node 
)
virtual

Add a child to the node and specify the number in the children list

template<class TValueType>
ChildIdentifier itk::TreeNode< TValueType >::ChildPosition ( const Self node) const

Return the child position given a node

template<class TValueType>
ChildIdentifier itk::TreeNode< TValueType >::ChildPosition ( TValueType  node) const

Return the child position given a value

template<class TValueType>
ChildIdentifier itk::TreeNode< TValueType >::CountChildren ( ) const

Return the number of children

template<class TValueType>
virtual::itk::LightObject::Pointer itk::TreeNode< TValueType >::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<class TValueType>
const TValueType& itk::TreeNode< TValueType >::Get ( ) const

Get the value of the node

template<class TValueType>
Self* itk::TreeNode< TValueType >::GetChild ( ChildIdentifier  number) const

Get the child node

template<class TValueType>
virtual ChildrenListType* itk::TreeNode< TValueType >::GetChildren ( unsigned int  depth = 0,
char *  name = NULL 
) const
virtual

Get the children list

Reimplemented in itk::SpatialObjectTreeNode< VDimension >.

template<class TValueType>
virtual ChildrenListType& itk::TreeNode< TValueType >::GetChildrenList ( )
inlinevirtual

Get the internal list of children

Definition at line 114 of file itkTreeNode.h.

template<class TValueType>
virtual const char* itk::TreeNode< TValueType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

Reimplemented in itk::SpatialObjectTreeNode< VDimension >.

template<class TValueType>
ChildIdentifier itk::TreeNode< TValueType >::GetNumberOfChildren ( unsigned int  depth = 0,
char *  name = NULL 
) const

Get the number of children given a name and depth

template<class TValueType>
Self* itk::TreeNode< TValueType >::GetParent ( ) const

Get the parent node

template<class TValueType>
bool itk::TreeNode< TValueType >::HasChildren ( ) const

Return true if the node has children

template<class TValueType>
bool itk::TreeNode< TValueType >::HasParent ( ) const

Return true if the node has a parent

template<class TValueType>
static Pointer itk::TreeNode< TValueType >::New ( )
static

Method for creation through the object factory.

template<class TValueType>
void itk::TreeNode< TValueType >::operator= ( const Self )
private
template<class TValueType>
bool itk::TreeNode< TValueType >::Remove ( Self n)

Remove a node from the node

template<class TValueType>
bool itk::TreeNode< TValueType >::ReplaceChild ( Self oldChild,
Self newChild 
)

Replace a given child by a new one

template<class TValueType>
TValueType itk::TreeNode< TValueType >::Set ( const TValueType  data)

Set the current value of the node

template<class TValueType>
void itk::TreeNode< TValueType >::SetParent ( Self n)

Set the parent of the node

Member Data Documentation

template<class TValueType>
ChildrenListType itk::TreeNode< TValueType >::m_Children
protected
template<class TValueType>
TValueType itk::TreeNode< TValueType >::m_Data
protected

Definition at line 124 of file itkTreeNode.h.

template<class TValueType>
Self* itk::TreeNode< TValueType >::m_Parent
protected

Definition at line 126 of file itkTreeNode.h.


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