[Insight-users] Bug in MatrixOffsetTransformBase<..., ..., ...>::GetJacobian

Elena Pavlovskaia elena.pavlovskaia at otismed.com
Fri Feb 2 16:46:41 EST 2007


I think that

MatrixOffsetTransformBase<TScalarType, NInputDimensions, NOutputDimensions>
::GetJacobian( const InputPointType & p ) const

has a bug. It does not use the transform center though it should use it.

Here are the indications and the fix:

I was running image registration with MatrixOffsetTransformBase using very
similar images. With every next iteration the registration became worse. The
same images were registered fine when I used Similarity3Dtransform.

I modified the code in MatrixOffsetTransformBase<...>::GetJacobian so that
to use center (similar to Similarity3Dtransform):

In the beginning of the function I added

  const InputVectorType pp = p - this->GetCenter();

and then used pp instead of p in the loop.

After this change my image registration works fine.



More information about the Insight-users mailing list