ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkRegionConstrainedSubsampler.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 
24 namespace itk {
25 namespace Statistics {
50 template < typename TSample, typename TRegion >
52 {
53 public:
57  typedef typename Superclass::Baseclass Baseclass;
60 
63 
65  typedef TSample SampleType;
66  typedef typename SampleType::ConstPointer SampleConstPointer;
67  typedef typename TSample::MeasurementVectorType MeasurementVectorType;
68  typedef typename TSample::InstanceIdentifier InstanceIdentifier;
69 
74 
76  typedef TRegion RegionType;
77  typedef typename RegionType::IndexType IndexType;
79  typedef typename RegionType::SizeType SizeType;
80 
83  void SetSampleRegion(const RegionType& region);
84 
86  itkGetConstReferenceMacro( SampleRegion, RegionType );
87 
89  itkGetConstReferenceMacro(SampleRegionInitialized, bool);
90 
93  void SetRegionConstraint(const RegionType& region);
94 
96  itkGetConstReferenceMacro( RegionConstraint, RegionType );
97 
99  itkGetConstReferenceMacro(RegionConstraintInitialized, bool);
100 
106  virtual void Search(const InstanceIdentifier& query,
107  SubsamplePointer& results) ITK_OVERRIDE = 0;
108 
109 protected:
115  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
116 
119 
120  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
121 
126 
127 private:
128  RegionConstrainedSubsampler(const Self&) ITK_DELETE_FUNCTION;
129  void operator=(const Self&) ITK_DELETE_FUNCTION;
130 
131 }; // end of class RegionConstrainedSubsampler
132 
133 } // end of namespace Statistics
134 } // end of namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkRegionConstrainedSubsampler.hxx"
138 #endif
139 
140 #endif
Light weight base class for most itk classes.
SubsampleType::InstanceIdentifierHolder InstanceIdentifierHolder
RegionConstrainedSubsampler< TSample, TRegion > Self
signed long IndexValueType
Definition: itkIntTypes.h:150
This class stores a subset of instance identifiers from another sample object. You can create a subsa...
Definition: itkSubsample.h:41
void SetRegionConstraint(const RegionType &region)
This an abstract subsampler that constrains subsamples to be contained within a given image region...
void SetSampleRegion(const RegionType &region)
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void Search(const InstanceIdentifier &query, SubsamplePointer &results) override=0
virtual LightObject::Pointer InternalClone() const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
This is the base subsampler class which defines the subsampler API.
std::vector< InstanceIdentifier > InstanceIdentifierHolder
Definition: itkSubsample.h:74