Help with Movie
pczjrh
Can anyone help me get this working?
It runs, I see that images/frames on screen, but Igor tells me that the image is not available to add the frame.
I'm not using any switches, as the default settings should be fine.
Cheers,
Jason.
Function MovieFromImages()
String TempString
String BaseName
String WaveBaseName
Wave Frame
Variable NOI,i
multiopenfiles
string text_string = S_filename
Make/O/T/N=(ItemsInList(text_string, ";")) text_wave
text_wave = StringFromList(p, text_string, ";")
NOI=numpnts(text_wave)
Make/O/N=(NOI) Results
SetDataFolder root:
BaseName = "Image"
NewMovie
For (i=1;i<NOI;i+=1)
sprintf TempString "%*.*d" 3,3,i
ImageLoad/O/N=Image text_wave[i]
Wave Image
If (i==1)
NewImage Image
Else
RemoveImage Image
AppendImage Image; DoUpdate
AddMovieFrame
EndIf
Endfor
CloseMovie
End Function
String TempString
String BaseName
String WaveBaseName
Wave Frame
Variable NOI,i
multiopenfiles
string text_string = S_filename
Make/O/T/N=(ItemsInList(text_string, ";")) text_wave
text_wave = StringFromList(p, text_string, ";")
NOI=numpnts(text_wave)
Make/O/N=(NOI) Results
SetDataFolder root:
BaseName = "Image"
NewMovie
For (i=1;i<NOI;i+=1)
sprintf TempString "%*.*d" 3,3,i
ImageLoad/O/N=Image text_wave[i]
Wave Image
If (i==1)
NewImage Image
Else
RemoveImage Image
AppendImage Image; DoUpdate
AddMovieFrame
EndIf
Endfor
CloseMovie
End Function
August 20, 2010 at 11:16 am - Permalink
I don't understand why that would make any difference?
Surely I can display a frame starting at any point along the wave.
Besides, I have tried regardless, and it still gives out the same errors.
Jason.
August 23, 2010 at 05:35 am - Permalink
Have you tried using Igor's debugger to determine at what point in the For loop AddMovieFrame fails? Perhaps one or more points in your text wave do not contain valid values for ImageLoad, so it doesn't load anything. That would make Image a null wave and the rest of the loop would fail. I'd enable the debugger, turn on debug on error, and Null NVAR/SVAR/WAVE checking. Then set a breakpoint before entering the loop and step through to figure out why it's failing.
August 23, 2010 at 08:26 am - Permalink
Before calling the
NewMovie
command I should have plotted the first frame.Thanks to AC for suggesting the Debugger - I noticed it was complaining about not having a frame prior to the first loop.
Hope this helps others,
Jason.
January 25, 2011 at 02:19 pm - Permalink