Playing image stack as a movie?
chris
At the moment I have a "Play" button, that simply starts a for-endfor loop advancing one frame at a time using:
ModifyImage/W=DataViewer tStack, plane=(vCurrentFrame)
If I want to "stop" the playback, I need to interrupt using 'Cmd-.'
The only alternative I can think of is to have "play" start a background task that is called every few ticks (depending on the intended frame rate) and have "stop" stop that task.
Am I missing a more obvious means of achieving this? The forum and mailing list archives don't seem to hold the answer.
Many thanks, Chris
http://www.igorexchange.com/project/ScrollTracesPanel
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
June 5, 2014 at 05:02 am - Permalink
Check the Igor User Manual, Chapter IV-6 "Interacting with the User" on p. IV-140. There is example code for a function PressEscapeToAbort( ) that monitors the keyboard for the Esc key, and takes whatever action you program, particularly stopping your function in a more controlled manner than the usual Abort button.
June 5, 2014 at 07:01 am - Permalink
Yes, if you want a control panel with a Stop button to be active during playback, that would be a way to do it.
You might also consider a Progress Panel:
DisplayHelpTopic "Progress Windows"
That is an advanced technique and relatively new to Igor that requires some tricky code inside Igor...
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 5, 2014 at 09:24 am - Permalink
I have a control panel containing the slider and buttons for stepping through the stack plane by plane so I will just be adding the buttons there.
It appears that I will finally get to use background tasks in Igor :)
June 5, 2014 at 11:28 am - Permalink