Problem with ROI to overlay in latest version 1.52j

imagej

#1

I found out this week after upgrading imagej to version 1.52j that ROI to overlay does not work anymore, either from imagej menu or in an macro using run(“From ROI Manager”). An exception is generated:

(Fiji Is Just) ImageJ 2.0.0-rc-68/1.52j; Java 1.8.0_66 [64-bit]; Windows 7 6.1; 86MB of 6034MB (1%)

java.lang.NullPointerException
at ij.plugin.frame.RoiManager.moveRoisToOverlay(RoiManager.java:2332)
at ij.plugin.OverlayCommands.fromRoiManager(OverlayCommands.java:293)
at ij.plugin.OverlayCommands.run(OverlayCommands.java:41)
at ij.IJ.runPlugIn(IJ.java:199)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:63)
at java.lang.Thread.run(Thread.java:745)


#2

This regression is fixed in the ImageJ 1.52k13 daily build. To upgrade, use the Help>Update ImageJ command and select “daily build” from the drop down menu,


#3

Thanks, Wayne! It works now.


#4

Hi Wayne,

I found another change related to ROI with the new version. Analyze particles used to produce ROI of the particles that does not include internal holes regardless of the “exclude hole” option is specified. But this has changed for the new version, the ROIs generated from the particle analyzer depend on whether “exclude internal holes” is specified.

This change in general is good as I have to write my own macro to generate ROIs with internal holes in many particle analysis applications. However, this change also generated problem for one of my old macros that assumes that ROI from Particle Analyzer does not include internal holes (e.g. area calculation, convex hull generation).

Is this intended change for new version of Imagej or an accident change? In any case, I think that this change is good, but need to be announced so we are aware of the change.

Thanks!

Jincheng


#5

This is a bug fix that is mentioned in the daily build release notes at

http://wsr.imagej.net/src/source/release-notes.html

Now when using the “Add to manager” option and you click “Measure” in the ROI Manager you get the same results as the particle analyzer.

This issue is discussed at


#6

Wayne,

Thanks for the explanation. It seems that it has always been this way that the ROI from particle analyzer do not include internal holes regardless the “include holes” option although the area measurements are correct for the option specified. This has caused issues and has been discussed in the forum multiple times in the past. I wrote my own macro to include internal holes in the past and did not report this as a bug. I am glad that it is finally corrected in the new version. However, I had to revise multiple macros that assumes the old ROI behavior from the particle analyzer.