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

#include <itkPSMImageDomain.h>

+ Inheritance diagram for itk::PSMImageDomain< T, VDimension >:
+ Collaboration diagram for itk::PSMImageDomain< T, VDimension >:

Public Types

typedef PSMImageDomain Self
 
typedef PSMRegionDomain< VDimension > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Image< T, VDimension > ImageType
 
typedef Superclass::PointType PointType
 
typedef LinearInterpolateImageFunction< ImageType, typename PointType::CoordRepType > ScalarInterpolatorType
 
- Public Types inherited from itk::PSMRegionDomain< VDimension >
typedef PSMRegionDomain Self
 
typedef PSMDomain< VDimension > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Point< double, VDimension > PointType
 
- Public Types inherited from itk::PSMDomain< VDimension >
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 (PSMImageDomain, PSMRegionDomain)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
void SetImage (ImageType *I)
 
 itkGetObjectMacro (Image, ImageType)
 
 itkGetConstObjectMacro (Image, ImageType)
 
Sample (const PointType &p) const
 
bool IsInsideBuffer (const PointType &p) const
 
 itkGetObjectMacro (ScalarInterpolator, ScalarInterpolatorType)
 
- Public Member Functions inherited from itk::PSMRegionDomain< VDimension >
 itkNewMacro (Self)
 
 itkTypeMacro (PSMRegionDomain, PSMDomain)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
virtual bool ApplyConstraints (PointType &p) const
 
 itkSetMacro (LowerBound, PointType)
 
 itkSetMacro (UpperBound, PointType)
 
virtual const PointTypeGetUpperBound () const
 
virtual const PointTypeGetLowerBound () const
 
void SetRegion (const PointType &l, const PointType &u)
 
- Public Member Functions inherited from itk::PSMDomain< VDimension >
 itkNewMacro (Self)
 
 itkTypeMacro (PSMDomain, DataObject)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
virtual double Distance (const PointType &a, const PointType &b) const
 
void DisableConstraints ()
 
void EnableConstraints ()
 
bool GetConstraintsEnabled () const
 
void SetConstraintsEnabled (bool g)
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const
 
- Protected Member Functions inherited from itk::PSMRegionDomain< VDimension >
void PrintSelf (std::ostream &os, Indent indent) const
 
- Protected Member Functions inherited from itk::PSMDomain< VDimension >
void PrintSelf (std::ostream &os, Indent indent) const
 

Additional Inherited Members

- Protected Attributes inherited from itk::PSMDomain< VDimension >
bool m_ConstraintsEnabled
 

Detailed Description

template<class T, unsigned int VDimension>
class itk::PSMImageDomain< T, VDimension >

A bounding-box region domain that sets its bounding box according to the origin, spacing, and RequestedRegion of a specified itk::Image. This Domain object may be sampled for interpolated image values using the Sample(Point) method.

See also
PSMImageDomainWithGradients
PSMRegionDomain

Definition at line 38 of file itkPSMImageDomain.h.

Member Typedef Documentation

template<class T , unsigned int VDimension>
typedef Image<T, VDimension> itk::PSMImageDomain< T, VDimension >::ImageType

Type of the ITK image used by this class.

Definition at line 49 of file itkPSMImageDomain.h.

template<class T , unsigned int VDimension>
typedef Superclass::PointType itk::PSMImageDomain< T, VDimension >::PointType

Point type of the domain (not the image).

Definition at line 58 of file itkPSMImageDomain.h.

template<class T , unsigned int VDimension>
typedef PSMImageDomain itk::PSMImageDomain< T, VDimension >::Self

Standard class typedefs

Definition at line 42 of file itkPSMImageDomain.h.

Member Function Documentation

template<class T , unsigned int VDimension>
bool itk::PSMImageDomain< T, VDimension >::IsInsideBuffer ( const PointType p) const
inline

Check whether the point p may be sampled in this image domain.

Definition at line 114 of file itkPSMImageDomain.h.

115  { return m_ScalarInterpolator->IsInsideBuffer(p); }
template<class T , unsigned int VDimension>
itk::PSMImageDomain< T, VDimension >::itkGetObjectMacro ( ScalarInterpolator  ,
ScalarInterpolatorType   
)

Allow public access to the scalar interpolator.

template<class T , unsigned int VDimension>
itk::PSMImageDomain< T, VDimension >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class T , unsigned int VDimension>
itk::PSMImageDomain< T, VDimension >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
VDimension   
)

Dimensionality of the domain of the particle system.

template<class T , unsigned int VDimension>
itk::PSMImageDomain< T, VDimension >::itkTypeMacro ( PSMImageDomain< T, VDimension >  ,
PSMRegionDomain   
)

Run-time type information (and related methods).

template<class T , unsigned int VDimension>
T itk::PSMImageDomain< T, VDimension >::Sample ( const PointType p) const
inline

Sample the image at a point. This method performs no bounds checking. To check bounds, use IsInsideBuffer.

Definition at line 110 of file itkPSMImageDomain.h.

111  { return m_ScalarInterpolator->Evaluate(p); }
template<class T , unsigned int VDimension>
void itk::PSMImageDomain< T, VDimension >::SetImage ( ImageType I)
inline

Set/Get the itk::Image specifying the particle domain. The set method modifies the parent class LowerBound and UpperBound.

Definition at line 70 of file itkPSMImageDomain.h.

71  {
72  this->Modified();
73  m_Image= I;
74 
75  // Set up the scalar image and interpolation.
76  m_ScalarInterpolator->SetInputImage(m_Image);
77 
78  // Grab the upper-left and lower-right corners of the bounding box. Points
79  // are always in physical coordinates, not image index coordinates.
80  typename ImageType::RegionType::IndexType idx
81  = m_Image->GetRequestedRegion().GetIndex(); // upper lh corner
82  typename ImageType::RegionType::SizeType sz
83  = m_Image->GetRequestedRegion().GetSize(); // upper lh corner
84 
85  typename ImageType::PointType l0;
86  m_Image->TransformIndexToPhysicalPoint(idx, l0);
87  typename ImageType::PointType u0;
88  m_Image->TransformIndexToPhysicalPoint(idx + sz, u0);
89 
90  // Cast points to higher precision if needed. Parent class uses doubles
91  // because they are compared directly with points in the particle system,
92  // which are always double precision.
93  typename Superclass::PointType l;
94  typename Superclass::PointType u;
95 
96  for (unsigned int i = 0; i < VDimension; i++)
97  {
98  l[i] = static_cast<double>(l0[i]);
99  u[i] = static_cast<double>(u0[i]);
100  }
101 
102  this->SetLowerBound(l);
103  this->SetUpperBound(u);
104  }
Point< double, VDimension > PointType

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