RTK  2.0.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  * 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 #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,
43  class TDVF = itk::Image< itk::CovariantVector<typename TInputImage::PixelType,
44  TInputImage::ImageDimension >,
45  TInputImage::ImageDimension > >
47  public itk::WarpImageFilter< TInputImage, TOutputImage, TDVF >
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(ForwardWarpImageFilter);
51 
57 
59  using DisplacementFieldType = TDVF;
60  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
61  using DisplacementFieldConstPointer = typename DisplacementFieldType::ConstPointer;
62  using DisplacementType = typename DisplacementFieldType::PixelType;
63 
65  using CoordRepType = double;
67 
69  itkNewMacro(Self)
70 
71 
72  itkTypeMacro(ForwardWarpImageFilter, Superclass)
73 
74 protected:
75  ForwardWarpImageFilter();
76  ~ForwardWarpImageFilter() override = default;
77 
78  void GenerateData() override;
79 
80  // Redefine stuff that is private in the Superclass
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
void GenerateData() override
void Protected_EvaluateDisplacementAtPhysicalPoint(const PointType &p, DisplacementType &output)
typename DisplacementFieldType::PixelType DisplacementType
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
ImageBaseType::IndexType IndexType
Warps an image using splat instead of interpolation.
TOutputImage::IndexType m_Protected_StartIndex
TOutputImage::IndexType m_Protected_EndIndex