go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkWeightedCombinationTransform.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#ifndef itkWeightedCombinationTransform_h
19#define itkWeightedCombinationTransform_h
20
22
23namespace itk
24{
25
41template <class TScalarType, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 3>
42class ITK_TEMPLATE_EXPORT WeightedCombinationTransform
43 : public AdvancedTransform<TScalarType, NInputDimensions, NOutputDimensions>
44{
45public:
47
51 using Pointer = SmartPointer<Self>;
52 using ConstPointer = SmartPointer<const Self>;
53
55 itkNewMacro(Self);
56
59
61 itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
62 itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
63
65 using typename Superclass::ScalarType;
66 using typename Superclass::ParametersType;
67 using typename Superclass::NumberOfParametersType;
68 using typename Superclass::JacobianType;
69 using typename Superclass::InputVectorType;
70 using typename Superclass::OutputVectorType;
71 using typename Superclass::InputCovariantVectorType;
72 using typename Superclass::OutputCovariantVectorType;
73 using typename Superclass::InputVnlVectorType;
74 using typename Superclass::OutputVnlVectorType;
75 using typename Superclass::InputPointType;
76 using typename Superclass::OutputPointType;
80 using typename Superclass::SpatialHessianType;
82
84 using TransformType = Transform<TScalarType, NInputDimensions, NOutputDimensions>;
86 using TransformPointer = typename TransformType::Pointer;
87 using TransformContainerType = std::vector<TransformPointer>;
88
90 OutputPointType
91 TransformPoint(const InputPointType & inputPoint) const override;
92
94 OutputVectorType
95 TransformVector(const InputVectorType &) const override
96 {
97 itkExceptionMacro(
98 << "TransformVector(const InputVectorType &) is not implemented for WeightedCombinationTransform");
99 }
100
101
102 OutputVnlVectorType
103 TransformVector(const InputVnlVectorType &) const override
104 {
105 itkExceptionMacro(
106 << "TransformVector(const InputVnlVectorType &) is not implemented for WeightedCombinationTransform");
107 }
108
109
110 OutputCovariantVectorType
111 TransformCovariantVector(const InputCovariantVectorType &) const override
112 {
113 itkExceptionMacro(<< "TransformCovariantVector(const InputCovariantVectorType &) is not implemented for "
114 "WeightedCombinationTransform");
115 }
116
117
123 void
124 GetJacobian(const InputPointType & inputPoint, JacobianType & jac, NonZeroJacobianIndicesType & nzji) const override;
125
129 void
130 SetParameters(const ParametersType & param) override;
131
133 void
134 SetFixedParameters(const ParametersType &) override
135 {
136 // \todo: to be implemented by Stefan
137 }
138
139
141 const ParametersType &
142 GetFixedParameters() const override
143 {
144 // \todo: to be implemented by Stefan: check this:
145 return this->m_FixedParameters;
146 }
147
148
150 NumberOfParametersType
151 GetNumberOfParameters() const override
152 {
153 return this->m_TransformContainer.size();
154 }
155
156
159 itkSetMacro(NormalizeWeights, bool);
160 itkGetConstMacro(NormalizeWeights, bool);
161
163 virtual void
165 {
166 this->m_TransformContainer = transformContainer;
167 this->Modified();
168 }
169
170
180 const TransformContainerType &
182 {
183 return this->m_TransformContainer;
184 }
185
186
188 void
189 GetSpatialJacobian(const InputPointType & inputPoint, SpatialJacobianType & sj) const override
190 {
191 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
192 }
193
194
195 void
196 GetSpatialHessian(const InputPointType & inputPoint, SpatialHessianType & sh) const override
197 {
198 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
199 }
200
201
202 void
203 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
205 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override
206 {
207 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
208 }
209
210
211 void
212 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
215 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override
216 {
217 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
218 }
219
220
221 void
222 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
224 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override
225 {
226 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
227 }
228
229
230 void
231 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
234 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override
235 {
236 itkExceptionMacro(<< "Not implemented for WeightedCombinationTransform");
237 }
238
239
240protected:
242 ~WeightedCombinationTransform() override = default;
243
246
249
250private:
252};
253
254} // end namespace itk
255
256#ifndef ITK_MANUAL_INSTANTIATION
257# include "itkWeightedCombinationTransform.hxx"
258#endif
259
260#endif
Transform maps points, vectors and covariant vectors from an input space to an output space.
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Implements a weighted linear combination of multiple transforms.
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
virtual void SetTransformContainer(const TransformContainerType &transformContainer)
void SetFixedParameters(const ParametersType &) override
void GetJacobian(const InputPointType &inputPoint, JacobianType &jac, NonZeroJacobianIndicesType &nzji) const override
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions)
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
ITK_DISALLOW_COPY_AND_MOVE(WeightedCombinationTransform)
void GetSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh) const override
void GetSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj) const override
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
const ParametersType & GetFixedParameters() const override
std::vector< TransformPointer > TransformContainerType
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
void SetParameters(const ParametersType &param) override
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
const TransformContainerType & GetTransformContainer() const
OutputVectorType TransformVector(const InputVectorType &) const override
OutputPointType TransformPoint(const InputPointType &inputPoint) const override
NumberOfParametersType GetNumberOfParameters() const override
typename TransformType::Pointer TransformPointer
~WeightedCombinationTransform() override=default


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