Login  Register

Re: Non reproducible bug on ImageJ

Posted by Krs5 on Mar 18, 2015; 2:30pm
URL: http://imagej.273.s1.nabble.com/Non-reproducible-bug-on-ImageJ-tp5012035p5012038.html

See the same behaviour but it does not depend on the run("Crop") as removing it from the code still gives the same result. When I remove close(); the restore selection works. After this the ROI is restored every time the macro runs but not as a result of the ROI created in the macro. If you change this code it has no effect on the restored ROI.

If I have a different ROI on an open image and run the macro this ROI is restored and not the ROI in the macro.

So it looks like the ROI created in the macro is not recognized.

Easy way around this is the use of the ROI manager.

Best wishes

Kees

Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Philippe CARL
Sent: 18 March 2015 13:20
To: [hidden email]
Subject: Non reproducible bug on ImageJ

Dear all / Wayne,

I have got some trouble with an issue on both ImageJ and Fiji that on top of this isn't even reproducible which could make it very tricky to fix.

So let's consider the following short macro code:

run("Blobs (25K)");

makeRectangle(83, 41, 94, 159);

run("Crop");

close();

run("Blobs (25K)");

run("Restore Selection");

So sometimes this code finishes with the Blobs picture open on which the previously defined ROI (i.e. makeRectangle(83, 41, 94, 159)) is selected (as expected).

But sometimes it finishes with all the picture being selected (i.e. similar to run("Select All")), and this issue is connected to the fact that there is a "run("Crop")" within the code.

This problem has now no consequences for the macro I was developing since I finally use a getBoundingRect(x, y, width, height) to get the rectangular ROI position and sizes and apply later on the copied values with a makeRectangle (x, y, width, height) instead of a run("Restore Selection").

But it took me quite some time to figure out the origin of the issue and it may as well be problematic for other users.

My best regards,

Philippe

 

Philippe CARL

Laboratoire de Biophotonique et Pharmacologie

UMR 7213 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

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