ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkReflectiveImageRegionConstIterator_h 00019 #define __itkReflectiveImageRegionConstIterator_h 00020 00021 #include "itkImageConstIteratorWithIndex.h" 00022 00023 namespace itk 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 typedef typename TImage::SizeType SizeType; 00085 typedef typename TImage::SizeValueType SizeValueType; 00086 00089 typedef typename TImage::OffsetType OffsetType; 00090 typedef typename OffsetType::OffsetValueType OffsetValueType; 00091 00093 ReflectiveImageRegionConstIterator(); 00094 00096 ~ReflectiveImageRegionConstIterator() {} 00097 00100 ReflectiveImageRegionConstIterator(TImage *ptr, const RegionType & region); 00101 00104 ReflectiveImageRegionConstIterator(const Self & it); 00105 00113 ReflectiveImageRegionConstIterator(const ImageConstIteratorWithIndex< TImage > & it); 00114 00117 Self & operator=(const Self & it); 00118 00119 bool IsReflected(unsigned int) const; 00120 00128 Self & operator++(); 00129 00131 void GoToBegin(void); 00132 00134 bool IsAtBegin(void) const 00135 { 00136 return !this->m_Remaining; 00137 } 00138 00141 void SetBeginOffset(const OffsetType & offset) 00142 { m_BeginOffset = offset; } 00143 00146 void SetEndOffset(const OffsetType & offset) 00147 { m_EndOffset = offset; } 00148 00151 OffsetType GetBeginOffset(const OffsetType & ) 00152 { return m_BeginOffset; } 00153 00156 OffsetType GetEndOffset(const OffsetType & ) 00157 { return m_EndOffset; } 00158 00160 void FillOffsets(const OffsetValueType & value); 00161 00162 private: 00163 bool m_IsFirstPass[TImage::ImageDimension]; 00164 OffsetType m_BeginOffset; 00165 OffsetType m_EndOffset; 00166 }; 00167 } // end namespace itk 00168 00169 #ifndef ITK_MANUAL_INSTANTIATION 00170 #include "itkReflectiveImageRegionConstIterator.hxx" 00171 #endif 00172 00173 #endif 00174