ITK  6.0.0
Insight Toolkit
itkTransformParametersAdaptor.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 * https://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 itkTransformParametersAdaptor_h
19#define itkTransformParametersAdaptor_h
20
22#include "itkTransform.h"
23
24namespace itk
25{
54template <typename TTransform>
57 Transform<typename TTransform::ScalarType, TTransform::InputSpaceDimension, TTransform::OutputSpaceDimension>>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(TransformParametersAdaptor);
61
68
70 itkOverrideGetNameOfClassMacro(TransformParametersAdaptor);
71
74 using typename Superclass::TransformBaseType;
75 using TransformType = TTransform;
77 using typename Superclass::ParametersType;
81
83 itkSetObjectMacro(Transform, TransformType);
84
85 void
86 SetTransform(TransformBaseType * _arg, void *) override
87 {
88 auto * tx = dynamic_cast<TransformType *>(_arg);
89 itkAssertOrThrowMacro(tx != nullptr, "Unable to convert Transform to require concrete transform!");
90 this->SetTransform(tx);
91 }
92
94 itkNewMacro(Self);
95
97 void
98 SetRequiredFixedParameters(const FixedParametersType fixedParameters) override
99 {
100 itkDebugMacro("setting RequiredFixedParameters to " << fixedParameters);
101 if (this->m_RequiredFixedParameters != fixedParameters)
102 {
103 this->m_RequiredFixedParameters = fixedParameters;
104 this->Modified();
105 }
106 }
110 void
112 {}
113
114protected:
116 ~TransformParametersAdaptor() override = default;
117
118 void
119 PrintSelf(std::ostream & os, Indent indent) const override
120 {
121 Superclass::PrintSelf(os, indent);
122 itkPrintSelfObjectMacro(Transform);
123 }
124
126}; // class TransformParametersAdaptor
127} // namespace itk
128
129#endif /* itkTransformParametersAdaptor_h */
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
virtual void Modified() const
Base helper class intended for multi-resolution image registration.
typename ParametersType::ValueType ParametersValueType
typename TransformBaseType::FixedParametersValueType FixedParametersValueType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformBaseType::FixedParametersType FixedParametersType
typename TransformBaseType::ParametersType ParametersType
Base helper class intended for multi-resolution image registration.
~TransformParametersAdaptor() override=default
typename TransformType::Pointer TransformPointer
void SetRequiredFixedParameters(const FixedParametersType fixedParameters) override
void SetTransform(TransformBaseType *_arg, void *) override
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetTransform(TransformType *_arg)
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:84
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....