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

#include <itkPSMImageDomainWithCurvature.h>

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

Public Types

typedef PSMImageDomainWithCurvature Self
 
typedef PSMImageDomainWithHessians< 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 Superclass::VnlMatrixType VnlMatrixType
 
- Public Types inherited from itk::PSMImageDomainWithHessians< T, VDimension >
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 (PSMImageDomainWithCurvature, PSMImageDomainWithHessians)
 
 itkStaticConstMacro (Dimension, unsigned int, VDimension)
 
void SetImage (ImageType *I)
 
double GetCurvature (const PointType &pos) const
 
ImageType::Pointer * GetCurvatureImage ()
 
- Public Member Functions inherited from itk::PSMImageDomainWithHessians< T, VDimension >
 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
 
double MeanCurvature (const PointType &pos)
 
double vnl_trace (const VnlMatrixType &m) const
 
- Protected Member Functions inherited from itk::PSMImageDomainWithHessians< T, VDimension >
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::PSMImageDomainWithCurvature< T, VDimension >

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

See also
PSMImageDomain
ParticleClipRegionDomain
PSMDomain

Definition at line 40 of file itkPSMImageDomainWithCurvature.h.

Member Typedef Documentation

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

Standard class typedefs

Definition at line 45 of file itkPSMImageDomainWithCurvature.h.

Member Function Documentation

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

Method for creation through the object factory.

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

Dimensionality of the domain of the particle system.

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

Run-time type information (and related methods).

template<class T, unsigned int VDimension>
void itk::PSMImageDomainWithCurvature< 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 67 of file itkPSMImageDomainWithCurvature.h.

68  {
69  // Computes partial derivatives in parent class
71 
72  typedef itk::DiscreteGaussianImageFilter<ImageType, ImageType> DiscreteGaussianImageFilterType;
73  typename DiscreteGaussianImageFilterType::Pointer f = DiscreteGaussianImageFilterType::New();
74 
75  double sig = this->GetImage()->GetSpacing()[0] * 0.5;
76 
77  f->SetVariance(sig);
78  f->SetInput(this->GetImage());
79  f->SetUseImageSpacingOn();
80  f->Update();
81 
82  // NOTE: Running the image through a filter seems to be the only way
83  // to get all of the image information correct! Set the variance to
84  // positive value to smooth the curvature calculations.
85  m_CurvatureImage = f->GetOutput();
86 
87  // Loop through the image and compute all curvature values
88  itk::ImageRegionIteratorWithIndex<ImageType> it(f->GetOutput(),
89  f->GetOutput()->GetRequestedRegion());
90  itk::ImageRegionIterator<ImageType> oit(m_CurvatureImage, f->GetOutput()->GetRequestedRegion());
91 
92  for (; !it.IsAtEnd(); ++it, ++oit)
93  {
94  // Only compute in a narrow band.
95  if (it.Get() < 4.0 && it.Get() > -4.0)
96  {
97  PointType pos;
98  this->GetImage()->TransformIndexToPhysicalPoint(it.GetIndex(), pos);
99  oit.Set(this->MeanCurvature(pos));
100  }
101  else oit.Set(1.0e-6);
102  }
103 
104  // Release the memory in the parent hessian images.
105  this->DeletePartialDerivativeImages();
106 
107  m_CurvatureInterpolator->SetInputImage(m_CurvatureImage);
108  } // end setimage

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