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: 2002/09/11 19:57:12 $
00007   Version:   $Revision: 1.7 $
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 #ifndef __itkContinuousIndex_h
00018 #define __itkContinuousIndex_h
00019 
00020 #include "itkPoint.h"
00021 #include "itkIndex.h"
00022 
00023 namespace itk
00024 {
00025 
00044 template<class TCoordRep = double, unsigned int VIndexDimension=2>
00045 class ContinuousIndex : public Point< TCoordRep, VIndexDimension >
00046 {
00047 public:
00049   typedef ContinuousIndex  Self;
00050   typedef Point<TCoordRep,VIndexDimension>  Superclass;
00051   
00054   typedef TCoordRep ValueType;
00055   typedef TCoordRep CoordRepType;
00056   
00058   itkStaticConstMacro(IndexDimension, unsigned int, VIndexDimension);
00059 
00061   typedef Index<VIndexDimension> IndexType;
00062 
00064   typedef typename Superclass::BaseArray            BaseArray;
00065   typedef typename BaseArray::Iterator              Iterator;
00066   typedef typename BaseArray::ConstIterator         ConstIterator;
00067   
00069   ContinuousIndex() {}
00070 
00072   ContinuousIndex(const Self& r): Superclass(r) {}
00073 //  ContinuousIndex(const Superclass& r) : Superclass(r) {}
00074   ContinuousIndex(const ValueType r[IndexDimension]): Superclass(r) {}  
00075   
00077   ContinuousIndex(const IndexType& index )
00078     {
00079     for( unsigned int i = 0; i < VIndexDimension; i++ )
00080       {
00081       (*this)[i] = TCoordRep( index[i] );
00082       }
00083     }
00084 };
00085 
00086 
00087 
00088 } // namespace itk
00089 
00090 #endif 

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