ITK  5.2.0
Insight Toolkit
itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints_h
19 #define itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints_h
20 
22 
23 namespace itk
24 {
42 template <class TInputMesh, class TOutputMesh, class TSolverTraits>
44  : public LaplacianDeformationQuadEdgeMeshFilter<TInputMesh, TOutputMesh, TSolverTraits>
45 {
46 public:
48 
54 
56  using InputMeshType = TInputMesh;
57 
58  static constexpr unsigned int InputPointDimension = InputMeshType::PointDimension;
59 
61  using OutputMeshType = TOutputMesh;
62  using OutputPointType = typename Superclass::OutputPointType;
64  using OutputPointIdentifier = typename Superclass::OutputPointIdentifier;
65 
66  static constexpr unsigned int OutputPointDimension = OutputMeshType::PointDimension;
67 
68  using SolverTraits = TSolverTraits;
69  using ValueType = typename Superclass::ValueType;
70  using MatrixType = typename Superclass::MatrixType;
72 
73  itkNewMacro(Self);
75 
76  itkSetMacro(Lambda, OutputCoordRepType);
77  itkGetMacro(Lambda, OutputCoordRepType);
78 
79  void
80  SetLocalLambda(OutputPointIdentifier vId, OutputCoordRepType iL);
81 
82 protected:
85  void
86  PrintSelf(std::ostream & os, Indent indent) const override;
87 
92  void
93  FillMatrix(MatrixType & iM, VectorType & iBx, VectorType & iBy, VectorType & iBz);
94 
95  void
96  GenerateData() override;
97 
98  using ConstraintMapType = typename Superclass::ConstraintMapType;
99  using ConstraintMapConstIterator = typename Superclass::ConstraintMapConstIterator;
100 
101  using OutputMapPointIdentifier = typename Superclass::OutputMapPointIdentifier;
102  using OutputMapPointIdentifierIterator = typename Superclass::OutputMapPointIdentifierIterator;
103  using OutputMapPointIdentifierConstIterator = typename Superclass::OutputMapPointIdentifierConstIterator;
104 
105 
106  using RowType = typename Superclass::RowType;
107  using RowConstIterator = typename Superclass::RowConstIterator;
108  using RowIterator = typename Superclass::RowIterator;
109 
110  void
111  ComputeVertexIdMapping() override;
112 
115 
116  std::unordered_map<OutputPointIdentifier, OutputCoordRepType> m_LocalLambdaSquare;
117 };
118 } // end namespace itk
119 
120 #include "itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.hxx"
121 
122 #endif
itk::LaplacianDeformationQuadEdgeMeshFilter::OutputMapPointIdentifierConstIterator
typename OutputMapPointIdentifier::const_iterator OutputMapPointIdentifierConstIterator
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:213
itk::LaplacianDeformationQuadEdgeMeshFilter::SolverTraits
TSolverTraits SolverTraits
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:147
itk::LaplacianDeformationQuadEdgeMeshFilter::VectorType
typename SolverTraits::VectorType VectorType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:150
itk::LaplacianDeformationQuadEdgeMeshFilter::ConstraintMapType
std::unordered_map< OutputPointIdentifier, OutputVectorType > ConstraintMapType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:215
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LaplacianDeformationQuadEdgeMeshFilter::OutputMapPointIdentifierIterator
typename OutputMapPointIdentifier::iterator OutputMapPointIdentifierIterator
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:212
itk::MeshToMeshFilter::InputMeshType
TInputMesh InputMeshType
Definition: itkMeshToMeshFilter.h:65
itk::LaplacianDeformationQuadEdgeMeshFilter::RowType
std::unordered_map< OutputPointIdentifier, OutputCoordRepType > RowType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:233
itkLaplacianDeformationQuadEdgeMeshFilter.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LaplacianDeformationQuadEdgeMeshFilter::OutputMapPointIdentifier
std::unordered_map< OutputPointIdentifier, OutputPointIdentifier > OutputMapPointIdentifier
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:211
itk::LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints
Laplacian deformation with soft constraints (approximating displacement for handle points).
Definition: itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h:43
itk::LaplacianDeformationQuadEdgeMeshFilter::ConstraintMapConstIterator
typename ConstraintMapType::const_iterator ConstraintMapConstIterator
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:216
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputCoordRepType
typename OutputMeshType::CoordRepType OutputCoordRepType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:79
itk::LaplacianDeformationQuadEdgeMeshFilter::OutputCoordRepType
typename Superclass::OutputCoordRepType OutputCoordRepType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:138
itk::LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints::m_Lambda
OutputCoordRepType m_Lambda
Definition: itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h:113
itk::LaplacianDeformationQuadEdgeMeshFilter::ValueType
typename SolverTraits::ValueType ValueType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:148
itk::LaplacianDeformationQuadEdgeMeshFilter::MatrixType
typename SolverTraits::MatrixType MatrixType
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:149
itk::LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints::m_LocalLambdaSquare
std::unordered_map< OutputPointIdentifier, OutputCoordRepType > m_LocalLambdaSquare
Definition: itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h:116
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LaplacianDeformationQuadEdgeMeshFilter
(abstract) base class for laplacian surface mesh deformation.
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:116
itk::MeshSource::OutputMeshType
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
itk::LaplacianDeformationQuadEdgeMeshFilter::RowConstIterator
typename RowType::const_iterator RowConstIterator
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:235
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointIdentifier
typename OutputMeshType::PointIdentifier OutputPointIdentifier
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:81
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointType
typename OutputMeshType::PointType OutputPointType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:80
itk::LaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints::m_LambdaSquare
OutputCoordRepType m_LambdaSquare
Definition: itkLaplacianDeformationQuadEdgeMeshFilterWithSoftConstraints.h:114
itk::LaplacianDeformationQuadEdgeMeshFilter::RowIterator
typename RowType::iterator RowIterator
Definition: itkLaplacianDeformationQuadEdgeMeshFilter.h:234