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 "vnl/vnl_vector_fixed.h"
00023 #include "itkRGBAPixel.h"
00024
00025 namespace itk
00026 {
00027
00035 template < unsigned int TPointDimension = 3 >
00036 class SpatialObjectPoint
00037 {
00038
00039 public:
00040
00043 SpatialObjectPoint( void );
00044
00046 virtual ~SpatialObjectPoint( void );
00047
00048 typedef SpatialObjectPoint Self;
00049 typedef Point< double, TPointDimension > PointType;
00050 typedef vnl_vector< double > VectorType;
00051 typedef RGBAPixel< float > PixelType;
00052 typedef PixelType ColorType;
00053
00055 int GetID( void ) const;
00056
00058 void SetID(const int newID);
00059
00061 const PointType & GetPosition( void ) const;
00062
00064 void SetPosition(const PointType & newX);
00065 void SetPosition(const double x0, const double x1);
00066 void SetPosition(const double x0, const double x1, const double x2);
00067
00069 Self & operator=(const SpatialObjectPoint & rhs);
00070
00072 const PixelType & GetColor( void ) const;
00073 void SetColor(const PixelType & color );
00074 void SetColor(float r, float g, float b, float a=1);
00075
00077 void SetRed( float r );
00078 float GetRed( void ) const;
00079
00081 void SetGreen( float g );
00082 float GetGreen( void ) const;
00083
00085 void SetBlue( float b );
00086 float GetBlue( void ) const;
00087
00089 void SetAlpha( float a);
00090 float GetAlpha( void ) const;
00091
00093 void Print(std::ostream &os) const;
00094
00095 protected:
00096
00098 virtual void PrintSelf(std::ostream &os, Indent indent) const;
00099
00101 int m_ID;
00102
00104 PointType m_X;
00105
00107 PixelType m_Color;
00108
00109 };
00110
00111 }
00112
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkSpatialObjectPoint.txx"
00115 #endif
00116
00117 #endif // __itkSpatialObjectPoint_h