Possible bugs within RoiListener and Roi

Posted by CARL Philippe (LBP) on
URL: http://imagej.273.s1.nabble.com/Possible-bugs-within-RoiListener-and-Roi-tp5022556.html

Dear all,

I have a plugin where I want to associate a RoiListener to two given ImagePlus within a plugin (having at least 4 ImagePlus).
In the case I write .addRoiListener(this); to the 2 ImagePlus I want to listen, I get then always 2 "detections" within the public void roiModified method.
As if I associate the .addRoiListener(this); to only one picture, I get then 1 "detection" within the public void roiModified method and this on both pictures (i.e. even the one on which I didn't add a RoiListener).
So is this behavior expected and thus am I doing something wrong or is it a bug?

Besides this let's say a user defines a rectangular ROI within one of these 2 ImagePlus and then clicks next to the already created ROI which then deletes the previously defined Roi.
I would then expect that if you use the method .getRoi() on this ImagePlus, the result will be null, but in fact the method returns a Roi which (when using the method .getBounds()) has the same origin than the previous one but a width and height equal to 0.
Is this as well expected or a bug?

I thank you very much for your lighting on this.

My best regards,

Philippe



Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html