ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkRegionConstrainedSubsampler.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 itkRegionConstrainedSubsampler_h
19#define itkRegionConstrainedSubsampler_h
20
21#include "itkSubsamplerBase.h"
22#include "itkImageRegion.h"
23
24namespace itk::Statistics
25{
50
51template <typename TSample, typename TRegion>
52class ITK_TEMPLATE_EXPORT RegionConstrainedSubsampler : public SubsamplerBase<TSample>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(RegionConstrainedSubsampler);
56
63
65 itkOverrideGetNameOfClassMacro(RegionConstrainedSubsampler);
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
79 using RegionType = TRegion;
80 using IndexType = typename RegionType::IndexType;
81 using IndexValueType = typename IndexType::IndexValueType;
82 using SizeType = typename RegionType::SizeType;
83
86 void
87 SetSampleRegion(const RegionType & region);
88
90 itkGetConstReferenceMacro(SampleRegion, RegionType);
91
93 itkGetConstReferenceMacro(SampleRegionInitialized, bool);
94
97 void
99
101 itkGetConstReferenceMacro(RegionConstraint, RegionType);
102
104 itkGetConstReferenceMacro(RegionConstraintInitialized, bool);
105
111 void
112 Search(const InstanceIdentifier & query, SubsamplePointer & results) override = 0;
113
114protected:
120 [[nodiscard]] typename LightObject::Pointer
121 InternalClone() const override;
122
124 ~RegionConstrainedSubsampler() override = default;
125
126 void
127 PrintSelf(std::ostream & os, Indent indent) const override;
128
133}; // end of class RegionConstrainedSubsampler
134
135} // namespace itk::Statistics
136
137#ifndef ITK_MANUAL_INSTANTIATION
138# include "itkRegionConstrainedSubsampler.hxx"
139#endif
140
141#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
SmartPointer< Self > Pointer
Implements transparent reference counting.
void SetSampleRegion(const RegionType &region)
LightObject::Pointer InternalClone() const override
void SetRegionConstraint(const RegionType &region)
typename TSample::MeasurementVectorType MeasurementVectorType
typename TSample::InstanceIdentifier InstanceIdentifier
RegionConstrainedSubsampler< TSample, TRegion > Self
void Search(const InstanceIdentifier &query, SubsamplePointer &results) override=0
typename SubsampleType::ConstIterator SubsampleConstIterator
void PrintSelf(std::ostream &os, Indent indent) const override
typename SubsampleType::InstanceIdentifierHolder InstanceIdentifierHolder
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
SmartPointer< Self > Pointer
std::vector< InstanceIdentifier > InstanceIdentifierHolder