[Insight-developers] SymmetricSecondRankTensor PreMultiply and PostMultiply
Luis Ibanez
luis.ibanez at kitware.com
Fri Feb 20 15:26:08 EST 2009
Hi Casey,
Thanks for pointing out this problem, logging the bug
and providing the patch.
I agree that it is convenient to add the Rotate() method.
Removing the PreMultiply and PostMultiply methods are not
an option, given that they have been there for a couple
of releases now. They were added on March 10 2008...
We could however treat them as a bug,
One option that comes to mind and fix the return type
of the PreMultiply and PostMultiply methods to be
MatrixType. The downside of this option is that if
someone out there has code:
Tensor TB = TA.PreMultiply( M )
then this code will no longer compile...
the bright side of it, is that this line of code
was doing something wrong anyways... so that will
force this line to be fixed to:
Matrix MB = TA.PreMultiply( M )
I'll suggest that we start by adding the Rotate() method,
which does the right thing, and we further discuss what
to do with the PreMultiply and PostMultiply methods.
Other suggestions ?
Luis
---------------------
Casey Goodlett wrote:
> Hi Luis,
>
> I tried to refactor some of my DTI code, which relies on reorientation
> of diffusion tensors, to use the PreMultiply and PostMultiply routines
> which have been added to SymmetricSecondRankTensor. Unfortunately, I
> am concerned that the API for these methods is flawed. The problem is
> that both of these methods return a symmetric tensor, but pre or post
> multiplication of a symmetric tensor by a rotation matrix does not
> result in a symmetric tensor.
>
> I have logged details and a potential fix in
> http://public.kitware.com/Bug/view.php?id=8574
>
> Thank you
>
> Casey Goodlett
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list