-#else
- template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
- const
- typename BSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::JacobianType &
- BSplineDeformableTransform<TCoordRep, NInputDimensions, NOutputDimensions>
- ::GetJacobian( const InputPointType & point ) const
- {
- // Can only compute Jacobian if parameters are set via
- // SetParameters or SetParametersByValue
- // if( m_InputParametersPointer == NULL )
- // {
- // itkExceptionMacro( <<"Cannot compute Jacobian: parameters not set" );
- // }
-
- if (m_NeedResetJacobian)
- ResetJacobian();
-
- //========================================================
- // For each dimension, copy the weight to the support region
- //========================================================
-
- // Check if inside mask
- if(m_Mask && !(m_Mask->IsInside(point) ) )
- {
- // Outside: no (deformable) displacement
- return this->m_Jacobian;
- }
-
- //Get index
- this->TransformPointToContinuousIndex( point, m_Index );
-
- // NOTE: if the support region does not lie totally within the grid
- // we assume zero displacement and return the input point
- if ( !this->InsideValidRegion( m_Index ) )
- {
- return this->m_Jacobian;
- }
-
- //Compute interpolation weights
- const WeightsDataType *weights=NULL;
- m_VectorInterpolator->EvaluateWeightsAtContinuousIndex( m_Index, &weights, m_LastJacobianIndex);
- m_SupportRegion.SetIndex( m_LastJacobianIndex );