00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkLandmarkSpatialObject_h
00019 #define __itkLandmarkSpatialObject_h
00020
00021 #include <list>
00022
00023 #include "itkPointBasedSpatialObject.h"
00024 #include "itkSpatialObjectPoint.h"
00025
00026 namespace itk
00027 {
00028
00038 template < unsigned int TDimension = 3 >
00039 class LandmarkSpatialObject
00040 :public PointBasedSpatialObject< TDimension >
00041 {
00042
00043 public:
00044
00045 typedef LandmarkSpatialObject Self;
00046 typedef PointBasedSpatialObject< TDimension> Superclass;
00047 typedef SmartPointer < Self > Pointer;
00048 typedef SmartPointer < const Self > ConstPointer;
00049 typedef double ScalarType;
00050 typedef SpatialObjectPoint< TDimension > LandmarkPointType;
00051 typedef std::vector < LandmarkPointType > PointListType;
00052 typedef typename Superclass::SpatialObjectPointType SpatialObjectPointType;
00053 typedef typename Superclass::PointType PointType;
00054 typedef typename Superclass::TransformType TransformType;
00055 typedef VectorContainer<unsigned long,PointType> PointContainerType;
00056 typedef SmartPointer<PointContainerType> PointContainerPointer;
00057
00059 itkNewMacro( Self );
00060
00062 itkTypeMacro( Self, Superclass );
00063
00065 PointListType & GetPoints( void );
00066
00068 const PointListType & GetPoints( void ) const;
00069
00071 void SetPoints( PointListType & newPoints );
00072
00073
00075 const SpatialObjectPointType* GetPoint(unsigned long id) const {return &(m_Points[id]);}
00076
00078 unsigned long GetNumberOfPoints(void) const {return m_Points.size();}
00079
00082 bool IsEvaluableAt( const PointType & point,
00083 unsigned int depth=0, char *name = NULL ) const;
00084
00089 bool ValueAt( const PointType & point, double & value,
00090 unsigned int depth=0, char *name = NULL ) const;
00091
00093 bool IsInside( const PointType & point,
00094 unsigned int depth=0, char *name = NULL ) const;
00095
00097 bool ComputeBoundingBox( void ) const;
00098
00099 protected:
00100
00101 PointListType m_Points;
00102
00103 LandmarkSpatialObject();
00104 virtual ~LandmarkSpatialObject();
00105
00107 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00108 };
00109
00110 }
00111
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkLandmarkSpatialObject.txx"
00114 #endif
00115
00116 #endif // __itkLandmarkSpatialObject_h