00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkEllipseSpatialObject_h
00019 #define __itkEllipseSpatialObject_h
00020
00021 #include "itkAffineTransform.h"
00022 #include "itkSpatialObject.h"
00023 #include "itkFixedArray.h"
00024
00025 namespace itk
00026 {
00027
00033 template < unsigned int TDimension = 3 >
00034 class EllipseSpatialObject
00035 : public SpatialObject< TDimension >
00036 {
00037
00038 public:
00039
00040 typedef EllipseSpatialObject Self;
00041 typedef double ScalarType;
00042 typedef SmartPointer < Self > Pointer;
00043 typedef SmartPointer < const Self > ConstPointer;
00044 typedef SpatialObject< TDimension > Superclass;
00045 typedef SmartPointer<Superclass> SuperclassPointer;
00046 typedef typename Superclass::PointType PointType;
00047 typedef typename Superclass::TransformType TransformType;
00048 typedef VectorContainer<unsigned long,PointType> PointContainerType;
00049 typedef SmartPointer<PointContainerType> PointContainerPointer;
00050
00051 typedef FixedArray<double,TDimension> ArrayType;
00052 itkStaticConstMacro(NumberOfDimension, unsigned int,
00053 TDimension);
00054
00055 itkNewMacro( Self );
00056 itkTypeMacro( Self, Superclass );
00057
00059 void SetRadius(double radius);
00060
00062 itkSetMacro(Radius,ArrayType);
00064 itkGetConstMacro(Radius,ArrayType);
00065
00068 virtual bool ValueAt( const PointType & point, double & value,
00069 unsigned int depth=0,
00070 char * name=NULL) const;
00071
00074 virtual bool IsEvaluableAt( const PointType & point,
00075 unsigned int depth=0,
00076 char * name=NULL) const;
00077
00079 virtual bool IsInside( const PointType & point,
00080 unsigned int depth=0,
00081 char * name=NULL) const;
00082
00086 virtual bool ComputeBoundingBox() const;
00087
00088 protected:
00089
00090 EllipseSpatialObject( void );
00091 ~EllipseSpatialObject( void );
00092
00093 ArrayType m_Radius;
00094
00096 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00097
00098 };
00099
00100 }
00101
00102 #ifndef ITK_MANUAL_INSTANTIATION
00103 #include "itkEllipseSpatialObject.txx"
00104 #endif
00105
00106 #endif // __itkEllipseSpatialObject_h