18 #ifndef itkUniformRandomSpatialNeighborSubsampler_h
19 #define itkUniformRandomSpatialNeighborSubsampler_h
48 template <
typename TSample,
typename TRegion>
68 using typename Superclass::SampleType;
69 using typename Superclass::SampleConstPointer;
70 using typename Superclass::MeasurementVectorType;
71 using typename Superclass::InstanceIdentifier;
73 using typename Superclass::SubsampleType;
74 using typename Superclass::SubsamplePointer;
75 using typename Superclass::SubsampleConstIterator;
76 using typename Superclass::InstanceIdentifierHolder;
83 using typename Superclass::RadiusType;
88 using typename Superclass::ImageHelperType;
97 Superclass::SetSeed(seed);
98 this->m_RandomNumberGenerator->SetSeed(this->m_Seed);
104 if (useClock != this->m_UseClockForSeed)
106 this->m_UseClockForSeed = useClock;
107 if (this->m_UseClockForSeed)
109 this->m_RandomNumberGenerator->SetSeed();
115 itkBooleanMacro(UseClockForSeed);
116 itkGetConstMacro(UseClockForSeed,
bool);
121 itkDebugMacro(
"setting NumberOfResultsRequested to " << numberRequested);
122 if (this->m_RequestMaximumNumberOfResults || this->m_NumberOfResultsRequested != numberRequested)
124 this->m_NumberOfResultsRequested = numberRequested;
125 this->m_RequestMaximumNumberOfResults =
false;
129 itkGetConstMacro(NumberOfResultsRequested, SearchSizeType);
137 Search(
const InstanceIdentifier & query, SubsamplePointer & results)
override;
146 InternalClone()
const override;
152 PrintSelf(std::ostream & os,
Indent indent)
const override;
158 virtual RandomIntType
159 GetIntegerVariate(RandomIntType lowerBound, RandomIntType upperBound, RandomIntType itkNotUsed(mean));
163 bool m_UseClockForSeed{};
169 #ifndef ITK_MANUAL_INSTANTIATION
170 # include "itkUniformRandomSpatialNeighborSubsampler.hxx"