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