ITK  5.4.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 
23 namespace itk
24 {
25 namespace Statistics
26 {
47 template <typename TSample, typename TRegion>
48 class ITK_TEMPLATE_EXPORT GaussianRandomSpatialNeighborSubsampler
49  : public UniformRandomSpatialNeighborSubsampler<TSample, TRegion>
50 {
51 public:
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 
99 protected:
105  typename LightObject::Pointer
106  InternalClone() const override;
107 
109  ~GaussianRandomSpatialNeighborSubsampler() override = default;
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
itk::Statistics::UniformRandomSpatialNeighborSubsampler
A subsampler that uniformly randomly selects points within the specified radius of the query point.
Definition: itkUniformRandomSpatialNeighborSubsampler.h:49
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::Baseclass
typename Superclass::Baseclass Baseclass
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:57
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RealType
double RealType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:87
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::Statistics::GaussianRandomSpatialNeighborSubsampler
A subsampler that randomly selects points according to a gaussian distribution within the specified r...
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:48
itkUniformRandomSpatialNeighborSubsampler.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::UniformRandomSpatialNeighborSubsampler::RandomIntType
unsigned int RandomIntType
Definition: itkUniformRandomSpatialNeighborSubsampler.h:80