ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkTreeNode.h>
Public Types | |
typedef ::itk::OffsetValueType | ChildIdentifier |
typedef std::vector< Pointer > | ChildrenListType |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef TreeNode< TValueType > | Self |
typedef Object | Superclass |
Public Member Functions | |
void | AddChild (TreeNode< TValueType > *node) |
virtual void | AddChild (ChildIdentifier number, TreeNode< TValueType > *node) |
ChildIdentifier | ChildPosition (const TreeNode< TValueType > *node) const |
ChildIdentifier | ChildPosition (TValueType node) const |
ChildIdentifier | CountChildren () const |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
const TValueType & | Get () const |
TreeNode< TValueType > * | GetChild (ChildIdentifier number) const |
virtual ChildrenListType * | GetChildren (unsigned int depth=0, char *name=NULL) const |
virtual ChildrenListType & | GetChildrenList () |
virtual const char * | GetNameOfClass () const |
ChildIdentifier | GetNumberOfChildren (unsigned int depth=0, char *name=NULL) const |
TreeNode< TValueType > * | GetParent () const |
bool | HasChildren () const |
bool | HasParent () const |
bool | Remove (TreeNode< TValueType > *n) |
bool | ReplaceChild (TreeNode< TValueType > *oldChild, TreeNode< TValueType > *newChild) |
TValueType | Set (const TValueType data) |
void | SetParent (TreeNode< TValueType > *n) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
TreeNode () | |
virtual | ~TreeNode () |
Protected Attributes | |
ChildrenListType | m_Children |
TValueType | m_Data |
Self * | m_Parent |
Private Member Functions | |
void | operator= (const Self &) |
TreeNode (const Self &) |
Represents a node in a tree.
This class derives from the Object class.
The class is templated over the type of the elements.
TValueType | = Element type stored in the node |
Definition at line 43 of file itkTreeNode.h.
typedef ::itk::OffsetValueType itk::TreeNode< TValueType >::ChildIdentifier |
Definition at line 53 of file itkTreeNode.h.
typedef std::vector< Pointer > itk::TreeNode< TValueType >::ChildrenListType |
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
Definition at line 52 of file itkTreeNode.h.
typedef SmartPointer< const Self > itk::TreeNode< TValueType >::ConstPointer |
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
Definition at line 51 of file itkTreeNode.h.
typedef SmartPointer< Self > itk::TreeNode< TValueType >::Pointer |
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
Definition at line 50 of file itkTreeNode.h.
typedef TreeNode< TValueType > itk::TreeNode< TValueType >::Self |
Smart pointer typedef support.
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
Definition at line 49 of file itkTreeNode.h.
typedef Object itk::TreeNode< TValueType >::Superclass |
Standard typedefs
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
Definition at line 48 of file itkTreeNode.h.
itk::TreeNode< TValueType >::TreeNode | ( | ) | [protected] |
Set the data of the node
virtual itk::TreeNode< TValueType >::~TreeNode | ( | ) | [protected, virtual] |
itk::TreeNode< TValueType >::TreeNode | ( | const Self & | ) | [private] |
void itk::TreeNode< TValueType >::AddChild | ( | TreeNode< TValueType > * | node | ) |
Add a child to the node
virtual void itk::TreeNode< TValueType >::AddChild | ( | ChildIdentifier | number, |
TreeNode< TValueType > * | node | ||
) | [virtual] |
Add a child to the node and specify the number in the children list
ChildIdentifier itk::TreeNode< TValueType >::ChildPosition | ( | const TreeNode< TValueType > * | node | ) | const |
Return the child position given a node
ChildIdentifier itk::TreeNode< TValueType >::ChildPosition | ( | TValueType | node | ) | const |
Return the child position given a value
ChildIdentifier itk::TreeNode< TValueType >::CountChildren | ( | ) | const |
Return the number of children
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.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
const TValueType& itk::TreeNode< TValueType >::Get | ( | ) | const |
Get the value of the node
TreeNode< TValueType >* itk::TreeNode< TValueType >::GetChild | ( | ChildIdentifier | number | ) | const |
Get the child node
virtual ChildrenListType* itk::TreeNode< TValueType >::GetChildren | ( | unsigned int | depth = 0 , |
char * | name = NULL |
||
) | const [virtual] |
Get the children list
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
virtual ChildrenListType& itk::TreeNode< TValueType >::GetChildrenList | ( | ) | [inline, virtual] |
Get the internal list of children
Definition at line 114 of file itkTreeNode.h.
virtual const char* itk::TreeNode< TValueType >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
ChildIdentifier itk::TreeNode< TValueType >::GetNumberOfChildren | ( | unsigned int | depth = 0 , |
char * | name = NULL |
||
) | const |
Get the number of children given a name and depth
TreeNode< TValueType >* itk::TreeNode< TValueType >::GetParent | ( | ) | const |
Get the parent node
bool itk::TreeNode< TValueType >::HasChildren | ( | ) | const |
Return true if the node has children
bool itk::TreeNode< TValueType >::HasParent | ( | ) | const |
Return true if the node has a parent
static Pointer itk::TreeNode< TValueType >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
void itk::TreeNode< TValueType >::operator= | ( | const Self & | ) | [private] |
Mutex lock to protect modification to the reference count
Reimplemented from itk::Object.
Reimplemented in itk::SpatialObjectTreeNode< TDimension >.
bool itk::TreeNode< TValueType >::Remove | ( | TreeNode< TValueType > * | n | ) |
Remove a node from the node
bool itk::TreeNode< TValueType >::ReplaceChild | ( | TreeNode< TValueType > * | oldChild, |
TreeNode< TValueType > * | newChild | ||
) |
Replace a given child by a new one
TValueType itk::TreeNode< TValueType >::Set | ( | const TValueType | data | ) |
Set the current value of the node
void itk::TreeNode< TValueType >::SetParent | ( | TreeNode< TValueType > * | n | ) |
Set the parent of the node
ChildrenListType itk::TreeNode< TValueType >::m_Children [protected] |
Definition at line 127 of file itkTreeNode.h.
Referenced by itk::TreeNode< SpatialObject< TDimension > * >::GetChildrenList().
TValueType itk::TreeNode< TValueType >::m_Data [protected] |
Definition at line 123 of file itkTreeNode.h.
Self* itk::TreeNode< TValueType >::m_Parent [protected] |
Definition at line 125 of file itkTreeNode.h.