Save polygon drawn on graph using the drawing tools to wave
kpantzas
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?
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
February 8, 2017 at 09:14 am - Permalink
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?
February 9, 2017 at 03:11 am - Permalink
February 9, 2017 at 08:08 am - Permalink
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
February 9, 2017 at 09:05 am - Permalink
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?
February 9, 2017 at 10:28 am - Permalink
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
. UseSetWindow MyROIGraph hide=0
to make it visible again.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
February 9, 2017 at 04:56 pm - Permalink
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.
February 10, 2017 at 02:02 am - Permalink
DrawAction
which seems to do the trick. I'm currently looking into it.February 10, 2017 at 07:46 am - Permalink