Overlaying an Image Line Profile on a Movie

Hi, I was wondering if it was possible to overlay an image line profile on a movie, so that as the movie plays the image line profile will change with the movie? I have been able to overlay an image line profile for a single frame onto the movie, but I was hoping to be able to create a movie with the moving image line profile for the whole movie. I hope this was explained well enough. Thanks in advance!
Here is a general example that should indicate the steps necessary.

I start by generating sample data:
Make/n=(10,20,30) stackWave=enoise(10)


Next I create the profile path waves:
Make/n=2 xxx,yyy
xxx={5,5}
yyy={0,20}


Now execute the first ImageLineProfile to get the resulting wave which I will display:
ImageLineprofile/p=0 xwave=xxx,ywave=yyy,width=0,srcwave=stackWave


This created W_ImageLineProfile. At this point I create a basic window that contains both the image and the profile:
display
newimage/host=graph0 stackWave
display/host=graph0 w_ImageLineProfile

Select the graph and choose Show Tools to position the image and the graph as desired for the movie frame. Now for each frame (i) in the movie you need to execute the following:
modifyimage/W=Graph0#g0 stackWave plane=(i)
ImageLineProfile/P=(i) xwave=xxx,ywave=yyy,width=0,srcwave=stackWave
DoUpdate
AddMovieFrame


I hope this helps,

A.G.
WaveMetrics, Inc.