Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Utilities
ITK
Code
Common
itkConditionalConstIterator.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Insight Segmentation & Registration Toolkit
4
Module: $RCSfile: itkConditionalConstIterator.h,v $
5
Language: C++
6
Date: $Date: 2007-01-30 20:56:07 $
7
Version: $Revision: 1.10 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
15
16
=========================================================================*/
17
#ifndef __itkConditionalConstIterator_h
18
#define __itkConditionalConstIterator_h
19
20
#include "
itkIndex.h
"
21
22
namespace
itk
23
{
24
37
template
<
class
TImage>
38
class
ConditionalConstIterator
{
39
public
:
41
typedef
ConditionalConstIterator
Self
;
42
47
itkStaticConstMacro(
NDimension
,
unsigned
int
, TImage::ImageDimension);
48
50
typedef
typename
TImage::IndexType
IndexType
;
51
53
typedef
typename
TImage::SizeType
SizeType
;
54
56
typedef
typename
TImage::RegionType
RegionType
;
57
59
typedef
TImage
ImageType
;
60
62
typedef
typename
TImage::InternalPixelType
InternalPixelType
;
63
65
typedef
typename
TImage::PixelType
PixelType
;
66
68
virtual
bool
IsPixelIncluded
(
const
IndexType
& index)
const
= 0;
69
72
Self
&
operator=
(
const
Self
& it)
73
{
74
m_Image
= it.
m_Image
;
// copy the smart pointer
75
m_Region
= it.
m_Region
;
// copy the region
76
return
*
this
;
77
}
78
80
static
unsigned
int
GetIteratorDimension
()
81
{
return
TImage::ImageDimension;}
82
84
virtual
const
IndexType
GetIndex
() = 0;
85
87
virtual
const
PixelType
&
Get
(
void
)
const
= 0;
88
90
virtual
bool
IsAtEnd
() = 0;
91
93
virtual
void
operator++
() = 0;
94
96
ConditionalConstIterator
();
97
99
virtual
~ConditionalConstIterator
();
100
101
protected
:
//made protected so other iterators can access
103
//SmartPointer<const ImageType> m_Image;
104
typename
ImageType::ConstWeakPointer
m_Image
;
105
107
RegionType
m_Region
;
108
110
bool
m_IsAtEnd
;
111
};
112
113
}
// end namespace itk
114
115
// Define instantiation macro for this template.
116
#define ITK_TEMPLATE_ConditionalConstIterator(_, EXPORT, x, y) namespace itk { \
117
_(1(class EXPORT ConditionalConstIterator< ITK_TEMPLATE_1 x >)) \
118
namespace Templates { typedef ConditionalConstIterator< ITK_TEMPLATE_1 x > \
119
ConditionalConstIterator##y; } \
120
}
121
122
#if ITK_TEMPLATE_EXPLICIT
123
# include "Templates/itkConditionalConstIterator+-.h"
124
#endif
125
126
#if ITK_TEMPLATE_TXX
127
# include "
itkConditionalConstIterator.txx
"
128
#endif
129
130
#endif
Generated at Sat May 18 2013 23:34:12 for
Orfeo Toolbox
with
doxygen 1.8.3.1