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
25{
26namespace Statistics
27{
52
53template <typename TSample, typename TRegion>
54class ITK_TEMPLATE_EXPORT RegionConstrainedSubsampler : public SubsamplerBase<TSample>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(RegionConstrainedSubsampler);
58
65
67 itkOverrideGetNameOfClassMacro(RegionConstrainedSubsampler);
68
70 using SampleType = TSample;
71 using SampleConstPointer = typename SampleType::ConstPointer;
72 using MeasurementVectorType = typename TSample::MeasurementVectorType;
73 using InstanceIdentifier = typename TSample::InstanceIdentifier;
74
79
81 using RegionType = TRegion;
82 using IndexType = typename RegionType::IndexType;
83 using IndexValueType = typename IndexType::IndexValueType;
84 using SizeType = typename RegionType::SizeType;
85
88 void
89 SetSampleRegion(const RegionType & region);
90
92 itkGetConstReferenceMacro(SampleRegion, RegionType);
93
95 itkGetConstReferenceMacro(SampleRegionInitialized, bool);
96
99 void
101
103 itkGetConstReferenceMacro(RegionConstraint, RegionType);
104
106 itkGetConstReferenceMacro(RegionConstraintInitialized, bool);
107
113 void
114 Search(const InstanceIdentifier & query, SubsamplePointer & results) override = 0;
115
116protected:
122 typename LightObject::Pointer
123 InternalClone() const override;
124
126 ~RegionConstrainedSubsampler() override = default;
127
128 void
129 PrintSelf(std::ostream & os, Indent indent) const override;
130
135}; // end of class RegionConstrainedSubsampler
136
137} // end of namespace Statistics
138} // end of namespace itk
139
140#ifndef ITK_MANUAL_INSTANTIATION
141# include "itkRegionConstrainedSubsampler.hxx"
142#endif
143
144#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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....