Re: Duplicate command fails to preserve overlay coordinates relative to image data coordinates.
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Nov 18, 2010; 9:30pm
URL: http://imagej.273.s1.nabble.com/Duplicate-command-fails-to-preserve-overlay-coordinates-relative-to-image-data-coordinates-tp3686398p3686399.html
On Nov 18, 2010, at 9:37 AM,
[hidden email] wrote:
> The Duplicate command when used with a region of interest to create a copy of a portion of an image, fails to translate the overlay.
>
> For example:
>
> - Open the "Clown" sample image,
> - Use the Oval ROI tool to draw an oval around the clown's right eye. (right to you, not the clown - not that it really matters!)
> - Add this oval to the overlay using the "Add Selection" tool.
> - Create a rectangular ROI that is larger than and completely encloses the overlay oval.
> - Use the Duplicate command to create a copy of the selected ROI of the image.
>
> The selected portion of the image is duplicated but the oval in the overlay now occupies a different position relative to the clown's eye.
>
> This script the demonstrates the problem:
>
> run("Clown (14K)");
> makeOval(147, 62, 90, 44);
> run("Add Selection...", "stroke=blue width=2 fill=none");
> makeRectangle(111, 34, 166, 113);
> run("Duplicate...", "title=clown-1.jpg");
>
>
> The overlay is duplicated but its position relative to the image is not preserved.
>
> Any thoughts? Is this a bug or a feature that other things rely on?
This is a bug that is fixed in the 1.44k daily build.
-wayne