RTK  1.4.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  * 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:
55 
57  typedef TDVF DisplacementFieldType;
58  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
59  typedef typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer;
60  typedef typename DisplacementFieldType::PixelType DisplacementType;
61 
63  typedef double CoordRepType;
65 
67  itkNewMacro(Self)
68 
69 
70  itkTypeMacro(ForwardWarpImageFilter, Superclass)
71 
72 protected:
73  ForwardWarpImageFilter();
74  virtual ~ForwardWarpImageFilter() ITK_OVERRIDE {}
75 
76  void GenerateData() ITK_OVERRIDE;
77 
78  // Redefine stuff that is private in the Superclass
79  void Protected_EvaluateDisplacementAtPhysicalPoint(const PointType & p, DisplacementType &output);
81  typename TOutputImage::IndexType m_Protected_StartIndex;
82  typename TOutputImage::IndexType m_Protected_EndIndex;
83 
84 private:
85  ForwardWarpImageFilter(const Self&); //purposely not implemented
86  void operator=(const Self&); //purposely not implemented
87 };
88 
89 } // end namespace rtk
90 
91 #ifndef rtk_MANUAL_INSTANTIATION
92 #include "rtkForwardWarpImageFilter.hxx"
93 #endif
94 
95 #endif
DisplacementFieldType::PixelType DisplacementType
itk::SmartPointer< const Self > ConstPointer
void GenerateData() override
itk::Point< CoordRepType, itkGetStaticConstMacro(ImageDimension) > PointType
void Protected_EvaluateDisplacementAtPhysicalPoint(const PointType &p, DisplacementType &output)
void operator=(const Self &)
Warps an image using splat instead of interpolation.
DisplacementFieldType::Pointer DisplacementFieldPointer
TOutputImage::IndexType m_Protected_StartIndex
itk::WarpImageFilter< TInputImage, TOutputImage, TDVF > Superclass
DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
itk::SmartPointer< Self > Pointer
TOutputImage::IndexType m_Protected_EndIndex