Skip to content

itk::ParticleNeighborhood

More...

#include <itkParticleNeighborhood.h>

Inherits from DataObject

Inherited by itk::ParticleRegionNeighborhood< TImage::ImageDimension >

Public Types

Name
typedef ParticleNeighborhood Self
typedef DataObject Superclass
typedef SmartPointer< Self > Pointer
typedef SmartPointer< const Self > ConstPointer
typedef WeakPointer< const Self > ConstWeakPointer
typedef Point< double, VDimension > PointType
using shapeworks::ParticleDomain DomainType
typedef ParticleContainer< PointType > PointContainerType
typedef std::vector< ParticlePointIndexPair< VDimension > > PointVectorType

Public Functions

Name
itkNewMacro(Self )
itkTypeMacro(ParticleNeighborhood , DataObject )
itkStaticConstMacro(Dimension , unsigned int , VDimension )
itkSetObjectMacro(PointContainer , PointContainerType )
itkGetConstObjectMacro(PointContainer , PointContainerType )
virtual PointVectorType FindNeighborhoodPoints(const PointType & , int idx, double ) const
virtual PointVectorType FindNeighborhoodPoints(const PointType & , int idx, std::vector< double > & , double ) const
virtual PointVectorType FindNeighborhoodPoints(const PointType & , int idx, std::vector< double > & , std::vector< double > & , double ) const
virtual unsigned int FindNeighborhoodPoints(const PointType & , int idx, double , PointVectorType & ) const
virtual void SetDomain(DomainType::Pointer domain)
DomainType::Pointer GetDomain() 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
ParticleNeighborhood()
void PrintSelf(std::ostream & os, Indent indent) const
virtual ~ParticleNeighborhood()

Detailed Description

template <unsigned int VDimension =3>
class itk::ParticleNeighborhood;

A ParticleNeighborhood is responsible for computing neighborhoods of particles. Given a point position in a domain, and a neighborhood radius, the ParticleNeighborhood returns a list of points that are neighbors of that point. The base class, ParticleNeighborhood, must be subclassed to provide functionality; the base class will throw an exception when FindNeighborhoodPoints is called.

Public Types Documentation

typedef Self

typedef ParticleNeighborhood itk::ParticleNeighborhood< VDimension >::Self;

Standard class typedefs

typedef Superclass

typedef DataObject itk::ParticleNeighborhood< VDimension >::Superclass;

typedef Pointer

typedef SmartPointer<Self> itk::ParticleNeighborhood< VDimension >::Pointer;

typedef ConstPointer

typedef SmartPointer<const Self> itk::ParticleNeighborhood< VDimension >::ConstPointer;

typedef ConstWeakPointer

typedef WeakPointer<const Self> itk::ParticleNeighborhood< VDimension >::ConstWeakPointer;

typedef PointType

typedef Point<double, VDimension> itk::ParticleNeighborhood< VDimension >::PointType;

Point type used to store particle locations.

using DomainType

using itk::ParticleNeighborhood< VDimension >::DomainType =  shapeworks::ParticleDomain;

Domain type. The Domain object provides bounds and distance information.

typedef PointContainerType

typedef ParticleContainer<PointType> itk::ParticleNeighborhood< VDimension >::PointContainerType;

Container type for points. This matches the itkParticleSystem container type.

typedef PointVectorType

typedef std::vector<ParticlePointIndexPair<VDimension> > itk::ParticleNeighborhood< VDimension >::PointVectorType;

Point list (vector) type. This is the type of list returned by FindNeighborhoodPoints.

Public Functions Documentation

function itkNewMacro

itkNewMacro(
    Self 
)

Method for creation through the object factory.

function itkTypeMacro

itkTypeMacro(
    ParticleNeighborhood ,
    DataObject 
)

Run-time type information (and related methods).

function itkStaticConstMacro

itkStaticConstMacro(
    Dimension ,
    unsigned int ,
    VDimension 
)

Dimensionality of the domain of the particle system.

function itkSetObjectMacro

itkSetObjectMacro(
    PointContainer ,
    PointContainerType 
)

Set/Get the point container. These are the points parsed by the Neighborhood class when FindNeighborhoodPoints is called.

function itkGetConstObjectMacro

itkGetConstObjectMacro(
    PointContainer ,
    PointContainerType 
)

function FindNeighborhoodPoints

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

Reimplemented by: itk::ParticleRegionNeighborhood::FindNeighborhoodPoints, itk::ParticleRegionNeighborhood::FindNeighborhoodPoints

Compile a list of points that are within a specified radius of a given point. The default implementation will throw an exception.

function FindNeighborhoodPoints

inline virtual PointVectorType FindNeighborhoodPoints(
    const PointType & ,
    int idx,
    std::vector< double > & ,
    double 
) const

Reimplemented by: itk::ParticleSurfaceNeighborhood::FindNeighborhoodPoints

This method finds neighborhood points as in the previous method, but also computes a vector of weights associated with each of those points.

function FindNeighborhoodPoints

inline virtual PointVectorType FindNeighborhoodPoints(
    const PointType & ,
    int idx,
    std::vector< double > & ,
    std::vector< double > & ,
    double 
) const

Reimplemented by: itk::ParticleSurfaceNeighborhood::FindNeighborhoodPoints

This method finds neighborhood points as in the previous method, but also computes a vector of distances associated with each of those points.

function FindNeighborhoodPoints

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

function SetDomain

inline virtual void SetDomain(
    DomainType::Pointer domain
)

Reimplemented by: itk::ParticleRegionNeighborhood::SetDomain, itk::ParticleRegionNeighborhood::SetDomain

Set the Domain that this neighborhood will use. The Domain object is important because it defines bounds and distance measures.

function GetDomain

inline DomainType::Pointer GetDomain() const

function AddPosition

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

Reimplemented by: itk::ParticleRegionNeighborhood::AddPosition, itk::ParticleRegionNeighborhood::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

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

Reimplemented by: itk::ParticleRegionNeighborhood::SetPosition, itk::ParticleRegionNeighborhood::SetPosition

function RemovePosition

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

Reimplemented by: itk::ParticleRegionNeighborhood::RemovePosition, itk::ParticleRegionNeighborhood::RemovePosition

Protected Functions Documentation

function ParticleNeighborhood

inline ParticleNeighborhood()

function PrintSelf

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

function ~ParticleNeighborhood

inline virtual ~ParticleNeighborhood()

Updated on 2022-07-23 at 17:50:03 -0600