ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkImageRegionIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkImageRegionIterator_h
19 #define itkImageRegionIterator_h
20 
22 
23 namespace itk
24 {
77 template< typename TImage >
78 class ITK_TEMPLATE_EXPORT ImageRegionIterator:public ImageRegionConstIterator< TImage >
79 {
80 public:
84 
86  using IndexType = typename Superclass::IndexType;
87  using SizeType = typename Superclass::SizeType;
90  using ImageType = typename Superclass::ImageType;
94  using PixelType = typename Superclass::PixelType;
96 
98  ImageRegionIterator() = default;
99 
102  ImageRegionIterator(ImageType *ptr, const RegionType & region);
103 
111 
113  void Set(const PixelType & value) const
114  {
115  this->m_PixelAccessorFunctor.Set(*( const_cast< InternalPixelType * >(
116  this->m_Buffer + this->m_Offset ) ), value);
117  }
118 
123  { return *( const_cast< InternalPixelType * >( this->m_Buffer + this->m_Offset ) ); }
124 
125 protected:
129  Self & operator=(const ImageRegionConstIterator< TImage > & it);
130 };
131 } // end namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 #include "itkImageRegionIterator.hxx"
136 #endif
137 
138 #endif
typename BufferType::OffsetType OffsetType
typename BufferType::InternalPixelType InternalPixelType
void Set(const PixelType &value) const
A multi-dimensional iterator templated over image type.
typename PixelContainer::Pointer PixelContainerPointer
typename BufferType::PixelType PixelType
typename BufferType::PixelContainer PixelContainer
A multi-dimensional image iterator templated over image type.
A multi-dimensional iterator templated over image type that walks a region of pixels.
typename BufferType::IndexType IndexType
typename BufferType::SizeType SizeType
typename BufferType::AccessorType AccessorType
typename BufferType::RegionType RegionType
A multi-dimensional iterator templated over image type that walks a region of pixels.