Skip to content

shapeworks::PowerOfTwoPointTreeNode

More...

#include <PowerOfTwoPointTree.h>

Inherits from itk::LightObject

Public Types

Name
typedef PowerOfTwoPointTreeNode Self
typedef itk::SmartPointer< Self > Pointer
typedef itk::SmartPointer< const Self > ConstPointer
typedef itk::LightObject Superclass
typedef itk::Point< double, VDimension > PointType
typedef std::list< ParticlePointIndexPair > PointListType

Public Functions

Name
itkTypeMacro(PowerOfTwoPointTreeNode , LightObject )
itkNewMacro(Self )
itkStaticConstMacro(BranchesPerNode , int , (powstruct< 2, VDimension >::c) )
bool operator==(const PowerOfTwoPointTreeNode & o) const
bool IsLeaf() const
PointListType::iterator InsertElement(const ParticlePointIndexPair & elem)
bool Contains(const PointType & p) const
void SetLowerBound(const PointType & p)
const PointType & GetLowerBound() const
void SetUpperBound(const PointType & p)
const PointType & GetUpperBound() const
Self::Pointer * GetBranches()
const Self::Pointer * GetBranches() const
Self::Pointer & GetBranch(unsigned int i)
const Self::Pointer & GetBranch(unsigned int i) const
void SetBranch(unsigned int b, typename Self::Pointer n)
void PrintSelf(std::ostream & os, itk::Indent indent) const
const PointListType & GetList() const
PointListType & GetList()

Protected Functions

Name
PowerOfTwoPointTreeNode()
~PowerOfTwoPointTreeNode()
PowerOfTwoPointTreeNode(const PowerOfTwoPointTreeNode & o)
const PowerOfTwoPointTreeNode & operator=(const PowerOfTwoPointTreeNode & o)

Public Attributes

Name
constexpr static unsigned int VDimension

Detailed Description

class shapeworks::PowerOfTwoPointTreeNode;

A node object for use in the PowerOfTwoPointTree. This class contains a bounding box, a set of child (branch) node pointers, and a linked list that may be filled with Points and Indices (unsigned ints). The single template parameter is the dimensionality of the Points. This class was designed for use as a binning structure for ParticleNeighborhoodr.h classes.

Public Types Documentation

typedef Self

typedef PowerOfTwoPointTreeNode shapeworks::PowerOfTwoPointTreeNode::Self;

Standard class typedefs.

typedef Pointer

typedef itk::SmartPointer<Self> shapeworks::PowerOfTwoPointTreeNode::Pointer;

typedef ConstPointer

typedef itk::SmartPointer<const Self> shapeworks::PowerOfTwoPointTreeNode::ConstPointer;

typedef Superclass

typedef itk::LightObject shapeworks::PowerOfTwoPointTreeNode::Superclass;

typedef PointType

typedef itk::Point<double, VDimension> shapeworks::PowerOfTwoPointTreeNode::PointType;

Point type stored in the leaf nodes.

typedef PointListType

typedef std::list<ParticlePointIndexPair> shapeworks::PowerOfTwoPointTreeNode::PointListType;

List type for storing lists of points+indices.

Public Functions Documentation

function itkTypeMacro

itkTypeMacro(
    PowerOfTwoPointTreeNode ,
    LightObject 
)

function itkNewMacro

itkNewMacro(
    Self 
)

Method for creation through the object factory.

function itkStaticConstMacro

itkStaticConstMacro(
    BranchesPerNode ,
    int ,
    (powstruct< 2, VDimension >::c) 
)

The number of branches at each node of the tree, which is 2^VDimension, e.g. 4 in 2D, 8 in 3D, etc.

function operator==

inline bool operator==(
    const PowerOfTwoPointTreeNode & o
) const

Equivalence operator, ignores value type.

function IsLeaf

inline bool IsLeaf() const

Returns true if this is a leaf node (has no branches) and false otherwise. The assumption is that a non-leaf node cannot have any empty branches. Each level of the tree must contain BranchesPerNode divisions. This assumption speeds up certain types of processing.

function InsertElement

inline PointListType::iterator InsertElement(
    const ParticlePointIndexPair & elem
)

Insert a PointIndexPair into the list associated with this node.

function Contains

inline bool Contains(
    const PointType & p
) const

Returns true if the bounding box in this node contains the given point and false otherwise.

function SetLowerBound

inline void SetLowerBound(
    const PointType & p
)

Set/Get the lower and upper bounds of the region described by this node.

function GetLowerBound

inline const PointType & GetLowerBound() const

function SetUpperBound

inline void SetUpperBound(
    const PointType & p
)

function GetUpperBound

inline const PointType & GetUpperBound() const

function GetBranches

inline Self::Pointer * GetBranches()

Return the data structure holding branch (child) nodes.

function GetBranches

inline const Self::Pointer * GetBranches() const

function GetBranch

inline Self::Pointer & GetBranch(
    unsigned int i
)

Return a specific branch

function GetBranch

inline const Self::Pointer & GetBranch(
    unsigned int i
) const

function SetBranch

inline void SetBranch(
    unsigned int b,
    typename Self::Pointer n
)

Set the node for a specific branch of this node.

function PrintSelf

void PrintSelf(
    std::ostream & os,
    itk::Indent indent
) const

Standard ITK PrintSelf method.

function GetList

inline const PointListType & GetList() const

Get the list of elements which contain points and associated indices.

function GetList

inline PointListType & GetList()

Protected Functions Documentation

function PowerOfTwoPointTreeNode

inline PowerOfTwoPointTreeNode()

function ~PowerOfTwoPointTreeNode

inline ~PowerOfTwoPointTreeNode()

function PowerOfTwoPointTreeNode

PowerOfTwoPointTreeNode(
    const PowerOfTwoPointTreeNode & o
)

function operator=

const PowerOfTwoPointTreeNode & operator=(
    const PowerOfTwoPointTreeNode & o
)

Public Attributes Documentation

variable VDimension

static constexpr static unsigned int VDimension = 3;

Updated on 2024-07-12 at 20:10:35 +0000