[Insight-users] SymmetricSecondRankTensor does incorrect matrix PreMultiply and PostMultiply

Kris Zygmunt krismz at sci.utah.edu
Fri May 25 20:04:52 EDT 2012


Hello,
     While working on some code that does math with DiffusionTensor3D  
pixels, I found that DiffusionTensor3D's parent class  
SymmetricSecondRankTensor returns a SymmetricSecondRankTensor from  
both the PreMultiply(MatrixType m) and the PostMultiply(MatrixType  
m).  This code is in effect saying that a symmetric tensor multiplied  
by any matrix results in a symmetric tensor which is not true!  The  
code needs to be changed to return a Matrix instead of a  
SymmetricSecondRankTensor.  Anyone who is using these PreMultiply and  
PostMultiply methods currently is having important information from  
the lower half of the matrix thrown away and getting incorrect  
computations as a result.

I have added a patch that fixes this bug at http://review.source.kitware.com/5943

-Kris



More information about the Insight-users mailing list