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 __itkImageRegionIteratorWithIndex_h 00019 #define __itkImageRegionIteratorWithIndex_h 00020 00021 #include "itkImageRegionConstIteratorWithIndex.h" 00022 #include "itkImageIteratorWithIndex.h" 00023 00024 namespace itk 00025 { 00070 template< typename TImage > 00071 class ITK_EXPORT ImageRegionIteratorWithIndex:public ImageRegionConstIteratorWithIndex< TImage > 00072 { 00073 public: 00075 typedef ImageRegionIteratorWithIndex Self; 00076 typedef ImageRegionConstIteratorWithIndex< TImage > Superclass; 00077 00079 typedef typename Superclass::IndexType IndexType; 00080 typedef typename Superclass::SizeType SizeType; 00081 typedef typename Superclass::OffsetType OffsetType; 00082 typedef typename Superclass::RegionType RegionType; 00083 typedef typename Superclass::ImageType ImageType; 00084 typedef typename Superclass::PixelContainer PixelContainer; 00085 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00086 typedef typename Superclass::InternalPixelType InternalPixelType; 00087 typedef typename Superclass::PixelType PixelType; 00088 typedef typename Superclass::AccessorType AccessorType; 00089 00091 ImageRegionIteratorWithIndex(); 00092 00095 ImageRegionIteratorWithIndex(TImage *ptr, const RegionType & region); 00096 00103 ImageRegionIteratorWithIndex(const ImageIteratorWithIndex< TImage > & it); 00104 00106 void Set(const PixelType & value) const 00107 { this->m_PixelAccessorFunctor.Set(*( const_cast< InternalPixelType * >( this->m_Position ) ), value); } 00108 00112 PixelType & Value(void) 00113 { return *( const_cast< InternalPixelType * >( this->m_Position ) ); } 00114 protected: 00115 00118 ImageRegionIteratorWithIndex(const ImageRegionConstIteratorWithIndex< TImage > & it); 00119 Self & operator=(const ImageRegionConstIteratorWithIndex< TImage > & it); 00120 }; 00121 } // end namespace itk 00123 00124 // Define instantiation macro for this template. 00125 #define ITK_TEMPLATE_ImageRegionIteratorWithIndex(_, EXPORT, TypeX, TypeY) \ 00126 namespace itk \ 00127 { \ 00128 _( 1 ( class EXPORT ImageRegionIteratorWithIndex< ITK_TEMPLATE_1 TypeX > ) ) \ 00129 namespace Templates \ 00130 { \ 00131 typedef ImageRegionIteratorWithIndex< ITK_TEMPLATE_1 TypeX > ImageRegionIteratorWithIndex##TypeY; \ 00132 } \ 00133 } 00134 00135 #if ITK_TEMPLATE_EXPLICIT 00136 #include "Templates/itkImageRegionIteratorWithIndex+-.h" 00137 #endif 00138 00139 #if ITK_TEMPLATE_TXX 00140 #include "itkImageRegionIteratorWithIndex.hxx" 00141 #endif 00142 00143 #endif 00144