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

#include <itkPSMImageDomainWithHessians.h>

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

Public Types

typedef PSMImageDomainWithHessians Self
 
typedef PSMImageDomainWithGradients< T, VDimension > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::PointType PointType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::ScalarInterpolatorType ScalarInterpolatorType
 
typedef vnl_matrix_fixed< T, VDimension, VDimension > VnlMatrixType
 
- Public Types inherited from itk::PSMImageDomainWithGradients< T, VDimension >
typedef PSMImageDomainWithGradients Self
 
typedef PSMImageDomain< T, VDimension > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::PointType PointType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::ScalarInterpolatorType ScalarInterpolatorType
 
typedef GradientImageFilter< ImageTypeGradientImageFilterType
 
typedef GradientImageFilterType::OutputImageType GradientImageType
 
typedef VectorLinearInterpolateImageFunction< GradientImageType, typename PointType::CoordRepType > GradientInterpolatorType
 
typedef FixedArray< T, VDimension > VectorType
 
typedef vnl_vector_fixed< T, VDimension > VnlVectorType
 
- Public Types inherited from itk::PSMImageDomain< T, VDimension >
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 (PSMImageDomainWithHessians, PSMImageDomainWithGradients)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
void SetImage (ImageType *I)
 
VnlMatrixType SampleHessianVnl (const PointType &p) const
 
 itkSetMacro (Sigma, double)
 
 itkGetMacro (Sigma, double)
 
ScalarInterpolatorType::Pointer * GetInterpolators ()
 
ImageType::Pointer * GetPartialDerivatives ()
 
- Public Member Functions inherited from itk::PSMImageDomainWithGradients< T, VDimension >
 itkNewMacro (Self)
 
 itkTypeMacro (PSMImageDomainWithGradients, PSMImageDomain)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
void SetImage (ImageType *I)
 
 itkGetObjectMacro (GradientImage, GradientImageType)
 
VectorType SampleGradient (const PointType &p) const
 
VnlVectorType SampleGradientVnl (const PointType &p) const
 
VnlVectorType SampleNormalVnl (const PointType &p, T epsilon=1.0e-5) const
 
 itkGetObjectMacro (GradientInterpolator, GradientInterpolatorType)
 
virtual bool ApplyVectorConstraints (vnl_vector_fixed< double, VDimension > &gradE, const PointType &pos, double) const
 
- Public Member Functions inherited from itk::PSMImageDomain< T, VDimension >
 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
 
void DeletePartialDerivativeImages ()
 
- Protected Member Functions inherited from itk::PSMImageDomainWithGradients< T, VDimension >
void PrintSelf (std::ostream &os, Indent indent) const
 
- Protected Member Functions inherited from itk::PSMImageDomain< T, VDimension >
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::PSMImageDomainWithHessians< T, VDimension >

An image domain that extends PSMImageDomainWithHessianGradients with Hessian information. Hessian values are interpolated with the SampleHessians(point) method. Hessians may be smoothed by specifying a sigma for Gaussian blurring of the image prior to initialization.

See also
PSMImageDomain
ParticleClipRegionDomain
PSMDomain

Definition at line 45 of file itkPSMImageDomainWithHessians.h.

Member Typedef Documentation

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

Point type of the domain (not necessarily of the image).

Definition at line 57 of file itkPSMImageDomainWithHessians.h.

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

Standard class typedefs

Definition at line 50 of file itkPSMImageDomainWithHessians.h.

Member Function Documentation

template<class T , unsigned int VDimension>
ScalarInterpolatorType::Pointer* itk::PSMImageDomainWithHessians< T, VDimension >::GetInterpolators ( )
inline

Access interpolators and partial derivative images.

Definition at line 161 of file itkPSMImageDomainWithHessians.h.

162  { return m_Interpolators; }
template<class T , unsigned int VDimension>
itk::PSMImageDomainWithHessians< T, VDimension >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class T , unsigned int VDimension>
itk::PSMImageDomainWithHessians< T, VDimension >::itkSetMacro ( Sigma  ,
double   
)

