Freehand Editing of Custom Line Profiles with WMCreateImageLineProfileGraph()

I would like to use the freehand editing features of WMCreateImageLineProfileGraph() but to start with custom line profile data. Does anyone know an easy way of going about this?
Hello univox,

It is in general not a good idea to mess with shipping packages but your goal can be accomplished without changing any code in the procedure.

When you start editing a freehand profile the procedure creates a pair of waves: FHLineProfileY and FHLineProfileX in datafolder root:WinGlobals:Graph0. Here Graph0 is the name of the window in which the image and profiles are displayed.

To have your own custom profile simply overwrite this pair of waves with something of your choice. You need to make sure that:

1. Both waves have the same number of points N>=2.
2. Keep the waves in DP and make sure they are expressed in terms of scaled pixel locations.

I hope this helps,

A.G.
WaveMetrics, Inc.
I thought about doing this, but the problem is I have over 500 data points in my custom line profile. This means what when I go to edit freehand I have to click 500 times... any thoughts on how to get around that?
univox wrote:
I thought about doing this, but the problem is I have over 500 data points in my custom line profile. This means what when I go to edit freehand I have to click 500 times... any thoughts on how to get around that?


I must be missing something...

I suppose you have a pair of waves defining your 500+ data points. If so, what keeps you from:

1. create the line Profile panel.
2. choose the freehand mode.
3. use your pair of waves to overwrite the two used by the panel.

I should also note that unless you are actually interested in performing some manual editing, there is probably little point in using the Line Profile panel. In other words, if you have a path that is not going to be manually edited you should simply execute ImageLineProfile for the desired path.

If this does not answer your question please provide more details as to exactly what you want to do.

A.G.
WaveMetrics, Inc.