ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImageRandomConstIteratorWithOnlyIndex.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 itkImageRandomConstIteratorWithOnlyIndex_h
19#define itkImageRandomConstIteratorWithOnlyIndex_h
20
23#include <type_traits> // For remove_const_t.
24
25namespace itk
26{
123template <typename TImage>
125{
126public:
130
132 using typename Superclass::IndexType;
133 using typename Superclass::SizeType;
134 using typename Superclass::OffsetType;
135 using typename Superclass::RegionType;
136 using typename Superclass::ImageType;
137 using typename Superclass::IndexValueType;
138 using typename Superclass::OffsetValueType;
139 using typename Superclass::SizeValueType;
140
143
145
148 ImageRandomConstIteratorWithOnlyIndex(const TImage * ptr, const RegionType & region);
149
160
162 void
164 {
165 this->RandomJump();
167 }
168
170 void
176
178 [[nodiscard]] bool
179 IsAtBegin() const
180 {
181 return m_NumberOfSamplesDone == 0L;
182 }
183
185 [[nodiscard]] bool
186 IsAtEnd() const
187 {
189 }
190
193 Self &
195 {
196 this->RandomJump();
198 return *this;
199 }
200
203 Self &
205 {
206 this->RandomJump();
208 return *this;
209 }
210
212 void
217
218 [[nodiscard]] SizeValueType
220 {
222 }
223
225 void
227
228 void
230
231private:
233 void
235
241};
242
243// Deduction guide for class template argument deduction (CTAD).
244template <typename TImage>
247
248} // end namespace itk
249
250#ifndef ITK_MANUAL_INSTANTIATION
251# include "itkImageRandomConstIteratorWithOnlyIndex.hxx"
252#endif
253
254#endif
typename OffsetType::OffsetValueType OffsetValueType
A multi-dimensional image iterator that visits a random set of locations within an image region,...
Statistics::MersenneTwisterRandomVariateGenerator::Pointer GeneratorPointer
ImageRandomConstIteratorWithOnlyIndex(const ImageConstIteratorWithOnlyIndex< TImage > &it)
~ImageRandomConstIteratorWithOnlyIndex() override=default
ImageRandomConstIteratorWithOnlyIndex(const TImage *ptr, const RegionType &region)
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
ImageRandomConstIteratorWithOnlyIndex(SmartPointer< TImage >, const typename TImage::RegionType &) -> ImageRandomConstIteratorWithOnlyIndex< std::remove_const_t< TImage > >