go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageGridSampler.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 itkImageGridSampler_h
19#define itkImageGridSampler_h
20
21#include "itkImageSamplerBase.h"
22
23namespace itk
24{
25
43template <class TInputImage>
44class ITK_TEMPLATE_EXPORT ImageGridSampler : public ImageSamplerBase<TInputImage>
45{
46public:
48
52 using Pointer = SmartPointer<Self>;
53 using ConstPointer = SmartPointer<const Self>;
54
56 itkNewMacro(Self);
57
60
62 using typename Superclass::DataObjectPointer;
65 using typename Superclass::InputImageType;
66 using typename Superclass::InputImagePointer;
70 using typename Superclass::ImageSampleType;
73 using typename Superclass::MaskType;
74
76 itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension);
77
80 // using typename Superclass::InputImageSpacingType;
82
84 using SampleGridSpacingType = typename InputImageType::OffsetType;
85 using SampleGridSpacingValueType = typename SampleGridSpacingType::OffsetValueType;
86 using SampleGridSizeType = typename InputImageType::SizeType;
88 using InputImageSizeType = typename InputImageType::SizeType;
89
95 void
97
98 itkGetConstReferenceMacro(SampleGridSpacing, SampleGridSpacingType);
99
116 void
117 SetNumberOfSamples(unsigned long nrofsamples) override;
118
122 bool
124 {
125 return false;
126 }
127
128
130 bool
132 {
133 return false;
134 }
135
136
137protected:
139 ImageGridSampler() = default;
140
142 ~ImageGridSampler() override = default;
143
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
149 void
150 GenerateData() override;
151
153 SampleGridSpacingType m_SampleGridSpacing{ itk::MakeFilled<SampleGridSpacingType>(1) };
154
156 unsigned long m_RequestedNumberOfSamples{ 0 };
157};
158
159} // end namespace itk
160
161#ifndef ITK_MANUAL_INSTANTIATION
162# include "itkImageGridSampler.hxx"
163#endif
164
165#endif // end #ifndef itkImageGridSampler_h
Samples image voxels on a regular grid.
SmartPointer< const Self > ConstPointer
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
~ImageGridSampler() override=default
typename InputImageType::OffsetType SampleGridSpacingType
bool SelectNewSamplesOnUpdate() override
typename InputImageType::SizeType SampleGridSizeType
bool SelectingNewSamplesOnUpdateSupported() const override
void GenerateData() override
void SetSampleGridSpacing(const SampleGridSpacingType &arg)
ImageGridSampler()=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::IndexType InputImageIndexType
ITK_DISALLOW_COPY_AND_MOVE(ImageGridSampler)
InputImageIndexType SampleGridIndexType
typename InputImageType::SizeType InputImageSizeType
typename SampleGridSpacingType::OffsetValueType SampleGridSpacingValueType
void SetNumberOfSamples(unsigned long nrofsamples) override
A class that defines an image sample, which is the coordinates of a point and its value.
This class is a base class for any image sampler.
typename InputImageType::PointType InputImagePointType
SpatialObject< Self::InputImageDimension > MaskType
typename InputImageType::IndexType InputImageIndexType
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
TOutputVectorContainer OutputVectorContainerType
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo