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

itkContinuousIndex.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkContinuousIndex.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006-03-19 23:23:51 $
00007   Version:   $Revision: 1.9 $
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 __itkContinuousIndex_h
00018 #define __itkContinuousIndex_h
00019 
00020 #include "itkPoint.h"
00021 #include "itkIndex.h"
00022 
00023 namespace itk
00024 {
00025 
00043 template<class TCoordRep = double, unsigned int VIndexDimension=2>
00044 class ContinuousIndex : public Point< TCoordRep, VIndexDimension >
00045 {
00046 public:
00048   typedef ContinuousIndex                   Self;
00049   typedef Point<TCoordRep,VIndexDimension>  Superclass;
00050 
00053   typedef TCoordRep ValueType;
00054   typedef TCoordRep CoordRepType;
00055 
00057   itkStaticConstMacro(IndexDimension, unsigned int, VIndexDimension);
00058 
00060   typedef Index<VIndexDimension> IndexType;
00061 
00063   typedef typename Superclass::BaseArray            BaseArray;
00064   typedef typename BaseArray::Iterator              Iterator;
00065   typedef typename BaseArray::ConstIterator         ConstIterator;
00066 
00068   ContinuousIndex() {}
00069 
00071   ContinuousIndex(const Self& r): Superclass(r) {}
00072   ContinuousIndex(const ValueType r[IndexDimension]): Superclass(r) {}  
00074 
00076   ContinuousIndex(const IndexType& index )
00077     {
00078     for( unsigned int i = 0; i < VIndexDimension; i++ )
00079       {
00080       (*this)[i] = TCoordRep( index[i] );
00081       }
00082     }
00083 };
00085 
00086 } // namespace itk
00087 
00088 #endif 
00089 

Generated at Thu May 28 09:43:44 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000