Login  Register

Returning distance values from a "plot profile" graph

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

Returning distance values from a "plot profile" graph

JWalker
3 posts
Hello,

I have been working with "plot profile" graphs and am having some trouble. As you scroll over the plot a display in the bottom right corner shows the X (distance) and Y (gray value) values of where the cursor is currently located and all I want is those values but I can't seem to get them out of imageJ. I can hit list or copy to get a list of all of the X and Y values but I want to be able to return the values of specifically selected points.
Simply put, I want a tool that allows me to click on the graph and drop the X and Y values of the selected point in the log or results window. I know I could just look at them and type them in but we work with a very high volume of these graphs and an automated version would save a lot of time.

getCursorLoc or getCoordinates functions haven't been working form me as they work on a different coordinate system. Any help would be appreciated.

Thank you
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Returning distance values from a "plot profile" graph

Rasband, Wayne (NIH/NIMH) [E]
1064 posts
On Jan 23, 2013, at 2:03 PM, JWalker wrote:

> Hello,
>
> I have been working with "plot profile" graphs and am having some trouble.
> As you scroll over the plot a display in the bottom right corner shows the X
> (distance) and Y (gray value) values of where the cursor is currently
> located and all I want is those values but I can't seem to get them out of
> imageJ. I can hit list or copy to get a list of all of the X and Y values
> but I want to be able to return the values of specifically selected points.
> Simply put, I want a tool that allows me to click on the graph and drop the
> X and Y values of the selected point in the log or results window. I know I
> could just look at them and type them in but we work with a very high volume
> of these graphs and an automated version would save a lot of time.
>
> getCursorLoc or getCoordinates functions haven't been working form me as
> they work on a different coordinate system. Any help would be appreciated.

Here is a macro tool that allows you to record x and y values by clicking in an image window or plot window.

   macro "Coordinate Picker Tool -C00cL08f8L808f" {
        getCursorLoc(x, y, z, flags);
        toScaled(x, y)
        row = nResults;
        setResult("X", row, x);
        setResult("Y", row, y);
        updateResults;
   }

You can permanently install this tool in the ImageJ toolbar by saving it in the ImageJ/plugins/Tools folder as "Coordinate Picker Tool.ijm", restarting ImageJ and selecting "Coordinate Picker Tool" from the toolbar's ">>" menu. More information on macro tools is available at

   http://imagej.nih.gov/ij/developer/macro/macros.html#tools

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Returning distance values from a "plot profile" graph

JWalker
3 posts
Wow, that works perfectly thank you. It's exactly what I needed. I'm pretty new at this and I got as far as
   macro "Coordinate Picker Tool -C00cL08f8L808f" {
   getCursorLoc(x, y, z, flags);

but I couldnt figure out how to scale it properly.

Thanks a lot!