[ImageJ-bugs] [Bug 1059] Analyze Particles and Bug Report not working
bugzilla at fiji.sc
bugzilla at fiji.sc
Fri Apr 24 13:25:42 CDT 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1059
Mark Hiner <hinerm at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |CONFIRMED
CC| |imagej-bugs at imagej.net
Component|Other |ImageJ1
Assignee|imagej-bugs at imagej.net |wsr at nih.gov
--- Comment #6 from Mark Hiner <hinerm at gmail.com> ---
Oh, of course it requires float data. It's right there in the stack trace.
Sorry I missed that.
Anyway, looks like this is a bug in ImageJ 1.x so I'm giving this to Wayne.
The problem is that the getMedian method in FloatStatistics checks for even or
odd values:
https://github.com/imagej/ImageJA/blob/v1.49r/src/main/java/ij/process/FloatStatistics.java#L239
When the pixel array is empty, size = 0 which tests as even.
This causes index "0 - 1" to be accessed of the pixel array here:
https://github.com/imagej/ImageJA/blob/v1.49r/src/main/java/ij/process/FloatStatistics.java#L240
which causes the reported error.
Probably want to either return 0 or throw an exception if there are no
pixels..?
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150424/144f8432/attachment.html>
More information about the Imagej-bugs
mailing list