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 TPo
intDimension = 3 >
00036 class SpatialObjectPoint
00037 {
00038
00039
public:
00040
00042
SpatialObjectPoint(
void );
00043
00045
virtual ~SpatialObjectPoint(
void );
00046
00047 typedef SpatialObjectPoint Self;
00048 typedef Point< double, TPointDimension > PointType;
00049 typedef vnl_vector< double > VectorType;
00050 typedef RGBAPixel< float > PixelType;
00051 typedef PixelType ColorType;
00052
00054
int GetID(
void ) const;
00055
00057
void SetID(const
int newID);
00058
00060
PointType GetPosition(
void ) const;
00061
00063
void SetPosition(const
PointType & newX);
00064
void SetPosition(const
double x0, const
double x1);
00065
void SetPosition(const
double x0, const
double x1, const
double x2);
00066
00068
unsigned short int GetNumDimensions(
void ) const;
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);
00077
00079
void SetRed(
float r );
00080
float GetRed(
void ) const;
00081
00083
void SetGreen(
float g );
00084
float GetGreen(
void ) const;
00085
00087
void SetBlue(
float b );
00088
float GetBlue(
void ) const;
00089
00091
void SetAlpha(
float a);
00092
float GetAlpha(
void ) const;
00093
00095
void Print(std::ostream &os) const;
00096
00097 protected:
00098
00100 virtual
void PrintSelf(std::ostream &os,
Indent indent) const;
00101
00103
int m_ID;
00104
00106
PointType m_X;
00107
00109 PixelType m_Color;
00110
00112 unsigned short int m_NumDimensions;
00113
00114 };
00115
00116 }
00117
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkSpatialObjectPoint.txx"
00120 #endif
00121
00122 #endif