+ 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);
+
+ //Set the previously-set to zero
+ while (!(m_Iterator[0]).IsAtEnd())
+ {
+ for (j = 0; j < OutputDimension; j++)
+ {
+ m_Iterator[j].Set(m_ZeroVector);
+ ++(m_Iterator[j]);
+ }
+ }
+ m_NeedResetJacobian = false;
+ }