00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkTubeSpatialObject_h
00019 #define __itkTubeSpatialObject_h
00020
00021 #include <list>
00022
00023 #include "itkSpatialObject.h"
00024 #include "itkTubeSpatialObjectPoint.h"
00025
00026 namespace itk
00027 {
00028
00041 template < unsigned int TDimension = 3 , unsigned int PipelineDimension = 3 >
00042 class TubeSpatialObject
00043 :public SpatialObject< TDimension,
00044 AffineTransform<double, TDimension>,
00045 PipelineDimension
00046 >
00047 {
00048
00049 public:
00050
00051 typedef TubeSpatialObject Self;
00052 typedef SpatialObject< TDimension,
00053 AffineTransform< double, TDimension>,
00054 PipelineDimension
00055 > Superclass;
00056 typedef SmartPointer < Self > Pointer;
00057 typedef SmartPointer < const Self > ConstPointer;
00058 typedef double ScalarType;
00059 typedef itk::TubeSpatialObjectPoint< TDimension > TubePointType;
00060 typedef typename TubePointType::Pointer TubePointPointer;
00061 typedef std::list < TubePointPointer > PointListType;
00062 typedef PointListType * PointListPointer;
00063 typedef typename Superclass::PointType PointType;
00064 typedef VectorContainer<unsigned long,PointType> PointContainerType;
00065 typedef SmartPointer<PointContainerType> PointContainerPointer;
00066
00068 itkNewMacro( Self );
00069
00071 itkTypeMacro( Self, Superclass );
00072
00074 PointListPointer GetPoints( void ) const;
00075
00077 void SetPoints( PointListPointer newPoints );
00078
00081 bool CalcTangent( void );
00082
00085 bool IsEvaluableAt( const PointType & point );
00086
00091 void ValueAt( const PointType & point, double & value );
00092
00094 bool IsInside( const PointType & point );
00095
00097 void ComputeBounds( void );
00098
00101 unsigned long GetMTime( void ) const;
00102
00103 protected:
00104
00105 PointListPointer m_Points;
00106 TimeStamp m_BoundsMTime;
00107
00108 TubeSpatialObject();
00109 virtual ~TubeSpatialObject();
00110
00112 virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00113 };
00114
00115 }
00116
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118 #include "itkTubeSpatialObject.txx"
00119 #endif
00120
00121 #endif // __itkTubeSpatialObject_h