go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkElasticBodyReciprocalSplineKernelTransform2.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: itkElasticBodyReciprocalSplineKernelTransform2.h,v $
22 Date: $Date: 2006/04/17 01:50:19 $
23 Version: $Revision: 1.8 $
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 itkElasticBodyReciprocalSplineKernelTransform2_h
34#define itkElasticBodyReciprocalSplineKernelTransform2_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
57 : public KernelTransform2<TScalarType, NDimensions>
58{
59public:
61
65
66 using Pointer = SmartPointer<Self>;
67 using ConstPointer = SmartPointer<const Self>;
68
71
73 itkNewMacro(Self);
74
76 using typename Superclass::ScalarType;
77
79 using typename Superclass::ParametersType;
80
82 using typename Superclass::JacobianType;
83
85 itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
86
90 // itkSetMacro( Alpha, TScalarType ); Cant use the macro because the matrices must be recomputed
91 void
92 SetAlpha(TScalarType Alpha) override
93 {
94 this->m_Alpha = Alpha;
95 this->m_LMatrixComputed = false;
96 this->m_LInverseComputed = false;
97 this->m_WMatrixComputed = false;
98 }
99
100
102 itkGetConstMacro(Alpha, TScalarType);
103
105 void
106 SetPoissonRatio(const TScalarType Nu) override
107 {
108 if (Nu > -1.0 && Nu < 0.5)
109 {
110 this->SetAlpha(8.0 * (1.0 - Nu) - 1.0);
111 }
112 }
113
114
115 const TScalarType
116 GetPoissonRatio() const override
117 {
118 return 1.0 - (this->m_Alpha + 1.0) / 8.0;
119 }
120
121
124 using typename Superclass::InputPointType;
125 using typename Superclass::OutputPointType;
126 using typename Superclass::InputVectorType;
127 using typename Superclass::OutputVectorType;
128 using typename Superclass::InputCovariantVectorType;
129 using typename Superclass::OutputCovariantVectorType;
130
131protected:
134 void
135 PrintSelf(std::ostream & os, Indent indent) const override;
136
139 using typename Superclass::GMatrixType;
140
149 void
150 ComputeG(const InputVectorType & x, GMatrixType & GMatrix) const override;
151
153 TScalarType m_Alpha{};
154};
155
156} // namespace itk
157
158#ifndef ITK_MANUAL_INSTANTIATION
159# include "itkElasticBodyReciprocalSplineKernelTransform2.hxx"
160#endif
161
162#endif // itkElasticBodyReciprocalSplineKernelTransform2_h
void ComputeG(const InputVectorType &x, GMatrixType &GMatrix) const override
itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension)
~ElasticBodyReciprocalSplineKernelTransform2() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
ITK_DISALLOW_COPY_AND_MOVE(ElasticBodyReciprocalSplineKernelTransform2)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo