18 #ifndef itkCompositeTransform_h
19 #define itkCompositeTransform_h
86 template <
typename TParametersValueType =
double,
unsigned int VDimension = 3>
115 using typename Superclass::FixedParametersType;
116 using typename Superclass::FixedParametersValueType;
117 using typename Superclass::ParametersType;
118 using typename Superclass::ParametersValueType;
129 using typename Superclass::TransformCategoryEnum;
163 using typename Superclass::NumberOfParametersType;
169 static constexpr
unsigned int InputDimension = VDimension;
170 static constexpr
unsigned int OutputDimension = VDimension;
177 this->m_TransformsToOptimizeFlags.at(i) = state;
184 this->SetNthTransformToOptimize(i,
true);
190 this->SetNthTransformToOptimize(i,
false);
196 this->m_TransformsToOptimizeFlags.assign(this->m_TransformsToOptimizeFlags.size(), state);
203 this->SetAllTransformsToOptimize(
true);
209 this->SetAllTransformsToOptimize(
false);
218 this->SetAllTransformsToOptimize(
false);
219 this->SetNthTransformToOptimizeOn(this->GetNumberOfTransforms() - 1);
229 return this->m_TransformsToOptimizeFlags.at(i);
233 virtual const TransformsToOptimizeFlagsType &
236 return this->m_TransformsToOptimizeFlags;
242 Superclass::ClearTransformQueue();
243 this->m_TransformsToOptimizeFlags.clear();
252 GetInverse(
Self * inverse)
const;
254 InverseTransformBasePointer
255 GetInverseTransform()
const override;
272 TransformPoint(
const InputPointType & inputPoint)
const override;
275 using Superclass::TransformVector;
277 TransformVector(
const InputVectorType &)
const override;
280 TransformVector(
const InputVnlVectorType & inputVector)
const override;
282 OutputVectorPixelType
283 TransformVector(
const InputVectorPixelType & inputVector)
const override;
286 TransformVector(
const InputVectorType & inputVector,
const InputPointType & inputPoint)
const override;
289 TransformVector(
const InputVnlVectorType & inputVector,
const InputPointType & inputPoint)
const override;
291 OutputVectorPixelType
292 TransformVector(
const InputVectorPixelType & inputVector,
const InputPointType & inputPoint)
const override;
295 using Superclass::TransformCovariantVector;
296 OutputCovariantVectorType
297 TransformCovariantVector(
const InputCovariantVectorType &)
const override;
299 OutputVectorPixelType
300 TransformCovariantVector(
const InputVectorPixelType &)
const override;
302 OutputCovariantVectorType
303 TransformCovariantVector(
const InputCovariantVectorType & inputVector,
304 const InputPointType & inputPoint)
const override;
306 OutputVectorPixelType
307 TransformCovariantVector(
const InputVectorPixelType & inputVector,
const InputPointType & inputPoint)
const override;
310 using Superclass::TransformDiffusionTensor3D;
311 OutputDiffusionTensor3DType
312 TransformDiffusionTensor3D(
const InputDiffusionTensor3DType & inputTensor)
const override;
314 OutputVectorPixelType
315 TransformDiffusionTensor3D(
const InputVectorPixelType & inputTensor)
const override;
317 OutputDiffusionTensor3DType
318 TransformDiffusionTensor3D(
const InputDiffusionTensor3DType & inputTensor,
319 const InputPointType & inputPoint)
const override;
321 OutputVectorPixelType
322 TransformDiffusionTensor3D(
const InputVectorPixelType & inputTensor,
323 const InputPointType & inputPoint)
const override;
326 using Superclass::TransformSymmetricSecondRankTensor;
327 OutputSymmetricSecondRankTensorType
328 TransformSymmetricSecondRankTensor(
const InputSymmetricSecondRankTensorType & inputTensor)
const override;
330 OutputVectorPixelType
331 TransformSymmetricSecondRankTensor(
const InputVectorPixelType & inputTensor)
const override;
333 OutputSymmetricSecondRankTensorType
334 TransformSymmetricSecondRankTensor(
const InputSymmetricSecondRankTensorType & inputTensor,
335 const InputPointType & inputPoint)
const override;
337 OutputVectorPixelType
338 TransformSymmetricSecondRankTensor(
const InputVectorPixelType & inputTensor,
339 const InputPointType & inputPoint)
const override;
345 TransformCategoryEnum
346 GetTransformCategory()
const override;
358 const ParametersType &
359 GetParameters()
const override;
364 SetParameters(
const ParametersType & inputParameters)
override;
368 const FixedParametersType &
369 GetFixedParameters()
const override;
374 SetFixedParameters(
const FixedParametersType & inputParameters)
override;
378 NumberOfParametersType
379 GetNumberOfParameters()
const override;
383 NumberOfParametersType
384 GetNumberOfLocalParameters()
const override;
388 NumberOfParametersType
389 GetNumberOfFixedParameters()
const override;
394 UpdateTransformParameters(
const DerivativeType & update, ScalarType factor = 1.0)
override;
400 FlattenTransformQueue();
407 ComputeJacobianWithRespectToParameters(
const InputPointType & p, JacobianType & outJacobian)
const override;
418 ComputeJacobianWithRespectToParametersCachedTemporaries(
const InputPointType & p,
419 JacobianType & outJacobian,
420 JacobianType & cacheJacobian)
const override;
427 PrintSelf(std::ostream & os,
Indent indent)
const override;
431 InternalClone()
const override;
436 Superclass::PushFrontTransform(t);
438 this->m_TransformsToOptimizeFlags.push_front(
true);
444 Superclass::PushBackTransform(t);
446 this->m_TransformsToOptimizeFlags.push_back(
true);
452 Superclass::PopFrontTransform();
453 this->m_TransformsToOptimizeFlags.pop_front();
459 Superclass::PopBackTransform();
460 this->m_TransformsToOptimizeFlags.pop_back();
464 const TransformQueueType &
465 GetTransformsToOptimizeQueue()
const;
467 mutable TransformQueueType m_TransformsToOptimizeQueue{};
476 #ifndef ITK_MANUAL_INSTANTIATION
477 # include "itkCompositeTransform.hxx"
480 #endif // itkCompositeTransform_h