imglib / imglib2-algorithm

Image processing algorithms for ImgLib2
http://imglib2.net/
Other
22 stars 20 forks source link

HessianMatrix.calculateMatrix() returns all zeros #77

Closed ctrueden closed 5 years ago

ctrueden commented 5 years ago

Starting with 0.11.0, the HessianMatrix.calculateMatrix() call returns all zeros, in cases where 0.10.0 and earlier returned non-zero results. See this gist for a minimal example.

CC: @maarzt @tpietzsch

ctrueden commented 5 years ago

Note that this issue affects the tubeness op.

StephanPreibisch commented 5 years ago

I also think there is something wrong with it ... needed to reimplement it for my recent project since the results didn’t yield correct eigenvectors after eigenvaluedecomposition - or I misused it somehow. Sorry, didn’t have time to make an example, I’ll show you in Heidelberg ... we can try together

tpietzsch commented 5 years ago

The only thing that changed between these releases is the new Gauss implementation by @maarzt. Something must be wrong with that. Maybe it's computing intermediate results in the wrong type? @maarzt can you investigate please?

Quick workaround would be to go back to previous Gauss implementation. (But because nothing else changed, we can also just go back to 0.10.0 downstream...)

maarzt commented 5 years ago

The problem was caused, by the ExecuterService used (newCachedThreadPool). When you ask it, for the number of threads it uses, it returns Integer.MAX_VALUE. The new gauss implementation does so, and fails when it wants to distributes task to Integer.MAX_VALUE threads. Number overflow etc...

@tpietzsch the linked PR fixes the problem: https://github.com/imglib/imglib2-algorithm/pull/78

tpietzsch commented 5 years ago

Great, thank you @maarzt! I'm releasing 0.11.1 now.

ctrueden commented 5 years ago

Thanks guys!