Loading...
Searching...
No Matches
itkEulerTransform.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkEulerTransform_h
#define itkEulerTransform_h
#include "itkAdvancedRigid2DTransform.h"
#include "itkAdvancedEuler3DTransform.h"
#include "itkAdvancedMatrixOffsetTransformBase.h"
namespace itk
{
template <unsigned int Dimension>
class ITK_TEMPLATE_EXPORT EulerGroup
{
public:
template <class TScalarType>
using TransformAlias = AdvancedMatrixOffsetTransformBase<TScalarType, Dimension, Dimension>;
};
template <>
class ITK_TEMPLATE_EXPORT EulerGroup<2>
{
public:
template <class TScalarType>
using TransformAlias = AdvancedRigid2DTransform<TScalarType>;
};
template <>
class ITK_TEMPLATE_EXPORT EulerGroup<3>
{
public:
template <class TScalarType>
using TransformAlias = AdvancedEuler3DTransform<TScalarType>;
};
template <class TScalarType, unsigned int Dimension>
using EulerGroupTemplate = typename EulerGroup<Dimension>::template TransformAlias<TScalarType>;
template <class TScalarType, unsigned int Dimension>
class ITK_TEMPLATE_EXPORT EulerTransform : public EulerGroupTemplate<TScalarType, Dimension>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(EulerTransform);
using Self = EulerTransform;
using Superclass = EulerGroupTemplate<TScalarType, Dimension>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(EulerTransform, EulerGroupTemplate);
itkStaticConstMacro(SpaceDimension, unsigned int, Dimension);
using typename Superclass::ScalarType;
using typename Superclass::ParametersType;
using typename Superclass::NumberOfParametersType;
using typename Superclass::JacobianType;
using typename Superclass::OffsetType;
using typename Superclass::InputPointType;
using typename Superclass::OutputPointType;
using typename Superclass::InputVectorType;
using typename Superclass::OutputVectorType;
using typename Superclass::InputCovariantVectorType;
using typename Superclass::OutputCovariantVectorType;
using typename Superclass::InputVnlVectorType;
using typename Superclass::OutputVnlVectorType;
using typename Superclass::NonZeroJacobianIndicesType;
using typename Superclass::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::SpatialHessianType;
using typename Superclass::JacobianOfSpatialHessianType;
using typename Superclass::InternalMatrixType;
void
SetComputeZYX(const bool) // No override.
{
static_assert(SpaceDimension != 3, "This is not the specialization is 3D!");
}
bool
GetComputeZYX() const // No override.
{
static_assert(SpaceDimension != 3, "This is not the specialization is 3D!");
return false;
}
protected:
EulerTransform() = default;
~EulerTransform() override = default;
};
template <class TScalarType>
class ITK_TEMPLATE_EXPORT EulerTransform<TScalarType, 3> : public EulerGroupTemplate<TScalarType, 3>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(EulerTransform);
using Self = EulerTransform;
using Superclass = EulerGroupTemplate<TScalarType, 3>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(EulerTransform, EulerGroupTemplate);
itkStaticConstMacro(SpaceDimension, unsigned int, 3);
void
SetComputeZYX(const bool arg) override
{
static_assert(SpaceDimension == 3, "This specialization is for 3D only!");
using Euler3DTransformType = AdvancedEuler3DTransform<TScalarType>;
typename Euler3DTransformType::Pointer transform = dynamic_cast<Euler3DTransformType *>(this);
if (transform)
{
transform->Euler3DTransformType::SetComputeZYX(arg);
}
}
bool
GetComputeZYX() const override
{
static_assert(SpaceDimension == 3, "This specialization is for 3D only!");
using Euler3DTransformType = AdvancedEuler3DTransform<TScalarType>;
typename Euler3DTransformType::ConstPointer transform = dynamic_cast<const Euler3DTransformType *>(this);
if (transform)
{
return transform->Euler3DTransformType::GetComputeZYX();
}
return false;
}
protected:
EulerTransform() = default;
~EulerTransform() override = default;
};
} // end namespace itk
#endif // end #ifndef itkEulerTransform_h
TScalarType
itk::AdvancedEuler3DTransform
AdvancedEuler3DTransform of a vector space (e.g. space coordinates).
Definition itkAdvancedEuler3DTransform.h:65
itk::EulerTransform< TScalarType, 3 >::SetComputeZYX
void SetComputeZYX(const bool arg) override
Definition itkEulerTransform.h:185
itk::EulerTransform< TScalarType, 3 >::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(EulerTransform)
itk::EulerTransform< TScalarType, 3 >::itkStaticConstMacro
itkStaticConstMacro(SpaceDimension, unsigned int, 3)
itk::EulerTransform< TScalarType, 3 >::GetComputeZYX
bool GetComputeZYX() const override
Definition itkEulerTransform.h:203
itk::EulerTransform< TScalarType, 3 >::EulerTransform
EulerTransform()=default
itk::EulerTransform< TScalarType, 3 >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkEulerTransform.h:168
itk::EulerTransform< TScalarType, 3 >::~EulerTransform
~EulerTransform() override=default
itk::EulerTransform< TScalarType, 3 >::Self
EulerTransform Self
Definition itkEulerTransform.h:165
itk::EulerTransform< TScalarType, 3 >::Pointer
SmartPointer< Self > Pointer
Definition itkEulerTransform.h:167
itk::EulerTransform< TScalarType, 3 >::Superclass
EulerGroupTemplate< TScalarType, 3 > Superclass
Definition itkEulerTransform.h:166
itk::EulerTransform::GetComputeZYX
bool GetComputeZYX() const
Definition itkEulerTransform.h:146
itk::EulerTransform::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(EulerTransform)
itk::EulerTransform::Pointer
SmartPointer< Self > Pointer
Definition itkEulerTransform.h:96
itk::EulerTransform::itkStaticConstMacro
itkStaticConstMacro(SpaceDimension, unsigned int, Dimension)
itk::EulerTransform::~EulerTransform
~EulerTransform() override=default
itk::EulerTransform::Superclass
EulerGroupTemplate< TScalarType, Dimension > Superclass
Definition itkEulerTransform.h:95
itk::EulerTransform::Self
EulerTransform Self
Definition itkEulerTransform.h:94
itk::EulerTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkEulerTransform.h:97
itk::EulerTransform::SetComputeZYX
void SetComputeZYX(const bool)
Definition itkEulerTransform.h:136
itk::EulerTransform::EulerTransform
EulerTransform()=default
itkAdvancedEuler3DTransform.h
itkAdvancedMatrixOffsetTransformBase.h
itkAdvancedRigid2DTransform.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |