Movie frames not updating
Mon, 02/04/2019 - 08:52 am
I am trying to write a function that makes a movie from a 3D stack of .tiff images (DataCube). I need to add a textbox to every frame of the movie with information about the temperature at which the frame was captured. The temperature information is stored in a text wave (TempData). If I run the statements in the for loop portion as separate commands then the code works. However, when I compile the procedure pasted below and run the function, the created movie just contains the first frame repeated several times and there isn't any text box in that frame.
Function MakeMovieFrom3DWave(DataCube,TempData) Wave DataCube,TempData variable i NewMovie /F=10/O as "NewMovie.avi" Make/o/n=(dimsize(DataCube,0),dimsize(DataCube,1)) frame NewImage/N=FrameGraph frame for (i=0; i < dimsize(DataCube,2); i+=1) frame = DataCube[p][q][i] TextBox/C/n=temperature TempData[i] DoUpdate AddMovieFrame print i endfor CloseMovie KillWindow FrameGraph Killwaves frame end
I need help in figuring out why this procedure is not behaving as intended.