00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSpatialObjectPoint_h
00019 #define __itkSpatialObjectPoint_h
00020
00021 #include "itkPoint.h"
00022 #include "itkLightObject.h"
00023 #include "vnl/vnl_vector_fixed.h"
00024 #include "itkRGBAPixel.h"
00025
00026 namespace itk
00027 {
00028
00036 template < unsigned int TPointDimension = 3 >
00037 class ITK_EXPORT SpatialObjectPoint
00038 : public LightObject
00039 {
00040
00041 public:
00042
00043 typedef SpatialObjectPoint Self;
00044 typedef LightObject Superclass;
00045 typedef SmartPointer<Self> Pointer;
00046 typedef const SmartPointer< const Self > ConstPointer;
00047 typedef Point< double, TPointDimension > PointType;
00048 typedef vnl_vector< double > VectorType;
00049 typedef VectorType * VectorPointer;
00050 typedef RGBAPixel< float > PixelType;
00051
00052 itkNewMacro( SpatialObjectPoint );
00053
00054 itkTypeMacro( SpatialObjectPoint, LightObject );
00055
00057 unsigned int GetId( void );
00058
00060 void SetId(const unsigned int newID);
00061
00063 Self & GetReference( void );
00064
00066 Pointer GetPointer( void );
00067
00069 ConstPointer GetConstPointer( void ) {return this;}
00070
00072 PointType GetPosition( void ) const;
00073
00075 void SetPosition(const PointType & newX);
00076 void SetPosition(const double x0, const double x1);
00077 void SetPosition(const double x0, const double x1, const double x2);
00078
00080 unsigned short int GetNumDimensions( void ) const;
00081
00083 Self & operator=(const SpatialObjectPoint & rhs);
00084
00086 const PixelType & GetColor( void ) const;
00087 void SetColor(const PixelType & color );
00088
00090 void SetRed( float r );
00091 float GetRed( void ) const;
00092
00094 void SetGreen( float g );
00095 float GetGreen( void ) const;
00096
00098 void SetBlue( float b );
00099 float GetBlue( void ) const;
00100
00102 void SetAlpha( float a);
00103 float GetAlpha( void ) const;
00104
00105 protected:
00106
00108 SpatialObjectPoint( void );
00109
00111 ~SpatialObjectPoint( void );
00112
00114 void PrintSelf(std::ostream &os, Indent indent) const;
00115
00117 unsigned int m_ID;
00118
00120 PointType m_X;
00121
00123 PixelType m_Color;
00124
00126 unsigned short int m_NumDimensions;
00127
00128 };
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkSpatialObjectPoint.txx"
00134 #endif
00135
00136 #endif // __itkSpatialObjectPoint_h