Protocols, retrieve currently displayed frame (timepoints) from a time sequence

Hi,

I am developing a protocol and I would like to retrieve the position of the T-index, in other words the currently displayed time point (the position of the slider at the bottom) for the active sequence. Is there a way to do so in protocols ?

Thank you for your answer.
Best regards
Jacques

Hi @jacques2020,

You need to use a small block of javascript into the protocol for that but if you can’t fix your issue with the scripting block then you’re stuck :-/
Here’s the small script you need (javascript here) to get it:

v = gui.getActiveViewer()
t = v.getPositionT()

Best,

– Stephane

1 Like

Thank you, it works great.
I was not aware I can embed Javascript. It opens large possibilities !
Best
Jacques

2 Likes