ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImageSliceConstIteratorWithIndex.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkImageSliceConstIteratorWithIndex_h
19#define itkImageSliceConstIteratorWithIndex_h
20
22#include <type_traits> // For remove_const_t.
23
24namespace itk
25{
113template <typename TImage>
114class ITK_TEMPLATE_EXPORT ImageSliceConstIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
115{
116public:
120
122 using typename Superclass::IndexType;
123 using typename Superclass::SizeType;
124 using typename Superclass::OffsetType;
125 using typename Superclass::RegionType;
126 using typename Superclass::ImageType;
127 using typename Superclass::PixelContainer;
129 using typename Superclass::InternalPixelType;
130 using typename Superclass::PixelType;
131 using typename Superclass::AccessorType;
132
137
140 ImageSliceConstIteratorWithIndex(const TImage * ptr, const RegionType & region)
141 : ImageConstIteratorWithIndex<TImage>(ptr, region)
142 , m_PixelJump(0)
143 , m_LineJump(0)
144 , m_Direction_A(0)
145 , m_Direction_B(1)
146 {}
147
158
161 void
163
165 void
167
170 void
172
175 void
177
180 void
182
184 [[nodiscard]] bool
186
188 [[nodiscard]] bool
190
192 [[nodiscard]] bool
194
196 [[nodiscard]] bool
198
200 void
201 SetFirstDirection(unsigned int direction);
202
204 void
205 SetSecondDirection(unsigned int direction);
206
210 inline Self &
212
216 inline Self &
218
219private:
222 unsigned int m_Direction_A;
223 unsigned int m_Direction_B;
224};
225
226// Deduction guide for class template argument deduction (CTAD).
227template <typename TImage>
228ImageSliceConstIteratorWithIndex(SmartPointer<TImage>, const typename TImage::RegionType &)
230
231} // end namespace itk
232
233#ifndef ITK_MANUAL_INSTANTIATION
234# include "itkImageSliceConstIteratorWithIndex.hxx"
235#endif
236
237#endif
Self & operator=(const Self &it)
typename SizeType::SizeValueType SizeValueType
typename PixelContainer::Pointer PixelContainerPointer
typename TImage::InternalPixelType InternalPixelType
typename TImage::PixelContainer PixelContainer
Multi-dimensional image iterator which only walks a region.
void SetFirstDirection(unsigned int direction)
ImageSliceConstIteratorWithIndex(const ImageConstIteratorWithIndex< TImage > &it)
void SetSecondDirection(unsigned int direction)
ImageSliceConstIteratorWithIndex(const TImage *ptr, const RegionType &region)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ImageSliceConstIteratorWithIndex(SmartPointer< TImage >, const typename TImage::RegionType &) -> ImageSliceConstIteratorWithIndex< std::remove_const_t< TImage > >