Loading...
Searching...
No Matches
itkWeightedCombinationTransform.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 itkWeightedCombinationTransform_h
#define itkWeightedCombinationTransform_h
#include "itkAdvancedTransform.h"
namespace itk
{
template <class TScalarType, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 3>
class ITK_TEMPLATE_EXPORT WeightedCombinationTransform
: public AdvancedTransform<TScalarType, NInputDimensions, NOutputDimensions>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(WeightedCombinationTransform);
using Self = WeightedCombinationTransform;
using Superclass = AdvancedTransform<TScalarType, NInputDimensions, NOutputDimensions>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(WeightedCombinationTransform, AdvancedTransform);
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
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::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::SpatialHessianType;
using typename Superclass::JacobianOfSpatialHessianType;
using TransformType = Transform<TScalarType, NInputDimensions, NOutputDimensions>;
using TransformPointer = typename TransformType::Pointer;
using TransformContainerType = std::vector<TransformPointer>;
OutputPointType
TransformPoint(const InputPointType & inputPoint) const override;
OutputVectorType
TransformVector(const InputVectorType &) const override
{
itkExceptionMacro("TransformVector(const InputVectorType &) is not implemented for WeightedCombinationTransform");
}
OutputVnlVectorType
TransformVector(const InputVnlVectorType &) const override
{
itkExceptionMacro(
"TransformVector(const InputVnlVectorType &) is not implemented for WeightedCombinationTransform");
}
OutputCovariantVectorType
TransformCovariantVector(const InputCovariantVectorType &) const override
{
itkExceptionMacro("TransformCovariantVector(const InputCovariantVectorType &) is not implemented for "
"WeightedCombinationTransform");
}
void
GetJacobian(const InputPointType & inputPoint, JacobianType & jac, NonZeroJacobianIndicesType & nzji) const override;
void
SetParameters(const ParametersType & param) override;
void
SetFixedParameters(const ParametersType &) override
{
// \todo: to be implemented by Stefan
}
const ParametersType &
GetFixedParameters() const override
{
// \todo: to be implemented by Stefan: check this:
return this->m_FixedParameters;
}
NumberOfParametersType
GetNumberOfParameters() const override
{
return this->m_TransformContainer.size();
}
itkSetMacro(NormalizeWeights, bool);
itkGetConstMacro(NormalizeWeights, bool);
virtual void
SetTransformContainer(const TransformContainerType & transformContainer)
{
this->m_TransformContainer = transformContainer;
this->Modified();
}
const TransformContainerType &
GetTransformContainer() const
{
return this->m_TransformContainer;
}
void
GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
void
GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
void
GetJacobianOfSpatialJacobian(const InputPointType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
void
GetJacobianOfSpatialJacobian(const InputPointType &,
SpatialJacobianType &,
JacobianOfSpatialJacobianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
void
GetJacobianOfSpatialHessian(const InputPointType &,
JacobianOfSpatialHessianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
void
GetJacobianOfSpatialHessian(const InputPointType &,
SpatialHessianType &,
JacobianOfSpatialHessianType &,
NonZeroJacobianIndicesType &) const override
{
itkExceptionMacro("Not implemented for WeightedCombinationTransform");
}
protected:
WeightedCombinationTransform();
~WeightedCombinationTransform() override = default;
TransformContainerType m_TransformContainer{};
double m_SumOfWeights{};
NonZeroJacobianIndicesType m_NonZeroJacobianIndices{};
private:
// Private using-declarations, to avoid `-Woverloaded-virtual` warnings from GCC (GCC 11.4).
using Superclass::TransformCovariantVector;
using Superclass::TransformVector;
bool m_NormalizeWeights{};
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkWeightedCombinationTransform.hxx"
#endif
#endif
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< TScalarType, 3, 3 >::AdvancedTransform
AdvancedTransform()=default
itk::AdvancedTransform::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition itkAdvancedTransform.h:133
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::TransformType
Transform< typename elx::TransformBase< TElastix >::CoordRepType, NInputDimensions, NOutputDimensions > TransformType
Definition itkWeightedCombinationTransform.h:84
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itk::WeightedCombinationTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &, SpatialHessianType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
Definition itkWeightedCombinationTransform.h:230
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
itk::WeightedCombinationTransform::SetTransformContainer
virtual void SetTransformContainer(const TransformContainerType &transformContainer)
Definition itkWeightedCombinationTransform.h:163
itk::WeightedCombinationTransform::SetFixedParameters
void SetFixedParameters(const ParametersType &) override
Definition itkWeightedCombinationTransform.h:133
itk::WeightedCombinationTransform::GetSpatialHessian
void GetSpatialHessian(const InputPointType &, SpatialHessianType &) const override
Definition itkWeightedCombinationTransform.h:195
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::m_TransformContainer
TransformContainerType m_TransformContainer
Definition itkWeightedCombinationTransform.h:243
itk::WeightedCombinationTransform::GetJacobian
void GetJacobian(const InputPointType &inputPoint, JacobianType &jac, NonZeroJacobianIndicesType &nzji) const override
itk::WeightedCombinationTransform::WeightedCombinationTransform
WeightedCombinationTransform()
itk::WeightedCombinationTransform::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions)
itk::WeightedCombinationTransform::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
itk::WeightedCombinationTransform::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(WeightedCombinationTransform)
itk::WeightedCombinationTransform::GetFixedParameters
const ParametersType & GetFixedParameters() const override
Definition itkWeightedCombinationTransform.h:141
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::TransformContainerType
std::vector< TransformPointer > TransformContainerType
Definition itkWeightedCombinationTransform.h:87
itk::WeightedCombinationTransform::TransformCovariantVector
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
Definition itkWeightedCombinationTransform.h:110
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::m_NonZeroJacobianIndices
NonZeroJacobianIndicesType m_NonZeroJacobianIndices
Definition itkWeightedCombinationTransform.h:247
itk::WeightedCombinationTransform::TransformVector
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
Definition itkWeightedCombinationTransform.h:102
itk::WeightedCombinationTransform::SetParameters
void SetParameters(const ParametersType &param) override
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::m_SumOfWeights
double m_SumOfWeights
Definition itkWeightedCombinationTransform.h:244
itk::WeightedCombinationTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const override
Definition itkWeightedCombinationTransform.h:221
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkWeightedCombinationTransform.h:52
itk::WeightedCombinationTransform::GetTransformContainer
const TransformContainerType & GetTransformContainer() const
Definition itkWeightedCombinationTransform.h:180
itk::WeightedCombinationTransform::GetSpatialJacobian
void GetSpatialJacobian(const InputPointType &, SpatialJacobianType &) const override
Definition itkWeightedCombinationTransform.h:188
itk::WeightedCombinationTransform::TransformVector
OutputVectorType TransformVector(const InputVectorType &) const override
Definition itkWeightedCombinationTransform.h:95
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
itk::WeightedCombinationTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
Definition itkWeightedCombinationTransform.h:202
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::Pointer
SmartPointer< Self > Pointer
Definition itkWeightedCombinationTransform.h:51
itk::WeightedCombinationTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &inputPoint) const override
itk::WeightedCombinationTransform::GetNumberOfParameters
NumberOfParametersType GetNumberOfParameters() const override
Definition itkWeightedCombinationTransform.h:150
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::Superclass
AdvancedTransform< typename elx::TransformBase< TElastix >::CoordRepType, NInputDimensions, NOutputDimensions > Superclass
Definition itkWeightedCombinationTransform.h:50
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::Self
WeightedCombinationTransform Self
Definition itkWeightedCombinationTransform.h:49
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::m_NormalizeWeights
bool m_NormalizeWeights
Definition itkWeightedCombinationTransform.h:254
itk::WeightedCombinationTransform< typename elx::TransformBase< TElastix >::CoordRepType, elx::TransformBase< TElastix >::FixedImageDimension, elx::TransformBase< TElastix >::MovingImageDimension >::TransformPointer
typename TransformType::Pointer TransformPointer
Definition itkWeightedCombinationTransform.h:86
itk::WeightedCombinationTransform::~WeightedCombinationTransform
~WeightedCombinationTransform() override=default
itk::WeightedCombinationTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &, SpatialJacobianType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const override
Definition itkWeightedCombinationTransform.h:211
itkAdvancedTransform.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |