Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
itk::PSMDomain< VDimension > Class Template Reference

Base class for defining the domain in which a particle system exists. More...

#include <itkPSMDomain.h>

+ Inheritance diagram for itk::PSMDomain< VDimension >:
+ Collaboration diagram for itk::PSMDomain< VDimension >:

Public Types

typedef PSMDomain Self
 
typedef DataObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Point< double, VDimension > PointType
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (PSMDomain, DataObject)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
virtual bool ApplyConstraints (PointType &) const
 
virtual double Distance (const PointType &a, const PointType &b) const
 
virtual const PointTypeGetLowerBound () const
 
virtual const PointTypeGetUpperBound () const
 
void DisableConstraints ()
 
void EnableConstraints ()
 
bool GetConstraintsEnabled () const
 
void SetConstraintsEnabled (bool g)
 

Protected Member Functions

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

Protected Attributes

bool m_ConstraintsEnabled
 

Detailed Description

template<unsigned int VDimension>
class itk::PSMDomain< VDimension >

Base class for defining the domain in which a particle system exists.

The PSMDomain class is an abstract base class for defining the domain in which a particle system exists. It is intended to be subclassed to fully define the domain characteristics.

A domain defines a distance metric between two points. By default, distance is defined in this base class as a Euclidean distance. PSMDomain subclasses may also define constraints on particle positions, such as constraints forcing particles to lie on a surface (submanifold of the domain). PSMDomain subclasses may also define boundaries using the BoundingBox methods.

Definition at line 48 of file itkPSMDomain.h.

Member Typedef Documentation

template<unsigned int VDimension>
typedef Point<double, VDimension> itk::PSMDomain< VDimension >::PointType

Point type used to store particle locations.

Definition at line 68 of file itkPSMDomain.h.

template<unsigned int VDimension>
typedef PSMDomain itk::PSMDomain< VDimension >::Self

Standard class typedefs

Definition at line 52 of file itkPSMDomain.h.

Member Function Documentation

template<unsigned int VDimension>
virtual bool itk::PSMDomain< VDimension >::ApplyConstraints ( PointType ) const
inlinevirtual

Apply any constraints to the given point location. This method may, for example, implement boundary conditions or restrict points to lie on a surface. Default behavior does nothing. Returns true if the value of the point was modified and false otherwise.

Reimplemented in itk::PSMImplicitSurfaceDomain< T, VDimension >, and itk::PSMRegionDomain< VDimension >.

Definition at line 74 of file itkPSMDomain.h.

75  { return false; }
template<unsigned int VDimension>
void itk::PSMDomain< VDimension >::DisableConstraints ( )
inline

Enable/Disable constraints on particle positions imposed by a domain.

Definition at line 105 of file itkPSMDomain.h.

105 { m_ConstraintsEnabled = false; }
template<unsigned int VDimension>
virtual double itk::PSMDomain< VDimension >::Distance ( const PointType a,
const PointType b 
) const
inlinevirtual

A Domain may define a distance calculation. This is useful in cases such as geodesic distance, where distance depends on some information contained in the Domain. The default implementation is Euclidean distance.

Reimplemented in itk::PSMImplicitSurfaceDomain< T, VDimension >.

Definition at line 81 of file itkPSMDomain.h.

82  {
83  double sum = 0.0;
84  for (unsigned int i = 0; i < VDimension; i++)
85  {
86  sum += (b[i]-a[i]) * (b[i]-a[i]);
87  }
88  return sqrt(sum);
89  }
template<unsigned int VDimension>
virtual const PointType& itk::PSMDomain< VDimension >::GetLowerBound ( ) const
inlinevirtual

A Domain may optionally return a bounding box. The lower bound method gives the upper-left-hand corner of the domain. The upper bound method gives the lower-right-hand-corner of the domain. If a domain does not define boundaries, these methods will throw an exceptions

Reimplemented in itk::PSMRegionDomain< VDimension >.

Definition at line 95 of file itkPSMDomain.h.

96  {
97  itkExceptionMacro("This Domain does not define a lower bound.");
98  }
template<unsigned int VDimension>
itk::PSMDomain< VDimension >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<unsigned int VDimension>
itk::PSMDomain< VDimension >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
VDimension   
)

Dimensionality of the domain of the particle system.

template<unsigned int VDimension>
itk::PSMDomain< VDimension >::itkTypeMacro ( PSMDomain< VDimension >  ,
DataObject   
)

Run-time type information (and related methods).


The documentation for this class was generated from the following files: