ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGaussianRandomSpatialNeighborSubsampler.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 namespace Statistics {
44 template < typename TSample, typename TRegion >
45  class ITK_TEMPLATE_EXPORT GaussianRandomSpatialNeighborSubsampler : public UniformRandomSpatialNeighborSubsampler<TSample, TRegion>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(GaussianRandomSpatialNeighborSubsampler);
49 
53  using Baseclass = typename Superclass::Baseclass;
56 
60 
62  itkNewMacro(Self);
63 
65  using SampleType = typename Superclass::SampleType;
66  using SampleConstPointer = typename Superclass::SampleConstPointer;
67  using MeasurementVectorType = typename Superclass::MeasurementVectorType;
68  using InstanceIdentifier = typename Superclass::InstanceIdentifier;
69 
70  using SubsampleType = typename Superclass::SubsampleType;
71  using SubsamplePointer = typename Superclass::SubsamplePointer;
72  using SubsampleConstIterator = typename Superclass::SubsampleConstIterator;
73  using InstanceIdentifierHolder = typename Superclass::InstanceIdentifierHolder;
74 
75  using SearchSizeType = typename Superclass::SearchSizeType;
76  using RandomIntType = typename Superclass::RandomIntType;
78  using RadiusType = typename Superclass::RadiusType;
80  using IndexType = typename Superclass::IndexType;
81  using SizeType = typename Superclass::SizeType;
82  using ImageHelperType = typename Superclass::ImageHelperType;
83 
84  using RealType = double;
85 
86  using RandomGeneratorType = typename Superclass::RandomGeneratorType;
88  static constexpr int DefaultVariance = 900;
89 
91  itkSetMacro(Variance, RealType);
92 
94  itkGetConstMacro(Variance, RealType);
95 
96 protected:
102  typename LightObject::Pointer InternalClone() const override;
103 
105  ~GaussianRandomSpatialNeighborSubsampler() override = default;
106 
107  void PrintSelf(std::ostream& os, Indent indent) const override;
108 
112  RandomIntType GetIntegerVariate(RandomIntType lowerBound,
113  RandomIntType upperBound,
114  RandomIntType mean) override;
115 
117 }; // end of class GaussianRandomSpatialNeighborSubsampler
118 
119 } // end of namespace Statistics
120 } // end of namespace itk
121 
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkGaussianRandomSpatialNeighborSubsampler.hxx"
124 #endif
125 
126 #endif
Light weight base class for most itk classes.
A subsampler that uniformly randomly selects points within the specified radius of the query point...
A subsampler that randomly selects points according to a gaussian distribution within the specified r...
Control indentation during Print() invocation.
Definition: itkIndent.h:49