RTK  2.4.1
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  itkTypeMacro(ForwardWarpImageFilter, Superclass);
71 
72 protected:
74  ~ForwardWarpImageFilter() override = default;
75 
76  void
77  GenerateData() override;
78 
79  // Redefine stuff that is private in the Superclass
80  void
81  Protected_EvaluateDisplacementAtPhysicalPoint(const PointType & point, DisplacementType & output);
83  typename TOutputImage::IndexType m_Protected_StartIndex;
84  typename TOutputImage::IndexType m_Protected_EndIndex;
85 };
86 
87 } // end namespace rtk
88 
89 #ifndef rtk_MANUAL_INSTANTIATION
90 # include "rtkForwardWarpImageFilter.hxx"
91 #endif
92 
93 #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