00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkGaussianSpatialObject_h
00019 #define __itkGaussianSpatialObject_h
00020
00021 #include "itkAffineTransform.h"
00022 #include "itkFixedArray.h"
00023 #include "itkSpatialObject.h"
00024 #include "itkEllipseSpatialObject.h"
00025
00026 namespace itk
00027 {
00028
00045 template < unsigned int TDimension = 3 >
00046 class GaussianSpatialObject
00047 : public SpatialObject< TDimension >
00048 {
00049
00050 public:
00051
00052 typedef GaussianSpatialObject Self;
00053 typedef double ScalarType;
00054 typedef SmartPointer < Self > Pointer;
00055 typedef SmartPointer < const Self > ConstPointer;
00056 typedef SpatialObject< TDimension > Superclass;
00057 typedef SmartPointer< Superclass > SuperclassPointer;
00058 typedef typename Superclass::PointType PointType;
00059 typedef typename Superclass::TransformType TransformType;
00060 typedef typename Superclass::BoundingBoxType BoundingBoxType;
00061
00062 itkStaticConstMacro(NumberOfDimensions, unsigned int,
00063 TDimension);
00064
00065 itkNewMacro( Self );
00066 itkTypeMacro( GaussianSpatialObject, SpatialObject );
00067
00071 itkSetMacro(Radius,ScalarType);
00072 itkGetConstReferenceMacro(Radius,ScalarType);
00073
00076 itkSetMacro(Maximum,ScalarType);
00077 itkGetConstReferenceMacro(Maximum,ScalarType);
00078
00082 ScalarType SquaredZScore( const PointType& point ) const;
00083
00085 virtual bool ValueAt( const PointType & point, ScalarType & value,
00086 unsigned int depth=0,
00087 char * name=NULL) const;
00088
00090 virtual bool IsEvaluableAt( const PointType & , unsigned int,
00091 char *) const { return true; }
00092
00094 virtual bool IsInside( const PointType & point,
00095 unsigned int depth,
00096 char * name) const;
00097
00101 virtual bool IsInside( const PointType & point) const;
00102
00105 virtual bool ComputeLocalBoundingBox() const;
00106
00109 typename EllipseSpatialObject< TDimension >::Pointer GetEllipsoid() const;
00110
00111 protected:
00112
00113 GaussianSpatialObject( void );
00114 ~GaussianSpatialObject( void );
00115
00116 ScalarType m_Maximum;
00117 ScalarType m_Radius;
00118
00120 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00121
00122 };
00123
00124 }
00125
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkGaussianSpatialObject.txx"
00128 #endif
00129
00130 #endif // __itkGaussianSpatialObject_h