itkSpatialObjectPoint.h
Go to the documentation of this file.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
00036 template < unsigned int TPointDimension = 3 >
00037 class ITK_EXPORT SpatialObjectPoint
00038 {
00039
00040 public:
00041
00044 SpatialObjectPoint( void );
00045
00047 virtual ~SpatialObjectPoint( void );
00048
00049 typedef SpatialObjectPoint Self;
00050 typedef Point< double, TPointDimension > PointType;
00051 typedef vnl_vector< double > VectorType;
00052 typedef RGBAPixel< float > PixelType;
00053 typedef PixelType ColorType;
00054
00056 int GetID( void ) const;
00057
00059 void SetID(const int newID);
00060
00062 const PointType & GetPosition( void ) const;
00063
00065 void SetPosition(const PointType & newX);
00066 void SetPosition(const double x0, const double x1);
00067 void SetPosition(const double x0, const double x1, const double x2);
00069
00071 Self & operator=(const SpatialObjectPoint & rhs);
00072
00074 const PixelType & GetColor( void ) const;
00075 void SetColor(const PixelType & color );
00076 void SetColor(float r, float g, float b, float a=1);
00078
00080 void SetRed( float r );
00081 float GetRed( void ) const;
00083
00085 void SetGreen( float g );
00086 float GetGreen( void ) const;
00088
00090 void SetBlue( float b );
00091 float GetBlue( void ) const;
00093
00095 void SetAlpha( float a);
00096 float GetAlpha( void ) const;
00098
00100 void Print(std::ostream &os) const;
00101
00102 protected:
00103
00105 virtual void PrintSelf(std::ostream &os, Indent indent) const;
00106
00108 int m_ID;
00109
00111 PointType m_X;
00112
00114 PixelType m_Color;
00115
00116 };
00117
00118 }
00119
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkSpatialObjectPoint.txx"
00122 #endif
00123
00124 #endif // __itkSpatialObjectPoint_h
00125