ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImageRandomConstIteratorWithIndex.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 itkImageRandomConstIteratorWithIndex_h
19#define itkImageRandomConstIteratorWithIndex_h
20
23#include <type_traits> // For remove_const_t.
24
25namespace itk
26{
116template <typename TImage>
117class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithIndex : public ImageConstIteratorWithIndex<TImage>
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 using typename Superclass::IndexValueType;
136 using typename Superclass::OffsetValueType;
137 using typename Superclass::SizeValueType;
138
141
143
146 ImageRandomConstIteratorWithIndex(const TImage * ptr, const RegionType & region);
147
158
160 void
162 {
163 this->RandomJump();
165 }
166
168 void
174
176 [[nodiscard]] bool
177 IsAtBegin() const
178 {
179 return m_NumberOfSamplesDone == 0L;
180 }
181
183 [[nodiscard]] bool
184 IsAtEnd() const
185 {
187 }
188
191 Self &
193 {
194 this->RandomJump();
196 return *this;
197 }
198
201 Self &
203 {
204 this->RandomJump();
206 return *this;
207 }
208
210 void
215
216 [[nodiscard]] SizeValueType
218 {
220 }
221
223 void
225
226 void
228
229private:
231 void
233
239};
240
241// Deduction guide for class template argument deduction (CTAD).
242template <typename TImage>
243ImageRandomConstIteratorWithIndex(SmartPointer<TImage>, const typename TImage::RegionType &)
245
246} // end namespace itk
247
248#ifndef ITK_MANUAL_INSTANTIATION
249# include "itkImageRandomConstIteratorWithIndex.hxx"
250#endif
251
252#endif
typename OffsetType::OffsetValueType OffsetValueType
Self & operator=(const Self &it)
typename SizeType::SizeValueType SizeValueType
typename IndexType::IndexValueType IndexValueType
typename PixelContainer::Pointer PixelContainerPointer
typename TImage::InternalPixelType InternalPixelType
typename TImage::PixelContainer PixelContainer
A multi-dimensional image iterator that visits a random set of pixels within an image region.
~ImageRandomConstIteratorWithIndex() override=default
Statistics::MersenneTwisterRandomVariateGenerator::Pointer GeneratorPointer
ImageRandomConstIteratorWithIndex(const TImage *ptr, const RegionType &region)
ImageRandomConstIteratorWithIndex(const ImageConstIteratorWithIndex< TImage > &it)
Implements transparent reference counting.
static Pointer New()
Method for creation through the object factory.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86
ImageRandomConstIteratorWithIndex(SmartPointer< TImage >, const typename TImage::RegionType &) -> ImageRandomConstIteratorWithIndex< std::remove_const_t< TImage > >