ITK  5.2.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  * http://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 
63 
65  itkNewMacro(Self);
66 
68  using SampleType = typename Superclass::SampleType;
69  using SampleConstPointer = typename Superclass::SampleConstPointer;
70  using MeasurementVectorType = typename Superclass::MeasurementVectorType;
71  using InstanceIdentifier = typename Superclass::InstanceIdentifier;
72 
73  using SubsampleType = typename Superclass::SubsampleType;
74  using SubsamplePointer = typename Superclass::SubsamplePointer;
75  using SubsampleConstIterator = typename Superclass::SubsampleConstIterator;
76  using InstanceIdentifierHolder = typename Superclass::InstanceIdentifierHolder;
77 
78  using SearchSizeType = typename Superclass::SearchSizeType;
79  using RandomIntType = typename Superclass::RandomIntType;
81  using RadiusType = typename Superclass::RadiusType;
83  using IndexType = typename Superclass::IndexType;
84  using SizeType = typename Superclass::SizeType;
85  using ImageHelperType = typename Superclass::ImageHelperType;
86 
87  using RealType = double;
88 
89  using RandomGeneratorType = 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 
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::SampleType
typename Superclass::SampleType SampleType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:68
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::ImageHelperType
typename Superclass::ImageHelperType ImageHelperType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:85
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::Baseclass
typename Superclass::Baseclass Baseclass
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:57
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RealType
double RealType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:87
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::m_Variance
RealType m_Variance
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:120
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::InstanceIdentifier
typename Superclass::InstanceIdentifier InstanceIdentifier
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:71
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SubsampleType
typename Superclass::SubsampleType SubsampleType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:73
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::InstanceIdentifierHolder
typename Superclass::InstanceIdentifierHolder InstanceIdentifierHolder
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:76
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::IndexType
typename Superclass::IndexType IndexType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:83
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SearchSizeType
typename Superclass::SearchSizeType SearchSizeType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:78
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RandomIntType
typename Superclass::RandomIntType RandomIntType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:79
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SubsampleConstIterator
typename Superclass::SubsampleConstIterator SubsampleConstIterator
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:75
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SizeType
typename Superclass::SizeType SizeType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:84
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RandomGeneratorType
typename Superclass::RandomGeneratorType RandomGeneratorType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:89
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:81
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SubsamplePointer
typename Superclass::SubsamplePointer SubsamplePointer
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:74
itk::Statistics::GaussianRandomSpatialNeighborSubsampler
A subsampler that randomly selects points according to a gaussian distribution within the specified r...
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:48
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::MeasurementVectorType
typename Superclass::MeasurementVectorType MeasurementVectorType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:70
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::RegionType
typename Superclass::RegionType RegionType
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:82
itkUniformRandomSpatialNeighborSubsampler.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::GaussianRandomSpatialNeighborSubsampler::SampleConstPointer
typename Superclass::SampleConstPointer SampleConstPointer
Definition: itkGaussianRandomSpatialNeighborSubsampler.h:69