Set /Get the standard deviation for blurring the image prior to computation of the Hessian derivatives. This value must be set prior to initializing this class with an input image pointer and cannot be changed once the class is initialized..

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

Dimensionality of the domain of the particle system.

template<class T , unsigned int VDimension>
itk::PSMImageDomainWithHessians< T, VDimension >::itkTypeMacro ( PSMImageDomainWithHessians< T, VDimension >  ,
PSMImageDomainWithGradients   
)

Run-time type information (and related methods).

template<class T , unsigned int VDimension>
VnlMatrixType itk::PSMImageDomainWithHessians< T, VDimension >::SampleHessianVnl ( const PointType p) const
inline

Sample the Hessian at a point. This method performs no bounds checking. To check bounds, use IsInsideBuffer. SampleHessiansVnl returns a vnl matrix of size VDimension x VDimension.

Definition at line 135 of file itkPSMImageDomainWithHessians.h.

136  {
137  VnlMatrixType ans;
138  for (unsigned int i = 0; i < VDimension; i++)
139  { ans[i][i] = m_Interpolators[i]->Evaluate(p); }
140 
141  // Cross derivatives
142  unsigned int k = VDimension;
143  for (unsigned int i =0; i < VDimension; i++)
144  {
145  for (unsigned int j = i+1; j < VDimension; j++, k++)
146  {
147  ans[i][j] = ans[j][i] = m_Interpolators[k]->Evaluate(p);
148  }
149  }
150  return ans;
151  }
template<class T , unsigned int VDimension>
void itk::PSMImageDomainWithHessians< 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 74 of file itkPSMImageDomainWithHessians.h.

75  {
77 
78  typename DiscreteGaussianImageFilter<ImageType, ImageType>::Pointer
79  gaussian = DiscreteGaussianImageFilter<ImageType, ImageType>::New();
80  gaussian->SetVariance(m_Sigma * m_Sigma);
81  gaussian->SetInput(this->GetImage());
82  gaussian->SetUseImageSpacingOn();
83  gaussian->Update();
84 
85  // Compute the second derivatives and set up the interpolators
86  for (unsigned int i = 0; i < VDimension; i++)
87  {
88  typename DerivativeImageFilter<ImageType, ImageType>::Pointer
89  deriv = DerivativeImageFilter<ImageType, ImageType>::New();
90  deriv->SetInput(gaussian->GetOutput());
91  deriv->SetDirection(i);
92  deriv->SetOrder(2);
93  deriv->SetUseImageSpacingOn();
94  deriv->Update();
95 
96  m_PartialDerivatives[i] = deriv->GetOutput();
97 
98  m_Interpolators[i] = ScalarInterpolatorType::New();
99  m_Interpolators[i]->SetInputImage(m_PartialDerivatives[i]);
100  }
101 
102  // Compute the cross derivatives and set up the interpolators
103  unsigned int k = VDimension;
104  for (unsigned int i = 0; i < VDimension; i++)
105  {
106  for (unsigned int j = i+1; j < VDimension; j++, k++)
107  {
108  typename DerivativeImageFilter<ImageType, ImageType>::Pointer
109  deriv1 = DerivativeImageFilter<ImageType, ImageType>::New();
110  deriv1->SetInput(gaussian->GetOutput());
111  deriv1->SetDirection(i);
112  deriv1->SetUseImageSpacingOn();
113  deriv1->SetOrder(1);
114  deriv1->Update();
115 
116  typename DerivativeImageFilter<ImageType, ImageType>::Pointer
117  deriv2 = DerivativeImageFilter<ImageType, ImageType>::New();
118  deriv2->SetInput(deriv1->GetOutput());
119  deriv2->SetDirection(j);
120  deriv2->SetUseImageSpacingOn();
121  deriv2->SetOrder(1);
122 
123  deriv2->Update();
124 
125  m_PartialDerivatives[k] = deriv2->GetOutput();
126  m_Interpolators[k] = ScalarInterpolatorType::New();
127  m_Interpolators[k]->SetInputImage(m_PartialDerivatives[k]);
128  }
129  }
130  } // end setimage

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