Login  Register

Determining direction of Y axis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Determining direction of Y axis

Stein Rørvik
I need to reverse the direction of the Y coordinates in some images.

I do not want to use the "Invert Y coordinates" in the "Set Measurements" command,
because that is a global setting and I only want to do this for some specific images.
Also, the setting must be saved with the image to get correct results in later measurements.

I found that I can do what I want using the Coordinates... command.
The coordinates are handled correctly and the info is saved with the image.

run("Blobs (25K)");
run("Coordinates...", "left=0 right=256 top=254 bottom=0");

If I use Show Info... it correctly shows the altered origin and says Y is inverted.

run("Show Info...");
... Coordinate origin:  0,254
... Inverted y coordinates

My question is, how can I read the "Inverted y coordinates" property in the macro language?
We seem to be missing an

is("Inverted Y")

or perhaps better

getInfo("InvertedY")

command.


Also, it would be neat to be able to turn this Invert Y property on and off for an image,
apart from calculating the scaled coordinates of the corners and using the run("Coordinates..." command.
This could be implemented by an

setOption("InvertedY", boolean)

command.


Stein


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