Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
#ifndef __clitkMultipleBSplineDeformableTransform_txx
#define __clitkMultipleBSplineDeformableTransform_txx
{
// Constructor with default arguments
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::MultipleBSplineDeformableTransform() : Superclass(OutputDimension, 0)
+ MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::MultipleBSplineDeformableTransform() : Superclass(0)
{
m_nLabels = 1;
m_labels = 0;
#undef LOOP_ON_LABELS
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- inline unsigned int
+ inline typename MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::NumberOfParametersType
MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
::GetNumberOfParameters(void) const
{
}
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- inline const typename MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::JacobianType &
+ inline void
MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::GetJacobian( const InputPointType & point ) const
+ ::ComputeJacobianWithRespectToParameters (const InputPointType &point, JacobianType &jacobian) const
{
- /*
- for (unsigned i = 0; i < m_nLabels; ++i)
- m_trans[i]->ResetJacobian();
- */
if (m_LastJacobian != -1)
m_trans[m_LastJacobian]->ResetJacobian();
if (lidx == -1)
{
m_LastJacobian = lidx;
- return this->m_Jacobian;
+ jacobian = this->m_SharedDataBSplineJacobian;
+ return;
}
- m_trans[lidx]->GetJacobian(point);
+ JacobianType unused;
+ m_trans[lidx]->ComputeJacobianWithRespectToParameters(point, unused);
m_LastJacobian = lidx;
- return this->m_Jacobian;
+ jacobian = this->m_SharedDataBSplineJacobian;
}
+
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
inline void
MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions,NOutputDimensions>
MultipleBSplineDeformableTransform<TCoordRep, NInputDimensions,NOutputDimensions>::InitJacobian()
{
unsigned numberOfParameters = this->GetNumberOfParameters();
- this->m_Jacobian.set_size(OutputDimension, numberOfParameters);
- JacobianPixelType * jacobianDataPointer = reinterpret_cast<JacobianPixelType *>(this->m_Jacobian.data_block());
+ this->m_SharedDataBSplineJacobian.set_size(OutputDimension, numberOfParameters);
+ JacobianPixelType * jacobianDataPointer = reinterpret_cast<JacobianPixelType *>(this->m_SharedDataBSplineJacobian.data_block());
memset(jacobianDataPointer, 0, numberOfParameters * sizeof (JacobianPixelType));
unsigned tot = 0;