Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSpatialObjectPoint.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectPoint.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/10/31 23:21:55 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00042   SpatialObjectPoint( void );
00043 
00045   ~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 
00053   unsigned int GetId( void );
00054 
00056   void SetId(const unsigned int newID);
00057 
00059   PointType GetPosition( void ) const;
00060 
00062   void SetPosition(const PointType & newX);
00063   void SetPosition(const double x0, const double x1);
00064   void SetPosition(const double x0, const double x1, const double x2);
00065 
00067   unsigned short int GetNumDimensions( void ) const;
00068 
00070   Self & operator=(const SpatialObjectPoint & rhs);
00071 
00073   const PixelType & GetColor( void ) const;
00074   void SetColor(const PixelType & color );
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 
00092 protected:
00093 
00095   void PrintSelf(std::ostream &os, Indent indent) const;  
00096 
00098   unsigned int m_ID;
00099 
00101   PointType m_X;
00102 
00104   PixelType m_Color;
00105 
00107   unsigned short int m_NumDimensions;
00108 
00109 };
00110 
00111 } // end of namespace itk
00112 
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114   #include "itkSpatialObjectPoint.txx"
00115 #endif
00116 
00117 #endif // __itkSpatialObjectPoint_h

Generated at Fri May 21 01:15:21 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000