Skip to content

shapeworks::ParticleRegionNeighborhood

More...

#include <ParticleRegionNeighborhood.h>

Inherits from shapeworks::ParticleNeighborhood, itk::DataObject

Inherited by shapeworks::ParticleSurfaceNeighborhood

Protected Classes

Name
struct IteratorNodePair

Public Types

Name
typedef ParticleRegionNeighborhood Self
typedef ParticleNeighborhood Superclass
typedef itk::SmartPointer< Self > Pointer
typedef itk::SmartPointer< const Self > ConstPointer
typedef itk::WeakPointer< const Self > ConstWeakPointer
using ParticleDomain DomainType
typedef Superclass::PointType PointType
typedef Superclass::PointContainerType PointContainerType
typedef Superclass::PointVectorType PointVectorType
typedef PowerOfTwoPointTree PointTreeType

Protected Types

Name
typedef GenericContainer< IteratorNodePair > IteratorMapType

Public Functions

Name
itkNewMacro(Self )
itkTypeMacro(ParticleRegionNeighborhood , ParticleNeighborhood )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
virtual PointVectorType FindNeighborhoodPoints(const PointType & , int idx, double ) const
virtual void SetDomain(DomainType::Pointer p) override
itkSetMacro(TreeLevels , unsigned int )
itkGetMacro(TreeLevels , unsigned int )
void PrintSelf(std::ostream & os, itk::Indent indent) const
virtual void AddPosition(const PointType & p, unsigned int idx, int threadId =0)
virtual void SetPosition(const PointType & p, unsigned int idx, int threadId =0)
virtual void RemovePosition(unsigned int idx, int threadId =0)

Protected Functions

Name
ParticleRegionNeighborhood()
virtual ~ParticleRegionNeighborhood()

Public Attributes

Name
constexpr static unsigned int VDimension

Protected Attributes

Name
PointTreeType::Pointer m_Tree
IteratorMapType::Pointer m_IteratorMap
unsigned int m_TreeLevels

Additional inherited members

Public Functions inherited from shapeworks::ParticleNeighborhood

Name
itkSetObjectMacro(PointContainer , PointContainerType )
itkGetConstObjectMacro(PointContainer , PointContainerType )
DomainType::Pointer GetDomain() const

Protected Functions inherited from shapeworks::ParticleNeighborhood

Name
ParticleNeighborhood()
virtual ~ParticleNeighborhood()

Detailed Description

class shapeworks::ParticleRegionNeighborhood;

ParticleRegionNeighborhood is a general purpose neighborhood object that computes neighborhoods based on distance from a point. It requires a domain that provides bounds information and a distance metric. This class uses a PowerOfTwoPointTree to cache point and index values so that FindNeighborhoodPoints is somewhat optimized.

Public Types Documentation

typedef Self

typedef ParticleRegionNeighborhood shapeworks::ParticleRegionNeighborhood::Self;

Standard class typedefs

typedef Superclass

typedef ParticleNeighborhood shapeworks::ParticleRegionNeighborhood::Superclass;

typedef Pointer

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

typedef ConstPointer

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

typedef ConstWeakPointer

typedef itk::WeakPointer<const Self> shapeworks::ParticleRegionNeighborhood::ConstWeakPointer;

using DomainType

using shapeworks::ParticleRegionNeighborhood::DomainType =  ParticleDomain;

typedef PointType

typedef Superclass::PointType shapeworks::ParticleRegionNeighborhood::PointType;

Inherited typedefs from parent class.

typedef PointContainerType

typedef Superclass::PointContainerType shapeworks::ParticleRegionNeighborhood::PointContainerType;

typedef PointVectorType

typedef Superclass::PointVectorType shapeworks::ParticleRegionNeighborhood::PointVectorType;

typedef PointTreeType

typedef PowerOfTwoPointTree shapeworks::ParticleRegionNeighborhood::PointTreeType;

PowerOfTwoTree type used to sort points according to location.

Protected Types Documentation

typedef IteratorMapType

typedef GenericContainer<IteratorNodePair> shapeworks::ParticleRegionNeighborhood::IteratorMapType;

Public Functions Documentation

function itkNewMacro

itkNewMacro(
    Self 
)

Method for creation through the object factory.

function itkTypeMacro

itkTypeMacro(
    ParticleRegionNeighborhood ,
    ParticleNeighborhood 
)

Run-time type information (and related methods).

function itkStaticConstMacro

itkStaticConstMacro(
    Dimension ,
    unsigned int ,
    VDimension 
)

Dimensionality of the domain of the particle system.

function FindNeighborhoodPoints

virtual PointVectorType FindNeighborhoodPoints(
    const PointType & ,
    int idx,
    double 
) const

Reimplements: shapeworks::ParticleNeighborhood::FindNeighborhoodPoints

Compile a list of points that are within a specified radius of a given point. This implementation uses a PowerOfTwoTree to sort points according to location.

function SetDomain

virtual void SetDomain(
    DomainType::Pointer p
) override

Reimplements: shapeworks::ParticleNeighborhood::SetDomain

Override SetDomain so that we can grab the region extent info and construct our tree.

function itkSetMacro

itkSetMacro(
    TreeLevels ,
    unsigned int 
)

Set/Get the number of levels in the sorting tree.

function itkGetMacro

itkGetMacro(
    TreeLevels ,
    unsigned int 
)

function PrintSelf

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

function AddPosition

virtual void AddPosition(
    const PointType & p,
    unsigned int idx,
    int threadId =0
)

Reimplements: shapeworks::ParticleNeighborhood::AddPosition

For efficiency, itkNeighborhoods are not necessarily observers of itkParticleSystem, but have specific methods invoked for various events. AddPosition is called by itkParticleSystem when a particle location is added. SetPosition is called when a particle location is set. RemovePosition is called when a particle location is removed.

function SetPosition

virtual void SetPosition(
    const PointType & p,
    unsigned int idx,
    int threadId =0
)

Reimplements: shapeworks::ParticleNeighborhood::SetPosition

function RemovePosition

virtual void RemovePosition(
    unsigned int idx,
    int threadId =0
)

Reimplements: shapeworks::ParticleNeighborhood::RemovePosition

Protected Functions Documentation

function ParticleRegionNeighborhood

inline ParticleRegionNeighborhood()

function ~ParticleRegionNeighborhood

inline virtual ~ParticleRegionNeighborhood()

Public Attributes Documentation

variable VDimension

static constexpr static unsigned int VDimension = 3;

Protected Attributes Documentation

variable m_Tree

PointTreeType::Pointer m_Tree;

variable m_IteratorMap

IteratorMapType::Pointer m_IteratorMap;

variable m_TreeLevels

unsigned int m_TreeLevels;

Updated on 2024-03-17 at 12:58:44 -0600