ITK  6.0.0
Insight Toolkit
itkInterpolateImagePointsFilter.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/*=========================================================================
19 *
20 * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21 *
22 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23 *
24 * For complete copyright, license and disclaimer of warranty information
25 * please refer to the NOTICE file at the top of the ITK source tree.
26 *
27 *=========================================================================*/
28#ifndef itkInterpolateImagePointsFilter_h
29#define itkInterpolateImagePointsFilter_h
30
34
35namespace itk
36{
76template <typename TInputImage,
77 typename TOutputImage,
78 typename TCoordType = typename TInputImage::PixelType,
79 typename InterpolatorType = BSplineInterpolateImageFunction<TInputImage, TCoordType>>
80class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter : public ImageToImageFilter<TInputImage, TOutputImage>
81{
82public:
83 ITK_DISALLOW_COPY_AND_MOVE(InterpolateImagePointsFilter);
84
90
92 itkOverrideGetNameOfClassMacro(InterpolateImagePointsFilter);
93
95 itkNewMacro(Self);
96
98 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
99
101 using typename Superclass::InputImageType;
102 using typename Superclass::OutputImageType;
103 using typename Superclass::InputImagePointer;
104
109
111 using PixelType = typename TOutputImage::PixelType;
112
115 using ContinuousIndexType = typename InterpolatorType::ContinuousIndexType;
116
119
122
127 void
128 SetInputImage(const TInputImage * inputImage);
129
132 void
133 SetInterpolationCoordinate(const CoordImageType * coordinate, unsigned int setDimension);
134
136 itkSetMacro(DefaultPixelValue, PixelType);
137
139 itkGetConstMacro(DefaultPixelValue, PixelType);
140
144 {
145 return m_Interpolator;
146 }
147
150 void
152
154 void
156
157#ifdef ITK_USE_CONCEPT_CHECKING
158 // Begin concept checking
160 // End concept checking
161#endif
162
163protected:
165 // ~InterpolateImagePointsFilter(){} default implementation ok
166
167 void
168 PrintSelf(std::ostream & os, Indent indent) const override;
169
172 void
173 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
174
175
181 void
182 VerifyInputInformation() const override
183 {}
184
185private:
190
191 InterpolatorPointer m_Interpolator{};
192 PixelType m_DefaultPixelValue{}; // default pixel value if the
193 // point is outside the image
194};
195} // namespace itk
196
197#ifndef ITK_MANUAL_INSTANTIATION
198# include "itkInterpolateImagePointsFilter.hxx"
199#endif
200
201#endif
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::Pointer OutputImagePointer
A Function object used to dispatching to a routine to copy a region (start index and size).
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Resamples an image at the coordinates specified by the user.
typename InterpolatorType::Pointer InterpolatorPointer
void SetInputImage(const TInputImage *inputImage)
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void SetInterpolationCoordinate(const CoordImageType *coordinate, unsigned int setDimension)
typename TOutputImage::PixelType PixelType
void PrintSelf(std::ostream &os, Indent indent) const override
typename CoordImageType::RegionType CoordImageRegionType
void GenerateInputRequestedRegion() override
typename CoordImageType::Pointer CoordImageTypePointer
void GenerateOutputInformation() override
typename InterpolatorType::ContinuousIndexType ContinuousIndexType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....