00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkReflectiveImageRegionConstIterator_h
00018
#define __itkReflectiveImageRegionConstIterator_h
00019
00020
#include "itkImageConstIteratorWithIndex.h"
00021
00022
namespace itk
00023 {
00024
00051
template<
typename TImage>
00052 class ITK_EXPORT ReflectiveImageRegionConstIterator :
public ImageConstIteratorWithIndex<TImage>
00053 {
00054
public:
00056 typedef ReflectiveImageRegionConstIterator
Self;
00057 typedef ImageConstIteratorWithIndex<TImage> Superclass;
00058
00063 typedef typename TImage::IndexType
IndexType;
00064
00069 typedef TImage
ImageType;
00070
00075 typedef typename TImage::PixelContainer
PixelContainer;
00076 typedef typename PixelContainer::Pointer
PixelContainerPointer;
00077
00083 typedef typename TImage::RegionType
RegionType;
00084
00087 typedef typename TImage::OffsetType
OffsetType;
00088 typedef typename OffsetType::OffsetValueType
OffsetValueType;
00089
00091 ReflectiveImageRegionConstIterator() ;
00092
00094 ~ReflectiveImageRegionConstIterator() {};
00095
00098 ReflectiveImageRegionConstIterator( TImage *ptr,
const RegionType& region );
00099
00102 ReflectiveImageRegionConstIterator(
const Self& it );
00103
00104
00112 ReflectiveImageRegionConstIterator(
const ImageConstIteratorWithIndex<TImage> &it);
00113
00116 Self &operator=(
const Self& it);
00117
00118
bool IsReflected(
unsigned int)
const;
00119
00127 Self & operator++();
00128
00130
void GoToBegin(
void);
00131
00133 bool IsAtBegin(
void)
const
00134
{
00135
return !m_Remaining;
00136 }
00137
00140 void SetBeginOffset(
const OffsetType& offset)
00141 { m_BeginOffset = offset; }
00142
00145 void SetEndOffset(
const OffsetType& offset)
00146 { m_EndOffset = offset; }
00147
00150 OffsetType GetBeginOffset(
const OffsetType& offset)
00151 {
return m_BeginOffset; }
00152
00155 OffsetType GetEndOffset(
const OffsetType& offset)
00156 {
return m_EndOffset; }
00157
00159
void FillOffsets(
const OffsetValueType &value);
00160
00161
private:
00162
bool m_IsFirstPass[TImage::ImageDimension];
00163 OffsetType m_BeginOffset;
00164 OffsetType m_EndOffset;
00165
00166 };
00167
00168 }
00169
00170
#ifndef ITK_MANUAL_INSTANTIATION
00171
#include "itkReflectiveImageRegionConstIterator.txx"
00172
#endif
00173
00174
#endif