Loading...
Searching...
No Matches
itkDeformationFieldInterpolatingTransform.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 itkDeformationFieldInterpolatingTransform_h
#define itkDeformationFieldInterpolatingTransform_h
#include <iostream>
#include "itkAdvancedTransform.h"
#include "itkMacro.h"
#include "itkImage.h"
#include "itkVectorInterpolateImageFunction.h"
#include "itkVectorNearestNeighborInterpolateImageFunction.h"
namespace itk
{
template <class TScalarType = double, // Data type for scalars (float or double)
unsigned int NDimensions = 3, // Number of input dimensions
class TComponentType = double>
// ComponentType of the deformation field
class ITK_TEMPLATE_EXPORT DeformationFieldInterpolatingTransform
: public AdvancedTransform<TScalarType, NDimensions, NDimensions>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(DeformationFieldInterpolatingTransform);
using Self = DeformationFieldInterpolatingTransform;
using Superclass = AdvancedTransform<TScalarType, NDimensions, NDimensions>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(DeformationFieldInterpolatingTransform, AdvancedTransform);
itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension);
itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension);
using typename Superclass::ScalarType;
using typename Superclass::ParametersType;
using typename Superclass::NumberOfParametersType;
using typename Superclass::JacobianType;
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::InputPointType;
using typename Superclass::OutputPointType;
using typename Superclass::NonZeroJacobianIndicesType;
using typename Superclass::SpatialHessianType;
using typename Superclass::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialHessianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::InternalMatrixType;
using DeformationFieldComponentType = TComponentType;
using DeformationFieldVectorType = Vector<DeformationFieldComponentType, Self::OutputSpaceDimension>;
using DeformationFieldType = Image<DeformationFieldVectorType, Self::InputSpaceDimension>;
using DeformationFieldPointer = typename DeformationFieldType::Pointer;
using DeformationFieldInterpolatorType = VectorInterpolateImageFunction<DeformationFieldType, ScalarType>;
using DeformationFieldInterpolatorPointer = typename DeformationFieldInterpolatorType::Pointer;
using DefaultDeformationFieldInterpolatorType =
VectorNearestNeighborInterpolateImageFunction<DeformationFieldType, ScalarType>;
void
SetParameters(const ParametersType &) override
{
itkExceptionMacro("ERROR: SetParameters() is not implemented for DeformationFieldInterpolatingTransform.\n"
<< "Use SetDeformationField() instead.\n"
<< "Note that this transform is NOT suited for image registration.\n"
<< "Just use it as an (initial) fixed transform that is not optimized.");
}
void
SetFixedParameters(const ParametersType &) override
{
// This transform has no fixed parameters.
}
const ParametersType &
GetFixedParameters() const override
{
// This transform has no fixed parameters.
return this->m_FixedParameters;
}
OutputPointType
TransformPoint(const InputPointType & point) const override;
OutputVectorType
TransformVector(const InputVectorType &) const override
{
itkExceptionMacro(
"TransformVector(const InputVectorType &) is not implemented for DeformationFieldInterpolatingTransform");
}
OutputVnlVectorType
TransformVector(const InputVnlVectorType &) const override
{
itkExceptionMacro(
"TransformVector(const InputVnlVectorType &) is not implemented for DeformationFieldInterpolatingTransform");
}
OutputCovariantVectorType
TransformCovariantVector(const InputCovariantVectorType &) const override
{
itkExceptionMacro("TransformCovariantVector(const InputCovariantVectorType &) is not implemented for "
"DeformationFieldInterpolatingTransform");
}
void
SetIdentity();
virtual void
SetDeformationField(DeformationFieldType * _arg);
itkGetModifiableObjectMacro(DeformationField, DeformationFieldType);
virtual void
SetDeformationFieldInterpolator(DeformationFieldInterpolatorType * _arg);
itkGetModifiableObjectMacro(DeformationFieldInterpolator, DeformationFieldInterpolatorType);
bool
IsLinear() const override
{
return false;
}
void
GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetJacobianOfSpatialJacobian(const InputPointType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetJacobianOfSpatialJacobian(const InputPointType &,
SpatialJacobianType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetJacobianOfSpatialHessian(const InputPointType &,
JacobianOfSpatialHessianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
void
GetJacobianOfSpatialHessian(const InputPointType &,
SpatialHessianType &,
JacobianOfSpatialHessianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for DeformationFieldInterpolatingTransform");
}
protected:
DeformationFieldInterpolatingTransform();
~DeformationFieldInterpolatingTransform() override = default;
using InputContinuousIndexType = typename DeformationFieldInterpolatorType::ContinuousIndexType;
using InterpolatorOutputType = typename DeformationFieldInterpolatorType::OutputType;
void
PrintSelf(std::ostream & os, Indent indent) const override;
DeformationFieldPointer m_DeformationField{};
DeformationFieldPointer m_ZeroDeformationField{};
DeformationFieldInterpolatorPointer m_DeformationFieldInterpolator{};
private:
// Private using-declarations, to avoid `-Woverloaded-virtual` warnings from GCC (GCC 11.4).
using Superclass::TransformCovariantVector;
using Superclass::TransformVector;
};
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkDeformationFieldInterpolatingTransform.hxx"
#endif
#endif /* itkDeformationFieldInterpolatingTransform_h */
itk::AdvancedTransform::InternalMatrixType
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition itkAdvancedTransform.h:140
itk::AdvancedTransform::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition itkAdvancedTransform.h:137
itk::AdvancedTransform::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition itkAdvancedTransform.h:134
itk::AdvancedTransform::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Definition itkAdvancedTransform.h:139
itk::AdvancedTransform::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Definition itkAdvancedTransform.h:135
itk::AdvancedTransform< double, 3, 3 >::AdvancedTransform
AdvancedTransform()=default
itk::AdvancedTransform::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition itkAdvancedTransform.h:133
itk::DeformationFieldInterpolatingTransform::~DeformationFieldInterpolatingTransform
~DeformationFieldInterpolatingTransform() override=default
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::InterpolatorOutputType
typename DeformationFieldInterpolatorType::OutputType InterpolatorOutputType
Definition itkDeformationFieldInterpolatingTransform.h:249
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itk::DeformationFieldInterpolatingTransform::SetFixedParameters
void SetFixedParameters(const ParametersType &) override
Definition itkDeformationFieldInterpolatingTransform.h:114
itk::DeformationFieldInterpolatingTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &point) const override
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldComponentType
float DeformationFieldComponentType
Definition itkDeformationFieldInterpolatingTransform.h:89
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldType
Image< DeformationFieldVectorType, Self::InputSpaceDimension > DeformationFieldType
Definition itkDeformationFieldInterpolatingTransform.h:91
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &, SpatialHessianType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:234
itk::DeformationFieldInterpolatingTransform::SetDeformationFieldInterpolator
virtual void SetDeformationFieldInterpolator(DeformationFieldInterpolatorType *_arg)
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
itk::DeformationFieldInterpolatingTransform::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::Self
DeformationFieldInterpolatingTransform Self
Definition itkDeformationFieldInterpolatingTransform.h:53
itk::DeformationFieldInterpolatingTransform::GetFixedParameters
const ParametersType & GetFixedParameters() const override
Definition itkDeformationFieldInterpolatingTransform.h:122
itk::DeformationFieldInterpolatingTransform::TransformVector
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:145
itk::DeformationFieldInterpolatingTransform::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension)
itk::DeformationFieldInterpolatingTransform::GetSpatialHessian
void GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:199
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::m_ZeroDeformationField
DeformationFieldPointer m_ZeroDeformationField
Definition itkDeformationFieldInterpolatingTransform.h:256
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:206
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::m_DeformationField
DeformationFieldPointer m_DeformationField
Definition itkDeformationFieldInterpolatingTransform.h:255
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldInterpolatorPointer
typename DeformationFieldInterpolatorType::Pointer DeformationFieldInterpolatorPointer
Definition itkDeformationFieldInterpolatingTransform.h:95
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldPointer
typename DeformationFieldType::Pointer DeformationFieldPointer
Definition itkDeformationFieldInterpolatingTransform.h:92
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DefaultDeformationFieldInterpolatorType
VectorNearestNeighborInterpolateImageFunction< DeformationFieldType, ScalarType > DefaultDeformationFieldInterpolatorType
Definition itkDeformationFieldInterpolatingTransform.h:96
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, SpatialJacobianType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:215
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldInterpolatorType
VectorInterpolateImageFunction< DeformationFieldType, ScalarType > DeformationFieldInterpolatorType
Definition itkDeformationFieldInterpolatingTransform.h:94
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkDeformationFieldInterpolatingTransform.h:56
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::InputContinuousIndexType
typename DeformationFieldInterpolatorType::ContinuousIndexType InputContinuousIndexType
Definition itkDeformationFieldInterpolatingTransform.h:248
itk::DeformationFieldInterpolatingTransform::IsLinear
bool IsLinear() const override
Definition itkDeformationFieldInterpolatingTransform.h:178
itk::DeformationFieldInterpolatingTransform::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(DeformationFieldInterpolatingTransform)
itk::DeformationFieldInterpolatingTransform::SetParameters
void SetParameters(const ParametersType &) override
Definition itkDeformationFieldInterpolatingTransform.h:103
itk::DeformationFieldInterpolatingTransform::GetJacobian
void GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:185
itk::DeformationFieldInterpolatingTransform::TransformCovariantVector
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:153
itk::DeformationFieldInterpolatingTransform::SetDeformationField
virtual void SetDeformationField(DeformationFieldType *_arg)
itk::DeformationFieldInterpolatingTransform::DeformationFieldInterpolatingTransform
DeformationFieldInterpolatingTransform()
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
itk::DeformationFieldInterpolatingTransform::GetSpatialJacobian
void GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:192
itk::DeformationFieldInterpolatingTransform::TransformVector
OutputVectorType TransformVector(const InputVectorType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:137
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::DeformationFieldVectorType
Vector< DeformationFieldComponentType, Self::OutputSpaceDimension > DeformationFieldVectorType
Definition itkDeformationFieldInterpolatingTransform.h:90
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
Definition itkDeformationFieldInterpolatingTransform.h:225
itk::DeformationFieldInterpolatingTransform::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(DeformationFieldInterpolator, DeformationFieldInterpolatorType)
itk::DeformationFieldInterpolatingTransform::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension)
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::Pointer
SmartPointer< Self > Pointer
Definition itkDeformationFieldInterpolatingTransform.h:55
itk::DeformationFieldInterpolatingTransform::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(DeformationField, DeformationFieldType)
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::m_DeformationFieldInterpolator
DeformationFieldInterpolatorPointer m_DeformationFieldInterpolator
Definition itkDeformationFieldInterpolatingTransform.h:257
itk::DeformationFieldInterpolatingTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, float >::Superclass
AdvancedTransform< typename elx::TransformBase< TElastix >::CoordRepType, NDimensions, NDimensions > Superclass
Definition itkDeformationFieldInterpolatingTransform.h:54
itk::DeformationFieldInterpolatingTransform::SetIdentity
void SetIdentity()
itkAdvancedTransform.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |