Problem with ROI to overlay in latest version 1.52j



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%)

at ij.plugin.frame.RoiManager.moveRoisToOverlay(
at ij.plugin.OverlayCommands.fromRoiManager(
at ij.IJ.runPlugIn(
at ij.Executer.runCommand(


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,


Thanks, Wayne! It works now.


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.




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

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



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.