go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkElasticBodySplineKernelTransform2.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkElasticBodySplineKernelTransform2.h,v $
22 Date: $Date: 2003/09/10 14:29:06 $
23 Version: $Revision: 1.29 $
24
25 Copyright (c) Insight Software Consortium. All rights reserved.
26 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28 This software is distributed WITHOUT ANY WARRANTY; without even
29 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30 PURPOSE. See the above copyright notices for more information.
31
32=========================================================================*/
33#ifndef itkElasticBodySplineKernelTransform2_h
34#define itkElasticBodySplineKernelTransform2_h
35
36#include "itkKernelTransform2.h"
37
38namespace itk
39{
40
53template <class TScalarType = double, // Data type for scalars (float or double)
54 unsigned int NDimensions = 3>
55// Number of dimensions
56class ITK_TEMPLATE_EXPORT ElasticBodySplineKernelTransform2 : public KernelTransform2<TScalarType, NDimensions>
57{
58public:
60
64
65 using Pointer = SmartPointer<Self>;
66 using ConstPointer = SmartPointer<const Self>;
67
70
72 itkNewMacro(Self);
73
75 using typename Superclass::ScalarType;
76
78 using typename Superclass::ParametersType;
79
81 using typename Superclass::JacobianType;
82
84 itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
85
89 // itkSetMacro( Alpha, TScalarType ); Cant use the macro because the matrices must be recomputed
90 void
91 SetAlpha(TScalarType Alpha) override
92 {
93 this->m_Alpha = Alpha;
94 this->m_LMatrixComputed = false;
95 this->m_LInverseComputed = false;
96 this->m_WMatrixComputed = false;
97 }
98
99
101 itkGetConstMacro(Alpha, TScalarType);
102
104 void
105 SetPoissonRatio(const TScalarType Nu) override
106 {
107 if (Nu > -1.0 && Nu < 0.5)
108 {
109 this->SetAlpha(12.0 * (1.0 - Nu) - 1.0);
110 }
111 }
112
113
114 const TScalarType
115 GetPoissonRatio() const override
116 {
117 return 1.0 - (this->m_Alpha + 1.0) / 12.0;
118 }
119
120
123 using typename Superclass::InputPointType;
124 using typename Superclass::OutputPointType;
125 using typename Superclass::InputVectorType;
126 using typename Superclass::OutputVectorType;
127 using typename Superclass::InputCovariantVectorType;
128 using typename Superclass::OutputCovariantVectorType;
129
130protected:
133 void
134 PrintSelf(std::ostream & os, Indent indent) const override;
135
138 using typename Superclass::GMatrixType;
139
148 void
149 ComputeG(const InputVectorType & x, GMatrixType & GMatrix) const override;
150
155};
156
157} // namespace itk
158
159#ifndef ITK_MANUAL_INSTANTIATION
160# include "itkElasticBodySplineKernelTransform2.hxx"
161#endif
162
163#endif // itkElasticBodySplineKernelTransform2_h
void PrintSelf(std::ostream &os, Indent indent) const override
void ComputeG(const InputVectorType &x, GMatrixType &GMatrix) const override
itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension)
ITK_DISALLOW_COPY_AND_MOVE(ElasticBodySplineKernelTransform2)
~ElasticBodySplineKernelTransform2() override=default


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo