ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkInterpolateImagePointsFilter.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 /*=========================================================================
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 
32 #include "itkImageToImageFilter.h"
33 #include "itkImageRegionIterator.h"
34 
35 namespace itk
36 {
76 template< typename TInputImage,
77  typename TOutputImage,
78  typename TCoordType = typename TInputImage::PixelType,
79  typename InterpolatorType = BSplineInterpolateImageFunction< TInputImage, TCoordType > >
80 class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter:
81  public ImageToImageFilter< TInputImage, TOutputImage >
82 {
83 public:
84  ITK_DISALLOW_COPY_AND_ASSIGN(InterpolateImagePointsFilter);
85 
91 
94 
96  itkNewMacro(Self);
97 
99  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
100 
102  using InputImageType = typename Superclass::InputImageType;
103  using OutputImageType = typename Superclass::OutputImageType;
104  using InputImagePointer = typename Superclass::InputImagePointer;
105 
107  using OutputImagePointer = typename TOutputImage::Pointer;
110 
112  using PixelType = typename TOutputImage::PixelType;
113 
115  using InterpolatorPointer = typename InterpolatorType::Pointer;
116  using ContinuousIndexType = typename InterpolatorType::ContinuousIndexType;
117 
120 
123  Self::ImageDimension >;
124 
129  void SetInputImage(const TInputImage *inputImage);
130 
133  void SetInterpolationCoordinate(const CoordImageType *coordinate, unsigned int setDimension);
134 
136  itkSetMacro(DefaultPixelValue, PixelType);
137 
139  itkGetConstMacro(DefaultPixelValue, PixelType);
140 
143  { return m_Interpolator; }
144 
147  void GenerateOutputInformation() override;
148 
150  void GenerateInputRequestedRegion() override;
151 
152 #ifdef ITK_USE_CONCEPT_CHECKING
153  // Begin concept checking
154  itkConceptMacro( InputHasNumericTraitsCheck,
156  // End concept checking
157 #endif
158 
159 protected:
161  // ~InterpolateImagePointsFilter(){} default implemnetation ok
162 
163  void PrintSelf(std::ostream & os, Indent indent) const override;
164 
167  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
168 
169 
175  void VerifyInputInformation() ITKv5_CONST override {}
176 
177 private:
178 
183 
185  PixelType m_DefaultPixelValue; // default pixel value if the
186  // point is outside the image
187 };
188 } // namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkInterpolateImagePointsFilter.hxx"
192 #endif
193 
194 #endif
typename OutputImageType::Pointer OutputImagePointer
A Function object used to dispatching to a routine to copy a region (start index and size)...
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename CoordImageType::Pointer CoordImageTypePointer
typename TOutputImage::PixelType PixelType
typename InputImageType::Pointer InputImagePointer
typename InterpolatorType::ContinuousIndexType ContinuousIndexType
typename OutputImageType::RegionType OutputImageRegionType
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
typename InterpolatorType::Pointer InterpolatorPointer
Resamples an image at the coordinates specified by the user.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
typename CoordImageType::RegionType CoordImageRegionType
Templated n-dimensional image class.
Definition: itkImage.h:75
A multi-dimensional iterator templated over image type that walks a region of pixels.