// Constructor with default arguments
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(OutputDimension,0)
+ ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::ShapedBLUTSpatioTemporalDeformableTransform():Superclass(0)
{
unsigned int i;
// Get the number of parameters
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- unsigned int
+ typename ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>::NumberOfParametersType
ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
::GetNumberOfParameters(void) const
{
//=====================================
//JV Wrap jacobian into OutputDimension X Vectorial images
//=====================================
- this->m_Jacobian.set_size( OutputDimension, this->GetNumberOfParameters() );
+ this->m_SharedDataBSplineJacobian.set_size( OutputDimension, this->GetNumberOfParameters() );
// Use memset to set the memory
// JV four rows of three comps of parameters
- JacobianPixelType * jacobianDataPointer = reinterpret_cast<JacobianPixelType *>(this->m_Jacobian.data_block());
+ JacobianPixelType * jacobianDataPointer = reinterpret_cast<JacobianPixelType *>(this->m_SharedDataBSplineJacobian.data_block());
memset(jacobianDataPointer, 0, OutputDimension*numberOfPixels*sizeof(JacobianPixelType));
for (unsigned int j=0; j<OutputDimension; j++)
typename CoefficientImageType::RegionType sourceRegion=m_PaddedCoefficientImage->GetLargestPossibleRegion();
typename CoefficientImageType::RegionType destinationRegion=m_PaddedCoefficientImage->GetLargestPossibleRegion();
typename CoefficientImageType::RegionType::SizeType sourceSize=sourceRegion.GetSize();
- typename CoefficientImageType::RegionType::SizeType destinationSize=destinationRegion.GetSize();
typename CoefficientImageType::IndexType sourceIndex=sourceRegion.GetIndex();
typename CoefficientImageType::IndexType destinationIndex=destinationRegion.GetIndex();
// JV weights are identical as for transformpoint, could be done simultaneously in metric!!!!
// Compute the Jacobian in one position
template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- const
- typename ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::JacobianType &
+ void
ShapedBLUTSpatioTemporalDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::GetJacobian( const InputPointType & point ) const
+ ::ComputeJacobianWithRespectToParameters( const InputPointType & point, JacobianType & jacobian) const
{
//========================================================
if(m_Mask && !(m_Mask->IsInside(point) ) )
{
// Outside: no (deformable) displacement
- return this->m_Jacobian;
+ jacobian = m_SharedDataBSplineJacobian;
+ return;
}
// Get index
// we assume zero displacement and return the input point
if ( !this->InsideValidRegion( m_Index ) )
{
- return this->m_Jacobian;
+ jacobian = m_SharedDataBSplineJacobian;
+ return;
}
// Compute interpolation weights
}
// Return the result
- return this->m_Jacobian;
+ jacobian = m_SharedDataBSplineJacobian;
}