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

itkScalarVector.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkScalarVector.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:25 $ 00007 Version: $Revision: 1.17 $ 00008 00009 Copyright (c) Insight Software 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 #ifndef __itkScalarVector_h 00018 #define __itkScalarVector_h 00019 00020 #include "itkMacro.h" 00021 #include "vnl/vnl_vector_fixed.h" 00022 00023 #include <memory> 00024 00025 namespace itk 00026 { 00027 00057 template<class TScalar, class TVector, unsigned int TVectorDimension=3> 00058 class ITK_EXPORT ScalarVector 00059 { 00060 public: 00062 typedef ScalarVector Self; 00063 00066 typedef TScalar ValueType; 00067 00070 typedef TScalar ScalarValueType; 00071 00074 typedef TVector VectorValueType; 00075 00078 typedef vnl_vector_fixed<TVector, TVectorDimension> VectorType; 00079 00081 TScalar GetScalar() const 00082 { return m_Scalar; } 00083 00085 void SetScalar(const TScalar &val) 00086 { m_Scalar = val; } 00087 00089 static unsigned int GetVectorDimension() 00090 { return TVectorDimension; } 00091 00094 const VectorType &GetVector() const 00095 { return m_Vector; } 00096 00099 VectorType &GetVector() 00100 { return m_Vector; } 00101 00103 void SetVector(const VectorType &vec) 00104 { m_Vector = vec; } 00105 00106 private: 00107 TScalar m_Scalar; 00108 VectorType m_Vector; 00109 }; 00110 00111 00112 } // end namespace itk 00113 00114 #endif

Generated at Sun Apr 1 02:42:52 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000