ITK  6.0.0
Insight Toolkit
itkGaussianRandomSpatialNeighborSubsampler.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 itkGaussianRandomSpatialNeighborSubsampler_h
19#define itkGaussianRandomSpatialNeighborSubsampler_h
20
22
23namespace itk
24{
25namespace Statistics
26{
47template <typename TSample, typename TRegion>
49 : public UniformRandomSpatialNeighborSubsampler<TSample, TRegion>
50{
51public:
52 ITK_DISALLOW_COPY_AND_MOVE(GaussianRandomSpatialNeighborSubsampler);
53
57 using Baseclass = typename Superclass::Baseclass;
60
62 itkOverrideGetNameOfClassMacro(GaussianRandomSpatialNeighborSubsampler);
63
65 itkNewMacro(Self);
66
68 using typename Superclass::SampleType;
69 using typename Superclass::SampleConstPointer;
70 using typename Superclass::MeasurementVectorType;
71 using typename Superclass::InstanceIdentifier;
72
73 using typename Superclass::SubsampleType;
74 using typename Superclass::SubsamplePointer;
75 using typename Superclass::SubsampleConstIterator;
76 using typename Superclass::InstanceIdentifierHolder;
77
78 using typename Superclass::SearchSizeType;
79 using typename Superclass::RandomIntType;
81 using typename Superclass::RadiusType;
82 using typename Superclass::RegionType;
83 using typename Superclass::IndexType;
84 using typename Superclass::SizeType;
85 using typename Superclass::ImageHelperType;
86
87 using RealType = double;
88
89 using typename Superclass::RandomGeneratorType;
91 static constexpr int DefaultVariance = 900;
92
94 itkSetMacro(Variance, RealType);
95
97 itkGetConstMacro(Variance, RealType);
98
99protected:
105 typename LightObject::Pointer
106 InternalClone() const override;
107
110
111 void
112 PrintSelf(std::ostream & os, Indent indent) const override;
113
118 GetIntegerVariate(RandomIntType lowerBound, RandomIntType upperBound, RandomIntType mean) override;
119
120 RealType m_Variance{};
121}; // end of class GaussianRandomSpatialNeighborSubsampler
122
123} // end of namespace Statistics
124} // end of namespace itk
125
126#ifndef ITK_MANUAL_INSTANTIATION
127# include "itkGaussianRandomSpatialNeighborSubsampler.hxx"
128#endif
129
130#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A subsampler that randomly selects points according to a gaussian distribution within the specified r...
RandomIntType GetIntegerVariate(RandomIntType lowerBound, RandomIntType upperBound, RandomIntType mean) override
LightObject::Pointer InternalClone() const override
void PrintSelf(std::ostream &os, Indent indent) const override
A subsampler that uniformly randomly selects points within the specified radius of the query point.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....