ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkTreeNode.h>
Represents a node in a tree.
This class derives from the Object class.
The class is templated over the type of the elements.
TValue | = Element type stored in the node |
Definition at line 43 of file itkTreeNode.h.
Public Types | |
typedef ::itk::OffsetValueType | ChildIdentifier |
typedef std::vector< Pointer > | ChildrenListType |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef TreeNode< TValue > | 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 | |
void | AddChild (Self *node) |
virtual void | AddChild (ChildIdentifier number, Self *node) |
ChildIdentifier | ChildPosition (const Self *node) const |
ChildIdentifier | ChildPosition (TValue node) const |
ChildIdentifier | CountChildren () const |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
const TValue & | Get () const |
Self * | GetChild (ChildIdentifier number) const |
virtual ChildrenListType * | GetChildren (unsigned int depth=0, char *name=nullptr) const |
virtual ChildrenListType & | GetChildrenList () |
virtual const char * | GetNameOfClass () const |
ChildIdentifier | GetNumberOfChildren (unsigned int depth=0, char *name=nullptr) const |
Self * | GetParent () const |
bool | HasChildren () const |
bool | HasParent () const |
bool | Remove (Self *n) |
bool | ReplaceChild (Self *oldChild, Self *newChild) |
TValue | Set (const TValue 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 |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () 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 override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) override |
virtual void | UnRegister () const noexceptoverride |
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::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 override |
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 |
TValue | m_Data |
Self * | m_Parent |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
Private Member Functions | |
void | operator= (const Self &) |
TreeNode (const Self &) | |
typedef ::itk::OffsetValueType itk::TreeNode< TValue >::ChildIdentifier |
Definition at line 53 of file itkTreeNode.h.
typedef std::vector< Pointer > itk::TreeNode< TValue >::ChildrenListType |
Definition at line 52 of file itkTreeNode.h.
typedef SmartPointer< const Self > itk::TreeNode< TValue >::ConstPointer |
Definition at line 51 of file itkTreeNode.h.
typedef SmartPointer< Self > itk::TreeNode< TValue >::Pointer |
Definition at line 50 of file itkTreeNode.h.
typedef TreeNode< TValue > itk::TreeNode< TValue >::Self |
Definition at line 49 of file itkTreeNode.h.
typedef Object itk::TreeNode< TValue >::Superclass |
Standard typedefs
Definition at line 48 of file itkTreeNode.h.
|
protected |
Set the data of the node
|
protectedvirtual |
|
private |
void itk::TreeNode< TValue >::AddChild | ( | Self * | node | ) |
Add a child to the node
|
virtual |
Add a child to the node and specify the number in the children list
ChildIdentifier itk::TreeNode< TValue >::ChildPosition | ( | const Self * | node | ) | const |
Return the child position given a node
ChildIdentifier itk::TreeNode< TValue >::ChildPosition | ( | TValue | node | ) | const |
Return the child position given a value
ChildIdentifier itk::TreeNode< TValue >::CountChildren | ( | ) | const |
Return the number of children
|
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.
const TValue& itk::TreeNode< TValue >::Get | ( | ) | const |
Get the value of the node
Self* itk::TreeNode< TValue >::GetChild | ( | ChildIdentifier | number | ) | const |
Get the child node
|
virtual |
Get the children list
Reimplemented in itk::SpatialObjectTreeNode< VDimension >.
|
inlinevirtual |
Get the internal list of children
Definition at line 114 of file itkTreeNode.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< VDimension >.
ChildIdentifier itk::TreeNode< TValue >::GetNumberOfChildren | ( | unsigned int | depth = 0 , |
char * | name = nullptr |
||
) | const |
Get the number of children given a name and depth
Self* itk::TreeNode< TValue >::GetParent | ( | ) | const |
Get the parent node
bool itk::TreeNode< TValue >::HasChildren | ( | ) | const |
Return true if the node has children
bool itk::TreeNode< TValue >::HasParent | ( | ) | const |
Return true if the node has a parent
|
static |
Method for creation through the object factory.
|
private |
bool itk::TreeNode< TValue >::Remove | ( | Self * | n | ) |
Remove a node from the node
bool itk::TreeNode< TValue >::ReplaceChild | ( | Self * | oldChild, |
Self * | newChild | ||
) |
Replace a given child by a new one
TValue itk::TreeNode< TValue >::Set | ( | const TValue | data | ) |
Set the current value of the node
void itk::TreeNode< TValue >::SetParent | ( | Self * | n | ) |
Set the parent of the node
|
protected |
Definition at line 128 of file itkTreeNode.h.
Referenced by itk::TreeNode< SpatialObject< TDimension > * >::GetChildrenList().
|
protected |
Definition at line 124 of file itkTreeNode.h.
|
protected |
Definition at line 126 of file itkTreeNode.h.