+ template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+ unsigned
+ BSplineDeformableTransform<TCoordRep, NInputDimensions,NOutputDimensions>
+ ::SetJacobianImageData(JacobianPixelType * jacobianDataPointer, unsigned dim)
+ {
+ unsigned int numberOfPixels = m_GridRegion.GetNumberOfPixels();
+ m_JacobianImage[dim]->GetPixelContainer()->SetImportPointer(jacobianDataPointer, numberOfPixels);
+ return numberOfPixels;
+ }
+
+ template<class TCoordRep, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+ void
+ BSplineDeformableTransform<TCoordRep, NInputDimensions,NOutputDimensions>
+ ::ResetJacobian() const
+ {
+ //========================================================
+ // Zero all components of jacobian
+ //========================================================
+ // JV not thread safe (m_LastJacobianIndex), instantiate N transforms
+ // NOTE: for efficiency, we only need to zero out the coefficients
+ // that got fill last time this method was called.
+
+ unsigned int j = 0;
+
+ //Define the region for each jacobian image
+ m_SupportRegion.SetIndex(m_LastJacobianIndex);
+
+ //Initialize the iterators
+ for (j = 0; j < OutputDimension; j++)
+ m_Iterator[j] = IteratorType(m_JacobianImage[j], m_SupportRegion);