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 __itkImageLinearIteratorWithIndex_h 00019 #define __itkImageLinearIteratorWithIndex_h 00020 00021 #include "itkImageLinearConstIteratorWithIndex.h" 00022 #include "itkImageIteratorWithIndex.h" 00023 00024 namespace itk 00025 { 00066 template< typename TImage > 00067 class ITK_EXPORT ImageLinearIteratorWithIndex:public ImageLinearConstIteratorWithIndex< TImage > 00068 { 00069 public: 00071 typedef ImageLinearIteratorWithIndex Self; 00072 typedef ImageLinearConstIteratorWithIndex< TImage > Superclass; 00073 00075 typedef typename Superclass::IndexType IndexType; 00076 typedef typename Superclass::SizeType SizeType; 00077 typedef typename Superclass::OffsetType OffsetType; 00078 typedef typename Superclass::RegionType RegionType; 00079 typedef typename Superclass::ImageType ImageType; 00080 typedef typename Superclass::PixelContainer PixelContainer; 00081 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00082 typedef typename Superclass::InternalPixelType InternalPixelType; 00083 typedef typename Superclass::PixelType PixelType; 00084 typedef typename Superclass::AccessorType AccessorType; 00085 00087 ImageLinearIteratorWithIndex(); 00088 00091 ImageLinearIteratorWithIndex(ImageType *ptr, const RegionType & region); 00092 00099 ImageLinearIteratorWithIndex(const ImageIteratorWithIndex< TImage > & it); 00100 00102 void Set(const PixelType & value) const 00103 { this->m_PixelAccessorFunctor.Set(*( const_cast< InternalPixelType * >( this->m_Position ) ), value); } 00104 00108 PixelType & Value(void) 00109 { return *( const_cast< InternalPixelType * >( this->m_Position ) ); } 00110 protected: 00111 00114 ImageLinearIteratorWithIndex(const ImageLinearConstIteratorWithIndex< TImage > & it); 00115 Self & operator=(const ImageLinearConstIteratorWithIndex< TImage > & it); 00116 }; 00117 } // end namespace itk 00119 00120 // Define instantiation macro for this template. 00121 #define ITK_TEMPLATE_ImageLinearIteratorWithIndex(_, EXPORT, TypeX, TypeY) \ 00122 namespace itk \ 00123 { \ 00124 _( 1 ( class EXPORT ImageLinearIteratorWithIndex< ITK_TEMPLATE_1 TypeX > ) ) \ 00125 namespace Templates \ 00126 { \ 00127 typedef ImageLinearIteratorWithIndex< ITK_TEMPLATE_1 TypeX > \ 00128 ImageLinearIteratorWithIndex##TypeY; \ 00129 } \ 00130 } 00131 00132 #if ITK_TEMPLATE_EXPLICIT 00133 #include "Templates/itkImageLinearIteratorWithIndex+-.h" 00134 #endif 00135 00136 #if ITK_TEMPLATE_TXX 00137 #include "itkImageLinearIteratorWithIndex.hxx" 00138 #endif 00139 00140 #endif 00141