VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Imaging
Core
vtkImageStencilIterator.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkImageStencilIterator.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
=========================================================================*/
25
#ifndef __vtkImageStencilIterator_h
26
#define __vtkImageStencilIterator_h
27
28
#include "
vtkSystemIncludes.h
"
29
#include "vtkImagingCoreModule.h"
30
class
vtkImageData
;
31
class
vtkImageStencilData
;
32
class
vtkAlgorithm
;
33
34
template
<
class
DType>
35
class
VTKIMAGINGCORE_EXPORT
vtkImageStencilIterator
36
{
37
public
:
40
vtkImageStencilIterator
();
41
43
46
vtkImageStencilIterator
(
47
vtkImageData
*
image
,
vtkImageStencilData
*stencil,
int
extent
[6],
48
vtkAlgorithm
*algorithm=0,
int
threadId=0);
50
52
55
void
Initialize(
56
vtkImageData
*image,
vtkImageStencilData
*stencil,
int
extent[6]);
58
60
62
bool
IsInStencil()
63
{
64
return
this->InStencil;
65
}
67
70
void
NextSpan();
71
73
74
bool
IsAtEnd()
75
{
76
return
(this->Pointer == this->EndPointer);
77
}
79
81
82
DType *BeginSpan()
83
{
84
return
this->Pointer;
85
}
87
89
90
DType *EndSpan()
91
{
92
return
this->SpanEndPointer;
93
}
95
96
protected
:
97
99
void
SetSpanState(
int
idX);
100
104
void
ReportProgress();
105
106
// Pointers
107
DType *
Pointer
;
// current iterator position within data
108
DType *
SpanEndPointer
;
// end of current span
109
DType *
RowEndPointer
;
// end of current row
110
DType *
SliceEndPointer
;
// end of current slice
111
DType *
EndPointer
;
// end of data
112
113
// Increments
114
vtkIdType
PixelIncrement
;
// to next pixel
115
vtkIdType
RowIncrement
;
// to same position in next row
116
vtkIdType
SliceIncrement
;
// to same position in next slice
117
vtkIdType
RowEndIncrement
;
// from end of row to start of next row
118
vtkIdType
SliceEndIncrement
;
// from end of slice to start of next slice
119
120
// Stencil-related items
121
bool
HasStencil
;
122
bool
InStencil
;
123
int
SpanSliceEndIncrement
;
124
int
SpanSliceIncrement
;
125
int
SpanMinX
;
126
int
SpanMaxX
;
127
int
SpanMinY
;
128
int
SpanMaxY
;
129
int
SpanMinZ
;
130
int
SpanMaxZ
;
131
int
SpanIndexX
;
132
int
SpanIndexY
;
133
int
SpanIndexZ
;
134
int
*
SpanCountPointer
;
135
int
**
SpanListPointer
;
136
137
// Progress-related items
138
vtkAlgorithm
*
Algorithm
;
139
vtkIdType
Count
;
140
vtkIdType
Target
;
141
};
142
143
#ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
144
#include "vtkImageStencilIterator.txx"
145
#endif
146
147
#endif
148
// VTK-HeaderTest-Exclude: vtkImageStencilIterator.h
Generated on Thu May 24 2012 22:22:24 for VTK by
1.8.1