00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkBoxSpatialObject_h
00019 #define __itkBoxSpatialObject_h
00020
00021 #include "itkSpatialObject.h"
00022 #include "itkAffineTransform.h"
00023 #include "itkFixedArray.h"
00024
00025 namespace itk
00026 {
00027
00036 template < unsigned int TDimension = 3 >
00037 class BoxSpatialObject
00038 : public SpatialObject< TDimension >
00039 {
00040
00041 public:
00042
00043 typedef BoxSpatialObject Self;
00044 typedef double ScalarType;
00045 typedef SmartPointer < Self > Pointer;
00046 typedef SmartPointer < const Self > ConstPointer;
00047 typedef SpatialObject< TDimension > Superclass;
00048 typedef SmartPointer<Superclass> SuperclassPointer;
00049 typedef typename Superclass::PointType PointType;
00050 typedef typename Superclass::TransformType TransformType;
00051 typedef typename Superclass::BoundingBoxType BoundingBoxType;
00052 typedef FixedArray<double,TDimension> SizeType;
00053 typedef VectorContainer<unsigned long,PointType> PointContainerType;
00054
00055 itkNewMacro( Self );
00056 itkTypeMacro( BoxSpatialObject, SpatialObject );
00057
00059 itkSetMacro( Size, SizeType );
00060 itkGetConstReferenceMacro( Size, SizeType);
00061
00064 virtual bool ValueAt( const PointType & point, double & value,
00065 unsigned int depth=0,
00066 char * name=NULL) const;
00067
00070 virtual bool IsEvaluableAt( const PointType & point,
00071 unsigned int depth=0,
00072 char * name=NULL) const;
00073
00075 virtual bool IsInside( const PointType & point,
00076 unsigned int depth,
00077 char *) const;
00078
00082 virtual bool IsInside( const PointType & point) const;
00083
00087 virtual bool ComputeLocalBoundingBox() const;
00088
00089 protected:
00090
00091 BoxSpatialObject( void );
00092 ~BoxSpatialObject( void );
00093
00094 SizeType m_Size;
00095
00097 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00098
00099 };
00100
00101 }
00102
00103 #ifndef ITK_MANUAL_INSTANTIATION
00104 #include "itkBoxSpatialObject.txx"
00105 #endif
00106
00107 #endif // __itkBoxSpatialObject_h
00108