VTK
vtkImageIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef __vtkImageIterator_h
29 #define __vtkImageIterator_h
30 
31 #include "vtkSystemIncludes.h"
32 class vtkImageData;
33 
34 template<class DType>
36 {
37 public:
38  typedef DType *SpanIterator;
39 
43 
45  vtkImageIterator(vtkImageData *id, int *ext);
46 
49  void Initialize(vtkImageData *id, int *ext);
50 
52  void NextSpan();
53 
55 
57  {
58  return this->Pointer;
59  }
61 
63 
65  {
66  return this->SpanEndPointer;
67  }
69 
71 
72  int IsAtEnd()
73  {
74  return (this->Pointer >= this->EndPointer);
75  }
77 
78 protected:
79  DType *Pointer;
82  DType *EndPointer;
83  vtkIdType Increments[3];
84  vtkIdType ContinuousIncrements[3];
85 };
86 
87 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
88 #include "vtkImageIterator.txx"
89 #endif
90 
91 #endif
SpanIterator BeginSpan()
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
SpanIterator EndSpan()
a simple image iterator