ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkImageSliceConstIteratorWithIndex.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __itkImageSliceConstIteratorWithIndex_h
19
#define __itkImageSliceConstIteratorWithIndex_h
20
21
#include "
itkImageConstIteratorWithIndex.h
"
22
23
namespace
itk
24
{
113
template
<
typename
TImage >
114
class
ITK_EXPORT
ImageSliceConstIteratorWithIndex
:
public
ImageConstIteratorWithIndex
< TImage >
115
{
116
public
:
118
typedef
ImageSliceConstIteratorWithIndex
Self
;
119
typedef
ImageConstIteratorWithIndex< TImage >
Superclass
;
120
122
typedef
typename
Superclass::IndexType
IndexType
;
123
typedef
typename
Superclass::SizeType
SizeType
;
124
typedef
typename
Superclass::OffsetType
OffsetType
;
125
typedef
typename
Superclass::RegionType
RegionType
;
126
typedef
typename
Superclass::ImageType
ImageType
;
127
typedef
typename
Superclass::PixelContainer
PixelContainer
;
128
typedef
typename
Superclass::PixelContainerPointer
PixelContainerPointer
;
129
typedef
typename
Superclass::InternalPixelType
InternalPixelType
;
130
typedef
typename
Superclass::PixelType
PixelType
;
131
typedef
typename
Superclass::AccessorType
AccessorType
;
132
134
ImageSliceConstIteratorWithIndex
():
ImageConstIteratorWithIndex
< TImage >() {}
135
138
ImageSliceConstIteratorWithIndex
(
const
ImageType
*ptr,
139
const
RegionType
& region):
140
ImageConstIteratorWithIndex
< TImage >(ptr, region)
141
{
142
m_Direction_A = 0;
143
m_Direction_B = 1;
144
}
146
153
ImageSliceConstIteratorWithIndex
(
const
ImageConstIteratorWithIndex< TImage >
& it)
154
{ this->
ImageConstIteratorWithIndex< TImage >::operator=
(it); }
155
158
void
NextLine(
void
);
159
161
void
GoToBeginOfSlice(
void
);
162
165
void
NextSlice(
void
);
166
169
void
PreviousLine(
void
);
170
173
void
PreviousSlice(
void
);
174
176
bool
IsAtEndOfLine(
void
);
177
179
bool
IsAtEndOfSlice(
void
);
180
182
bool
IsAtReverseEndOfLine(
void
);
183
185
bool
IsAtReverseEndOfSlice(
void
);
186
188
void
SetFirstDirection(
unsigned
int
direction);
189
191
void
SetSecondDirection(
unsigned
int
direction);
192
196
inline
Self & operator++();
197
201
inline
Self & operator--();
202
203
private
:
204
SizeValueType
m_PixelJump
;
205
SizeValueType
m_LineJump
;
206
unsigned
int
m_Direction_A
;
207
unsigned
int
m_Direction_B
;
208
};
209
}
// end namespace itk
210
211
#ifndef ITK_MANUAL_INSTANTIATION
212
#include "itkImageSliceConstIteratorWithIndex.hxx"
213
#endif
214
215
#endif
216
Generated on Tue Jul 10 2012 23:30:27 for ITK by
1.8.1