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
26{
27namespace Statistics
28{
47
48template <typename TSample>
49class ITK_TEMPLATE_EXPORT SubsamplerBase : public Object
50{
51public:
52 ITK_DISALLOW_COPY_AND_MOVE(SubsamplerBase);
53
57 using Baseclass = Self;
60
62 itkOverrideGetNameOfClassMacro(SubsamplerBase);
63
66
68 using SampleType = TSample;
69 using SampleConstPointer = typename SampleType::ConstPointer;
70 using MeasurementVectorType = typename TSample::MeasurementVectorType;
71 using InstanceIdentifier = typename TSample::InstanceIdentifier;
72
77 using SeedType = unsigned int;
78
80 itkSetConstObjectMacro(Sample, SampleType);
81 itkGetConstObjectMacro(Sample, SampleType);
83
87 itkSetMacro(CanSelectQuery, bool);
88 itkGetConstReferenceMacro(CanSelectQuery, bool);
89 itkBooleanMacro(CanSelectQuery);
91
95 itkSetMacro(Seed, SeedType);
96 itkGetConstReferenceMacro(Seed, SeedType);
98
99
102 virtual void
104 {
106 {
108 this->Modified();
109 }
110 }
111
112
118 virtual void
119 Search(const InstanceIdentifier & query, SubsamplePointer & results) = 0;
120
121protected:
127 typename LightObject::Pointer
128 InternalClone() const override;
129
131 ~SubsamplerBase() override = default;
132
133 void
134 PrintSelf(std::ostream & os, Indent indent) const override;
135
140}; // end of class SubsamplerBase
141
142} // end of namespace Statistics
143} // end of namespace itk
144
145#ifndef ITK_MANUAL_INSTANTIATION
146# include "itkSubsamplerBase.hxx"
147#endif
148
149#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:63
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....