Skip to content

shapeworks::ParticleNeighborhood

More...

#include <ParticleNeighborhood.h>

Inherits from itk::DataObject

Inherited by shapeworks::ParticleRegionNeighborhood

Public Types

Name
typedef ParticleNeighborhood Self
typedef DataObject Superclass
typedef itk::SmartPointer< Self > Pointer
typedef itk::SmartPointer< const Self > ConstPointer
typedef itk::WeakPointer< const Self > ConstWeakPointer
typedef itk::Point< double, VDimension > PointType
using shapeworks::ParticleDomain DomainType
typedef GenericContainer< PointType > PointContainerType
typedef std::vector< ParticlePointIndexPair > 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, itk::Indent indent) const
virtual ~ParticleNeighborhood()

Public Attributes

Name
constexpr static unsigned int VDimension

Detailed Description

class shapeworks::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 shapeworks::ParticleNeighborhood::Self;

Standard class typedefs

typedef Superclass

typedef DataObject shapeworks::ParticleNeighborhood::Superclass;

typedef Pointer

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

typedef ConstPointer

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

typedef ConstWeakPointer

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

typedef PointType

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

Point type used to store particle locations.

using DomainType

using shapeworks::ParticleNeighborhood::DomainType =  shapeworks::ParticleDomain;

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

typedef PointContainerType

typedef GenericContainer<PointType> shapeworks::ParticleNeighborhood::PointContainerType;

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

typedef PointVectorType

typedef std::vector<ParticlePointIndexPair> shapeworks::ParticleNeighborhood::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: shapeworks::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: shapeworks::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: shapeworks::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: shapeworks::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: shapeworks::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: shapeworks::ParticleRegionNeighborhood::SetPosition

function RemovePosition

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

Reimplemented by: shapeworks::ParticleRegionNeighborhood::RemovePosition

Protected Functions Documentation

function ParticleNeighborhood

inline ParticleNeighborhood()

function PrintSelf

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

function ~ParticleNeighborhood

inline virtual ~ParticleNeighborhood()

Public Attributes Documentation

variable VDimension

static constexpr static unsigned int VDimension = 3;

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