ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkWarpMeshFilter.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 #ifndef itkWarpMeshFilter_h
19 #define itkWarpMeshFilter_h
20 
21 #include "itkMeshToMeshFilter.h"
22 
23 namespace itk
24 {
41 template< typename TInputMesh, typename TOutputMesh, typename TDisplacementField >
42 class ITK_TEMPLATE_EXPORT WarpMeshFilter:
43  public MeshToMeshFilter< TInputMesh, TOutputMesh >
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(WarpMeshFilter);
47 
53 
54  using InputMeshType = TInputMesh;
55  using InputMeshPointer = typename InputMeshType::Pointer;
56 
57  using OutputMeshType = TOutputMesh;
58  using OutputMeshPointer = typename OutputMeshType::Pointer;
59 
61  using CoordRepType = typename TInputMesh::CoordRepType;
62 
64  using DisplacementFieldType = TDisplacementField;
65  using DisplacementFieldPointer = typename DisplacementFieldType::ConstPointer;
66  using DisplacementType = typename DisplacementFieldType::PixelType;
67 
69  itkNewMacro(Self);
70 
72  itkTypeMacro(WarpMeshFilter, MeshToMeshFilter);
73 
75  void SetDisplacementField(const DisplacementFieldType *field);
76 
78  const DisplacementFieldType * GetDisplacementField() const;
79 
80 protected:
82  ~WarpMeshFilter() override = default;
83  void PrintSelf(std::ostream & os, Indent indent) const override;
84 
86  void GenerateData() override;
87 };
88 } // end namespace itk
89 
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "itkWarpMeshFilter.hxx"
92 #endif
93 
94 #endif
Light weight base class for most itk classes.
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
typename TInputMesh::CoordRepType CoordRepType
typename InputMeshType::Pointer InputMeshPointer
typename DisplacementFieldType::PixelType DisplacementType
TDisplacementField DisplacementFieldType
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
typename DisplacementFieldType::ConstPointer DisplacementFieldPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
WarpMeshFilter applies a deformation field to all the points of a mesh. The deformation field is repr...