ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSubsamplerBase.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 itkSubsamplerBase_h
19#define itkSubsamplerBase_h
20
21#include "itkObject.h"
22#include "itkSample.h"
23#include "itkSubsample.h"
24
25namespace itk::Statistics
26{
45
46template <typename TSample>
47class ITK_TEMPLATE_EXPORT SubsamplerBase : public Object
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(SubsamplerBase);
51
55 using Baseclass = Self;
58
60 itkOverrideGetNameOfClassMacro(SubsamplerBase);
61
64
66 using SampleType = TSample;
67 using SampleConstPointer = typename SampleType::ConstPointer;
68 using MeasurementVectorType = typename TSample::MeasurementVectorType;
69 using InstanceIdentifier = typename TSample::InstanceIdentifier;
70
75 using SeedType = unsigned int;
76
79 itkSetConstObjectMacro(Sample, SampleType);
80 itkGetConstObjectMacro(Sample, SampleType);
82
87 itkSetMacro(CanSelectQuery, bool);
88 itkGetConstReferenceMacro(CanSelectQuery, bool);
89 itkBooleanMacro(CanSelectQuery);
91
96 itkSetMacro(Seed, SeedType);
97 itkGetConstReferenceMacro(Seed, SeedType);
99
102 virtual void
104 {
106 {
108 this->Modified();
109 }
110 }
111
117 virtual void
118 Search(const InstanceIdentifier & query, SubsamplePointer & results) = 0;
119
120protected:
126 typename LightObject::Pointer
127 InternalClone() const override;
128
130 ~SubsamplerBase() override = default;
131
132 void
133 PrintSelf(std::ostream & os, Indent indent) const override;
134
139}; // end of class SubsamplerBase
140
141} // namespace itk::Statistics
142
143#ifndef ITK_MANUAL_INSTANTIATION
144# include "itkSubsamplerBase.hxx"
145#endif
146
147#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
SmartPointer< Self > Pointer
virtual void Modified() const
Implements transparent reference counting.
A collection of measurements for statistical analysis.
Definition itkSample.h:61
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
SmartPointer< Self > Pointer
std::vector< InstanceIdentifier > InstanceIdentifierHolder
typename TSample::InstanceIdentifier InstanceIdentifier
void PrintSelf(std::ostream &os, Indent indent) const override
typename SampleType::ConstPointer SampleConstPointer
typename SubsampleType::ConstIterator SubsampleConstIterator
virtual void Search(const InstanceIdentifier &query, SubsamplePointer &results)=0
typename SubsampleType::InstanceIdentifierHolder InstanceIdentifierHolder
SmartPointer< const Self > ConstPointer
typename SubsampleType::Pointer SubsamplePointer
typename TSample::MeasurementVectorType MeasurementVectorType
~SubsamplerBase() override=default
LightObject::Pointer InternalClone() const override