-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SymmetricEigenAnalysisImageFilter incorrect python wrapping #4520
Comments
Thank you for contributing an issue! 🙏 Welcome to the ITK community! 🤗👋☀️ We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜 This is an automatic message. Allow for time for the ITK community to be able to read the issue and comment on it. |
Taking a second look, |
I'm still getting the same problems when I use this code: results in When I query a single pixel |
Object oriented approach doesn't work either
[ -0.56114415 0.56627178 0. -28.24620925 5.85857641 0. ] |
It is a bit strange that your original code worked (due to syntax). But I guess that problem is in the wrapping. |
Yeah, it ran without error but the values at that pixel were different. |
…e output The default template parameter output, an Image of SymmetricSecondRankTensor, is not correct or valid. The output of this filter is an image of eigenvectors. Wrap with an Image of CovariantVector along with base classes. Also remove the invalid default template parameter output. Closes InsightSoftwareConsortium#4520
The python implementation of SymmetricEigenAnalysisImageFilter is returning 6 values per pixel instead of 3, and more than 3 of the 6 values is non-zero. Since there are only 3 eigenvalues for a 3D Hessian (3x3) eigenvalue decomposition, this functionality must be incorrect.
I asked about this on the forum and the comment was that it was probably wrapped incorrectly.
"Maybe the problem is in wrapping specification? The test instantiates the filter with <SSRT<3>, FixedArray<3> >, whereas the wrapping instantiates with <SSRT<3>, SSRT<3> >."
https://discourse.itk.org/t/computing-hessian-eigenvalues-in-python-how-to-interpret-output-of-symmetriceigenanalysisimagefilter/6517
Description
Steps to Reproduce
Expected behavior
You should see an array printed out that has 6 values. Similar to this, but the numbers obviously will not be the same
array([ -3.0928779 , 1.86561006, 0. , -11.97670084,
6.26783045, 0. ])
Actual behavior
Reproducibility
Unknown
Versions
5.3.0
Environment
python:
4.9.18 (main, Feb 13 2024, 10:56:47)
[GCC 12.2.0]
The text was updated successfully, but these errors were encountered: