Loading...
Searching...
No Matches
itkAdvancedTranslationTransform.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.
*
*=========================================================================*/
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkAdvancedTranslationTransform.h,v $
Date: $Date: 2007-07-15 16:38:25 $
Version: $Revision: 1.36 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef itkAdvancedTranslationTransform_h
#define itkAdvancedTranslationTransform_h
#include <iostream>
#include "itkAdvancedTransform.h"
#include "itkMacro.h"
#include "itkMatrix.h"
namespace itk
{
template <class TScalarType = double, // Data type for scalars (float or double)
unsigned int NDimensions = 3>
// Number of dimensions
class ITK_TEMPLATE_EXPORT AdvancedTranslationTransform : public AdvancedTransform<TScalarType, NDimensions, NDimensions>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(AdvancedTranslationTransform);
using Self = AdvancedTranslationTransform;
using Superclass = AdvancedTransform<TScalarType, NDimensions, NDimensions>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(AdvancedTranslationTransform, AdvancedTransform);
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
itkStaticConstMacro(ParametersDimension, unsigned int, NDimensions);
using typename Superclass::ScalarType;
using typename Superclass::ParametersType;
using typename Superclass::FixedParametersType;
using typename Superclass::NumberOfParametersType;
using typename Superclass::TransformCategoryEnum;
using typename Superclass::JacobianType;
using InputVectorType = Vector<TScalarType, Self::SpaceDimension>;
using OutputVectorType = Vector<TScalarType, Self::SpaceDimension>;
using InputCovariantVectorType = CovariantVector<TScalarType, Self::SpaceDimension>;
using OutputCovariantVectorType = CovariantVector<TScalarType, Self::SpaceDimension>;
using InputVnlVectorType = vnl_vector_fixed<TScalarType, Self::SpaceDimension>;
using OutputVnlVectorType = vnl_vector_fixed<TScalarType, Self::SpaceDimension>;
using InputPointType = Point<TScalarType, Self::SpaceDimension>;
using OutputPointType = Point<TScalarType, Self::SpaceDimension>;
using typename Superclass::NonZeroJacobianIndicesType;
using typename Superclass::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::SpatialHessianType;
using typename Superclass::JacobianOfSpatialHessianType;
using typename Superclass::InternalMatrixType;
const OutputVectorType &
GetOffset() const
{
return m_Offset;
}
void
SetParameters(const ParametersType & parameters) override;
const ParametersType &
GetParameters() const override;
void
SetOffset(const OutputVectorType & offset)
{
m_Offset = offset;
return;
}
OutputPointType
TransformPoint(const InputPointType & point) const override;
OutputVectorType
TransformVector(const InputVectorType & vector) const override;
OutputVnlVectorType
TransformVector(const InputVnlVectorType & vector) const override;
OutputCovariantVectorType
TransformCovariantVector(const InputCovariantVectorType & vector) const override;
void
GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override;
void
GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override;
void
GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override;
void
GetJacobianOfSpatialJacobian(const InputPointType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override;
void
GetJacobianOfSpatialJacobian(const InputPointType &,
SpatialJacobianType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override;
void
GetJacobianOfSpatialHessian(const InputPointType &,
JacobianOfSpatialHessianType &,
NonZeroJacobianIndicesType &) const override;
void
GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
SpatialHessianType & sh,
JacobianOfSpatialHessianType & jsh,
NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
void
SetIdentity();
NumberOfParametersType
GetNumberOfParameters() const override
{
return NDimensions;
}
bool
IsLinear() const override
{
return true;
}
TransformCategoryEnum
GetTransformCategory() const override
{
return TransformCategoryEnum::Linear;
}
void
SetFixedParameters(const FixedParametersType &) override
{ /* purposely blank */
}
const FixedParametersType &
GetFixedParameters() const override
{
this->m_FixedParameters.SetSize(0);
return this->m_FixedParameters;
}
protected:
AdvancedTranslationTransform();
~AdvancedTranslationTransform() override;
void
PrintSelf(std::ostream & os, Indent indent) const override;
private:
// Private using-declarations, to avoid `-Woverloaded-virtual` warnings from GCC (GCC 11.4).
using Superclass::TransformCovariantVector;
using Superclass::TransformVector;
OutputVectorType m_Offset{}; // Offset of the transformation
// The Jacobian of this transform is constant. Therefore it can be shared among all the threads.
const JacobianType m_LocalJacobian{
Matrix<TScalarType, NDimensions, NDimensions>::GetIdentity().GetVnlMatrix().as_matrix()
};
const SpatialJacobianType m_SpatialJacobian{ SpatialJacobianType::GetIdentity() };
const SpatialHessianType m_SpatialHessian{};
NonZeroJacobianIndicesType m_NonZeroJacobianIndices{ NonZeroJacobianIndicesType(NDimensions) };
const JacobianOfSpatialJacobianType m_JacobianOfSpatialJacobian{ JacobianOfSpatialJacobianType(NDimensions) };
const JacobianOfSpatialHessianType m_JacobianOfSpatialHessian{ JacobianOfSpatialHessianType(NDimensions) };
};
// class AdvancedTranslationTransform
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkAdvancedTranslationTransform.hxx"
#endif
#endif /* itkAdvancedTranslationTransform_h */
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InternalMatrixType
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition itkAdvancedTransform.h:140
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition itkAdvancedTransform.h:137
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition itkAdvancedTransform.h:134
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Definition itkAdvancedTransform.h:139
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Definition itkAdvancedTransform.h:135
itk::AdvancedTransform< double, 3, 3 >::AdvancedTransform
AdvancedTransform()=default
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition itkAdvancedTransform.h:133
itk::AdvancedTranslationTransform::GetSpatialJacobian
void GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itk::AdvancedTranslationTransform::GetSpatialHessian
void GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override
itk::AdvancedTranslationTransform::IsLinear
bool IsLinear() const override
Definition itkAdvancedTranslationTransform.h:212
itk::AdvancedTranslationTransform::OutputPointType
Point< TScalarType, Self::SpaceDimension > OutputPointType
Definition itkAdvancedTranslationTransform.h:101
itk::AdvancedTranslationTransform::InputCovariantVectorType
CovariantVector< TScalarType, Self::SpaceDimension > InputCovariantVectorType
Definition itkAdvancedTranslationTransform.h:92
itk::AdvancedTranslationTransform::SetFixedParameters
void SetFixedParameters(const FixedParametersType &) override
Definition itkAdvancedTranslationTransform.h:231
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
itk::AdvancedTranslationTransform::SetOffset
void SetOffset(const OutputVectorType &offset)
Definition itkAdvancedTranslationTransform.h:133
itk::AdvancedTranslationTransform::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(AdvancedTranslationTransform)
itk::AdvancedTranslationTransform::SetParameters
void SetParameters(const ParametersType &parameters) override
itk::AdvancedTranslationTransform::TransformVector
OutputVectorType TransformVector(const InputVectorType &vector) const override
itk::AdvancedTranslationTransform::itkStaticConstMacro
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
itk::AdvancedTranslationTransform::OutputVectorType
Vector< TScalarType, Self::SpaceDimension > OutputVectorType
Definition itkAdvancedTranslationTransform.h:89
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_LocalJacobian
const JacobianType m_LocalJacobian
Definition itkAdvancedTranslationTransform.h:261
itk::AdvancedTranslationTransform::Self
AdvancedTranslationTransform Self
Definition itkAdvancedTranslationTransform.h:60
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_NonZeroJacobianIndices
NonZeroJacobianIndicesType m_NonZeroJacobianIndices
Definition itkAdvancedTranslationTransform.h:266
itk::AdvancedTranslationTransform::TransformCovariantVector
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &vector) const override
itk::AdvancedTranslationTransform::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::AdvancedTranslationTransform::Superclass
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
Definition itkAdvancedTranslationTransform.h:61
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_JacobianOfSpatialHessian
const JacobianOfSpatialHessianType m_JacobianOfSpatialHessian
Definition itkAdvancedTranslationTransform.h:268
itk::AdvancedTranslationTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkAdvancedTranslationTransform.h:63
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_JacobianOfSpatialJacobian
const JacobianOfSpatialJacobianType m_JacobianOfSpatialJacobian
Definition itkAdvancedTranslationTransform.h:267
itk::AdvancedTranslationTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_SpatialHessian
const SpatialHessianType m_SpatialHessian
Definition itkAdvancedTranslationTransform.h:265
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_SpatialJacobian
const SpatialJacobianType m_SpatialJacobian
Definition itkAdvancedTranslationTransform.h:264
itk::AdvancedTranslationTransform::OutputCovariantVectorType
CovariantVector< TScalarType, Self::SpaceDimension > OutputCovariantVectorType
Definition itkAdvancedTranslationTransform.h:93
itk::AdvancedTranslationTransform::TransformVector
OutputVnlVectorType TransformVector(const InputVnlVectorType &vector) const override
itk::AdvancedTranslationTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::AdvancedTranslationTransform::InputPointType
Point< TScalarType, Self::SpaceDimension > InputPointType
Definition itkAdvancedTranslationTransform.h:100
itk::AdvancedTranslationTransform::GetParameters
const ParametersType & GetParameters() const override
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
itk::AdvancedTranslationTransform::GetNumberOfParameters
NumberOfParametersType GetNumberOfParameters() const override
Definition itkAdvancedTranslationTransform.h:201
itk::AdvancedTranslationTransform< typename elx::TransformBase< TElastix >::CoordRepType, Self::SpaceDimension >::m_Offset
OutputVectorType m_Offset
Definition itkAdvancedTranslationTransform.h:258
itk::AdvancedTranslationTransform::GetJacobian
void GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
itk::AdvancedTranslationTransform::InputVectorType
Vector< TScalarType, Self::SpaceDimension > InputVectorType
Definition itkAdvancedTranslationTransform.h:88
itk::AdvancedTranslationTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
itk::AdvancedTranslationTransform::Pointer
SmartPointer< Self > Pointer
Definition itkAdvancedTranslationTransform.h:62
itk::AdvancedTranslationTransform::SetIdentity
void SetIdentity()
itk::AdvancedTranslationTransform::GetFixedParameters
const FixedParametersType & GetFixedParameters() const override
Definition itkAdvancedTranslationTransform.h:239
itk::AdvancedTranslationTransform::AdvancedTranslationTransform
AdvancedTranslationTransform()
itk::AdvancedTranslationTransform::~AdvancedTranslationTransform
~AdvancedTranslationTransform() override
itk::AdvancedTranslationTransform::GetTransformCategory
TransformCategoryEnum GetTransformCategory() const override
Definition itkAdvancedTranslationTransform.h:221
itk::AdvancedTranslationTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &point) const override
itk::AdvancedTranslationTransform::OutputVnlVectorType
vnl_vector_fixed< TScalarType, Self::SpaceDimension > OutputVnlVectorType
Definition itkAdvancedTranslationTransform.h:97
itk::AdvancedTranslationTransform::itkStaticConstMacro
itkStaticConstMacro(ParametersDimension, unsigned int, NDimensions)
itk::AdvancedTranslationTransform::GetOffset
const OutputVectorType & GetOffset() const
Definition itkAdvancedTranslationTransform.h:115
itk::AdvancedTranslationTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, SpatialJacobianType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
itk::AdvancedTranslationTransform::InputVnlVectorType
vnl_vector_fixed< TScalarType, Self::SpaceDimension > InputVnlVectorType
Definition itkAdvancedTranslationTransform.h:96
itkAdvancedTransform.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |