ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImageSliceIteratorWithIndex.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 itkImageSliceIteratorWithIndex_h
19#define itkImageSliceIteratorWithIndex_h
20
22#include <type_traits> // For remove_const_t.
23
24namespace itk
25{
113template <typename TImage>
114class ITK_TEMPLATE_EXPORT ImageSliceIteratorWithIndex : public ImageIteratorWithIndex<TImage>
115{
116 template <typename>
118
119public:
123
125 using typename Superclass::IndexType;
126 using typename Superclass::SizeType;
127 using typename Superclass::OffsetType;
128 using typename Superclass::RegionType;
129 using typename Superclass::ImageType;
130 using typename Superclass::PixelContainer;
132 using typename Superclass::InternalPixelType;
133 using typename Superclass::PixelType;
134 using typename Superclass::AccessorType;
135
138
141 ImageSliceIteratorWithIndex(TImage * ptr, const RegionType & region)
142 : Superclass(ptr, region)
143 , m_PixelJump(0)
144 , m_LineJump(0)
145 , m_Direction_A(0)
146 , m_Direction_B(1)
147 {}
148
155 template <typename TOtherImage, std::enable_if_t<detail::IsImageIteratorConvertible_v<TOtherImage, TImage>, int> = 0>
159
161 template <typename TOtherImage, std::enable_if_t<detail::IsImageIteratorConvertible_v<TOtherImage, TImage>, int> = 0>
169
172 void
174
176 void
178
181 void
183
186 void
188
191 void
193
195 [[nodiscard]] bool
197
199 [[nodiscard]] bool
201
203 [[nodiscard]] bool
205
207 [[nodiscard]] bool
209
211 void
212 SetFirstDirection(unsigned int direction);
213
215 void
216 SetSecondDirection(unsigned int direction);
217
221 inline Self &
223
227 inline Self &
229
230private:
233 unsigned int m_Direction_A{ 0 };
234 unsigned int m_Direction_B{ 1 };
235};
236
237// Deduction guides for class template argument deduction (CTAD).
238template <typename TImage>
239ImageSliceIteratorWithIndex(SmartPointer<TImage>, const typename TImage::RegionType &)
241
242template <typename TImage>
244
254template <typename TImage>
272
273// Deduction guides for class template argument deduction (CTAD).
274template <typename TImage>
275ImageSliceConstIteratorWithIndex(const TImage *, const typename TImage::RegionType &)
277
278template <typename TImage>
279ImageSliceConstIteratorWithIndex(SmartPointer<TImage>, const typename TImage::RegionType &)
281
282template <typename TImage>
285
286} // end namespace itk
287
288#ifndef ITK_MANUAL_INSTANTIATION
289# include "itkImageSliceIteratorWithIndex.hxx"
290#endif
291
292#endif
A base class for multi-dimensional iterators templated over image type that are designed to efficient...
typename TImage::PixelType PixelType
typename PixelContainer::Pointer PixelContainerPointer
typename SizeType::SizeValueType SizeValueType
detail::IteratorImageType_t< TImage > ImageType
typename TImage::AccessorType AccessorType
typename TImage::InternalPixelType InternalPixelType
typename TImage::PixelContainer PixelContainer
typename TImage::OffsetType OffsetType
typename TImage::RegionType RegionType
typename TImage::IndexType IndexType
Read-only ImageSliceIteratorWithIndex: ImageSliceConstIteratorWithIndex<TImage> behaves as ImageSlice...
ImageSliceIteratorWithIndex< std::add_const_t< TImage > > Superclass
Multi-dimensional image iterator which only walks a region.
ImageSliceIteratorWithIndex(const ImageSliceIteratorWithIndex< TOtherImage > &it)
ImageIteratorWithIndex< TImage > Superclass
void SetFirstDirection(unsigned int direction)
void SetSecondDirection(unsigned int direction)
ImageSliceIteratorWithIndex(const ImageIteratorWithIndex< TOtherImage > &it)
ImageSliceIteratorWithIndex(TImage *ptr, const RegionType &region)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ImageSliceConstIteratorWithIndex(const TImage *, const typename TImage::RegionType &) -> ImageSliceConstIteratorWithIndex< TImage >
ImageSliceIteratorWithIndex(SmartPointer< TImage >, const typename TImage::RegionType &) -> ImageSliceIteratorWithIndex< TImage >