RTK  2.6.0
Reconstruction Toolkit
rtkForwardWarpImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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  * 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 #ifndef rtkForwardWarpImageFilter_h
20 #define rtkForwardWarpImageFilter_h
21 
22 #include <itkWarpImageFilter.h>
23 
24 #include "rtkMacro.h"
25 
26 namespace rtk
27 {
28 
41 template <class TInputImage,
42  class TOutputImage = TInputImage,
44  TInputImage::ImageDimension>>
45 class ITK_TEMPLATE_EXPORT ForwardWarpImageFilter : public itk::WarpImageFilter<TInputImage, TOutputImage, TDVF>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(ForwardWarpImageFilter);
49 
55 
57  using DisplacementFieldType = TDVF;
58  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
59  using DisplacementFieldConstPointer = typename DisplacementFieldType::ConstPointer;
60  using DisplacementType = typename DisplacementFieldType::PixelType;
61 
63  using CoordRepType = double;
65 
67  itkNewMacro(Self);
68 
70 #ifdef itkOverrideGetNameOfClassMacro
71  itkOverrideGetNameOfClassMacro(ForwardWarpImageFilter);
72 #else
73  itkTypeMacro(ForwardWarpImageFilter, Superclass);
74 #endif
75 
76 
77 protected:
79  ~ForwardWarpImageFilter() override = default;
80 
81  void
82  GenerateData() override;
83 
84  // Redefine stuff that is private in the Superclass
85  void
86  Protected_EvaluateDisplacementAtPhysicalPoint(const PointType & point, DisplacementType & output);
88  typename TOutputImage::IndexType m_Protected_StartIndex;
89  typename TOutputImage::IndexType m_Protected_EndIndex;
90 };
91 
92 } // end namespace rtk
93 
94 #ifndef rtk_MANUAL_INSTANTIATION
95 # include "rtkForwardWarpImageFilter.hxx"
96 #endif
97 
98 #endif
typename DisplacementFieldType::PixelType DisplacementType
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Warps an image using splat instead of interpolation.
TOutputImage::IndexType m_Protected_StartIndex
TOutputImage::IndexType m_Protected_EndIndex