ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSpatialNeighborSubsampler.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 itkSpatialNeighborSubsampler_h
19#define itkSpatialNeighborSubsampler_h
20
22#include "itkImageHelper.h"
23
24namespace itk::Statistics
25{
47
48template <typename TSample, typename TRegion>
49class ITK_TEMPLATE_EXPORT SpatialNeighborSubsampler : public RegionConstrainedSubsampler<TSample, TRegion>
50{
51public:
52 ITK_DISALLOW_COPY_AND_MOVE(SpatialNeighborSubsampler);
53
60
62 itkOverrideGetNameOfClassMacro(SpatialNeighborSubsampler);
63
65 itkNewMacro(Self);
66
68 using typename Superclass::SampleType;
69 using typename Superclass::SampleConstPointer;
71 using typename Superclass::InstanceIdentifier;
72
73 using typename Superclass::SubsampleType;
74 using typename Superclass::SubsamplePointer;
77
79 using typename Superclass::RegionType;
80 using typename Superclass::IndexType;
81 using typename Superclass::IndexValueType;
82 using typename Superclass::SizeType;
83 using RadiusType = typename RegionType::SizeType;
84
85 static constexpr unsigned int ImageDimension = RegionType::ImageDimension;
88
91 void
92 SetRadius(const RadiusType & radius);
93 void
94 SetRadius(unsigned int radius);
97 itkGetConstReferenceMacro(Radius, RadiusType);
98
100 itkGetConstReferenceMacro(RadiusInitialized, bool);
101
107 void
108 Search(const InstanceIdentifier & query, SubsamplePointer & results) override;
109
110protected:
116 [[nodiscard]] typename LightObject::Pointer
117 InternalClone() const override;
118
120 ~SpatialNeighborSubsampler() override = default;
121
122 void
123 PrintSelf(std::ostream & os, Indent indent) const override;
124
127}; // end of class SpatialNeighborSubsampler
128
129} // namespace itk::Statistics
130
131#ifndef ITK_MANUAL_INSTANTIATION
132# include "itkSpatialNeighborSubsampler.hxx"
133#endif
134
135#endif
Fast Index/Offset computation.
Control indentation during Print() invocation.
Definition itkIndent.h:50
SmartPointer< Self > Pointer
Implements transparent reference counting.
typename TSample::MeasurementVectorType MeasurementVectorType
typename TSample::InstanceIdentifier InstanceIdentifier
typename SubsampleType::ConstIterator SubsampleConstIterator
typename SubsampleType::InstanceIdentifierHolder InstanceIdentifierHolder
void SetRadius(const RadiusType &radius)
ImageHelper< Self::ImageDimension, Self::ImageDimension > ImageHelperType
void Search(const InstanceIdentifier &query, SubsamplePointer &results) override
RegionConstrainedSubsampler< TSample, TRegion > Superclass
typename TSample::InstanceIdentifier InstanceIdentifier
void PrintSelf(std::ostream &os, Indent indent) const override
SpatialNeighborSubsampler< TSample, TRegion > Self
LightObject::Pointer InternalClone() const override