MantisBT - ITK | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008574 | ITK | public | 2009-02-20 14:56 | 2010-11-18 13:21 | ||||||
Reporter | Casey B Goodlett | |||||||||
Assigned To | Luis Ibanez | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | assigned | Resolution | open | |||||||
Platform | OS | OS Version | ||||||||
Product Version | ITK-3-10 | |||||||||
Target Version | Fixed in Version | |||||||||
Resolution Date | ||||||||||
Sprint | ||||||||||
Sprint Status | ||||||||||
Summary | 0008574: SymmetricSecondRankTensor PreMultiply and PostMultiply have incorrect API | |||||||||
Description | Both the PerMultiply and PostMultiply methods of SymmetricSecondRankTensor return a symmetric tensor, but pre or post multiplication of a symmetric tensor by a rotation matrix does not result in a symmetric tensor. Assuming D is a diffusion tensor and R a rotation matrix, diffusion tensors are usually rotated by rot(D) = R * D * R^T; but both R * D and D * R^T are not themselves symmetric matrices. For example let D be an identity matrix and R a non-identity matrix. R*D is R which is not symmetric. If you try to implement a rotation as D.PreMultiply(R).PostMultiply(R.transpose()), you get incorrect results because the return type enforces symmetry. My opinion is that these methods should be removed and replaced with a single method named something like Rotate. Only premultiplication or only postmultiplication is probably not a useful operation at least for diffusion tensors. Backwards compatibility should not be preserved here because the current API can never give a correct answer for R * D as the return type enforces symmetry. I have attached a patch which removes the incorrect methods and replaces them with a usable, though not particularly efficient, Rotate method. I also added to the test class a test that rotating a tensor gives a correct result. | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | symmetrictensor-rotate.patch (5,848) 2009-02-20 14:56 https://public.kitware.com/Bug/file/2071/symmetrictensor-rotate.patch SymmetricSecondRankTensorWithRotate.patch (2,269) 2009-04-24 13:09 https://public.kitware.com/Bug/file/2187/SymmetricSecondRankTensorWithRotate.patch | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2009-02-20 14:56 | Casey B Goodlett | New Issue | ||||||||
2009-02-20 14:56 | Casey B Goodlett | File Added: symmetrictensor-rotate.patch | ||||||||
2009-04-24 13:09 | Luke Bloy | Note Added: 0016186 | ||||||||
2009-04-24 13:09 | Luke Bloy | File Added: SymmetricSecondRankTensorWithRotate.patch | ||||||||
2010-03-08 03:49 | Tom Vercauteren | Relationship added | has duplicate 0010195 | |||||||
2010-11-02 14:03 | Hans Johnson | Status | new => assigned | |||||||
2010-11-02 14:03 | Hans Johnson | Assigned To | => kentwilliams | |||||||
2010-11-04 12:56 | kentwilliams | Note Added: 0022837 | ||||||||
2010-11-18 13:21 | kentwilliams | Assigned To | kentwilliams => Luis Ibanez |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|