I find that the ImageJ macro command makeOval() behaves differently depending on whether there is an existing selection on the image:
1) When there is no selection on the image, makeOval() creates a circle with sub-pixel resolution. 2) When there is an existing selection on the image (e.g. created by the Wand Tool), the circle created has pixel resolution. I have attached pictures of the two cases: In makeOval_1.tiff, I only created a circle using makeOval(). In makeOval_2.tiff, I first created a selection on the left-hand side using the Wand Tool. Then I created a circle on the right-hand side using makeOval(). The circles created look different. The one in makeOval_1.tiff has apparently been interpolated. Is there a way to get makeOval() to behave consistently? Thanks, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Neil,
if you create a NEW oval selection, it always becomes an oval displayed with subpixel resolution. [Nevertheless, image pixels are considered either outside or inside the selection. E.g. for measurements there are no pixels that contribute with only the portion inside the displayed circle.] What you probably refer to is ADDING an oval to a selection [shift key down; in a macro setKeyDown("shift")] or combining selections in the ROI Manager [More>>OR (Combine)]. This creates a composite selection, which is displayed differently. At least in ImageJ1, I think that this cannot be easily changed. However, note that it only affects how the selections are displayed, not how they are used by the program. If you use selections not for selecting but for drawing, use overlays. You can create an overlay from each selection (Image>Overlay>Add Selection), then all the ovals will be displayed with subpixel resolution. Michael ________________________________________________________________ On Oct 10, 2014, at 19:27, Neil Fazel wrote: > I find that the ImageJ macro command makeOval() behaves differently depending on whether there is an existing selection on the image: > > 1) When there is no selection on the image, makeOval() creates a circle with sub-pixel resolution. > 2) When there is an existing selection on the image (e.g. created by the Wand Tool), the circle created has pixel resolution. > > I have attached pictures of the two cases: > > In makeOval_1.tiff, I only created a circle using makeOval(). > > In makeOval_2.tiff, I first created a selection on the left-hand side using the Wand Tool. Then I created a circle on the right-hand side using makeOval(). > > The circles created look different. The one in makeOval_1.tiff has apparently been interpolated. > > Is there a way to get makeOval() to behave consistently? > > Thanks, > Neil > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > <makeOval_1.tiff><makeOval_2.tiff> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Neil Fazel
Hi Michael,
Thanks a lot for the response. > What you probably refer to is ADDING an oval to a selection Yes, I should have also added that I used setKeyDown("shift") before adding the oval. > However, note that it only affects how the selections are displayed, not how they are used by the program. Is there a reason for displaying composite and non-composite selections differently? This paragraph, from section 10.3 of ImageJ 1.46r user guide, suggests that selections with subpixel resolution also have floating point coordinates: "Since ImageJ 1.46, selections can be defined with subpixel accuracy, beyond the nominal pixel resolution of the image: [link to Floating point selections]. Line Selections (see Line Selection Tools) are created with floating-point coordinates if the Sub-pixel resolution checkbox is active in Edit -> Options > Profile Plot Options. . ." I'm not sure how a floating-point coordinate would be used, but this paragraph suggests the difference between pixel and subpixel resolution is more than cosmetic. Best regards, Neil -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |