Save polygon drawn on graph using the drawing tools to wave

Hello,

I'd like to know how I could save a polygon drawn on a graph to wave, to later recall and modify.

The idea is that I'd like to save the polygon drawing of a ROI that I create using the ROI Panel to later recall and modify it - i.e. append another area to the existing one, or reshape the existing one.

Any suggestions?
First suggestion: instead of saving to a wave, save the graph recreation macro. When you want to change it, run the macro, modify the graph, and then re-save the modified graph's recreation macro.

Second suggestion: You can draw a polygon directly to a wave. Click and hold on the Polygon tool until the menu pops up. Choose Draw Wave.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hello John,

Thank you for the quick feedback. I keep the graph displayed for a variety of operations, therefore I would like to not have to kill it and recreate it for the ROI.

I tried to look into your second suggestion, but the draw poly menu only contains the following options:

Draw Poly
Freehand Poly
Edit Poly
Draw Bezier
Edit Bezier

How do I call Draw Wave?
You can use the GraphWaveDraw command for that. Use GraphNormal to exit that mode.
Are you working in a graph window? See my attached screen shot.

If it is a control panel window, then you don't see the wave-related items. But you can look at the documentation for DrawPoly.

If you are keeping your graph around with the drawn items in it, then I don't see the problem. The graph itself is the storage; any time you want to add to the ROI, just add some drawing object and re-run ImageGenerateROIMask.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
PolygonToolMenu.png
Again, thanks for the quick feedback. I do not wish to have a graph permanently showing the ROI, I want to avoid cluttering the screen with too many graphs. Hence the idea to recall it whenever needed.

Still I do not see the Draw Wave dialog when I open the Drawing Tools on my Graph Window, as you can see in the attached image. Suggestions?

IgorDrawWave.jpg
OK, I think we're going in circles now...
Quote:
Again, thanks for the quick feedback. I do not wish to have a graph permanently showing the ROI, I want to avoid cluttering the screen with too many graphs. Hence the idea to recall it whenever needed.

If you don't want the graph window open all the time, but you want to be able to recall it any time you want, there are at least two options that don't involve turning your ROI objects into waves:
1) Save the graph recreation macro (you can do this from a function using Execute/P "DoWindow/R MyROIGraph". With the recreation macro you can recall the graph any time you want.
2) Instead of destroying your ROI graph every time, simply hide it using SetWindow MyROIGraph hide=1. Use SetWindow MyROIGraph hide=0 to make it visible again.
Quote:
Still I do not see the Draw Wave dialog when I open the Drawing Tools on my Graph Window, as you can see in the attached image. Suggestions?

No, I always see the entire menu when a graph window is involved. What version of Igor are you using?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
I'm using Igor 6.38B01.

I agree there seems to be a miscommunication. I want the graph displayed all the time - it is updated as I'm running operations on the wave that is displayed in it. One of these involve selecting an area of interest. I want to store the polygon that I draw on the Programming Front Layer before erasing that Programming Layer Front, so that I can eventually recall the polygon and modify the polygon.
Actually, browsing the help file for the commands you indicated I stumbled upon  DrawAction which seems to do the trick. I'm currently looking into it.