[Insight-developers] reading Image<Matrix> as Image<SymmetricSecondRankTensor>

Matthew McCormick (thewtex) matt at mmmccormick.com
Sun Jun 13 00:38:24 EDT 2010


Hi,

I am working on adding 2D SymmetricSecondRankTensor image write support.
The bug is here.
http://vtk.org/Bug/view.php?id=10732

In order to add a test for the bug, I was thinking of modifying
Testing/Code/IO/itkSymmetricSecondRankTensorImageReadTest.cxx

Currently, this test creates an Image of 3x3 itk::Matrix, writes it to file,
reads it in as an Image of SymmetricSecondRankTensor's, and checks to ensure
the content is the same.

If I try to do the same with 2x2 itk::Matrix, the SymmetricSecondRankTensor
reader does not read the correct components:
941: Test command: /mnt/datab/itkcvsb/bin/itkIOTests
itkSymmetricSecondRankTensorImageReadTest
/mnt/datab/itkcvsb/Testing/Temporary/testSymmetricTensor1.nrrd
/mnt/datab/itkcvsb/Testing/Temporary/testSymmetricTensor2.nrrd
941: Test timeout computed to be: 1500
941: Tensor read does not match expected values
941: Index [0, 0]
941: Tensor value
941: 1  2  2
941: Matrix value
941: 1 2
941: 2 3
941:

If the commented code, where an image of 2D SymmetricSecondRankTensor (
instead of itk::Matrix ) is written, is used with the MetaImage format the
test can pass.

Is it OK to change the test as in the commented code, or are other changes
required?

Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100612/45a8f47c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkSymmetricSecondRankTensorImageReadTest.cxx
Type: text/x-c++src
Size: 8886 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100612/45a8f47c/attachment.cxx>


More information about the Insight-developers mailing list