Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkImageIterator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageIterator.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef __vtkImageIterator_h
00029 #define __vtkImageIterator_h
00030 
00031 #include "vtkSystemIncludes.h"
00032 class vtkImageData;
00033 
00034 template<class DType>
00035 class vtkImageIterator 
00036 {
00037 public:        
00038   typedef DType *SpanIterator;
00039   
00041   vtkImageIterator(vtkImageData *id, int *ext);
00042 
00044   void NextSpan();
00045 
00047 
00048   SpanIterator BeginSpan()
00049     {
00050       return this->Pointer;
00051     }
00053 
00055 
00056   SpanIterator EndSpan()
00057     {
00058       return this->SpanEndPointer;
00059     }
00061     
00063 
00064   int IsAtEnd()
00065     {
00066     return (this->Pointer >= this->EndPointer);
00067     }
00069 
00070 protected:
00071   DType *Pointer;
00072   DType *SpanEndPointer;
00073   DType *SliceEndPointer;
00074   DType *EndPointer;
00075   vtkIdType    Increments[3];
00076   vtkIdType    ContinuousIncrements[3];
00077 };
00078 
00079 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
00080 #include "vtkImageIterator.txx"
00081 #endif 
00082 
00083 #endif

Generated on Mon Jan 21 23:07:19 2008 for VTK by  doxygen 1.4.3-20050530