ScreenCapture: how to capture "Rock 3D view" animation

(Seyed-Ahmad Ahmadi) #1

I am trying to use ScreenCapture to record the 3D view. I have my 3D scene nicely laid out, and I get a very nice animation if I switch on “Rock the 3D view” from the drop-down menu. I would like to record that to disc, but frame by frame, since I have multi-volume renderings activated and that doesn’t run smoothly in real-time (otherwise I could use an external screen grabbing tool). Also, I would like the “rocking” animation recorded only once forth-and back (then I can loop it later e.g. in Powerpoint).

Unfortunately, “Rock 3D view” is not an option in ScreenCapture. I tried to replicate that myself, by recording just a 90 degree Yaw rotation in ScreenCapture, and then I could manually replicate those frames in the inverse order, concatenate both sweeps and thus create a “rocking” motion. However, in my current Slicer version (4.11.0-2019-01-21), ScreenCapture rotates my entire scene, kinda upside down, before the frame-by-frame rotation starts - instead, I wanna start exactly from the view that I get if I click the “R” perspective in the 3D view, so this “hack” is not an option.
Another things I tried is following the code from the ScriptRepository. The line “threeDView.yaw()” does what I need, but only in one direction (a rotation towards the right), and the step size is a bit too large. Could you please let me know how to achieve this using ScreenCapture code and the threeDview.yaw() method?

Come to think of it, this is the third or fourth time that I prefere the “Rock 3D view” animation more than a 360 degree rotation (or other). If it is not too hard for you to integrate this, I would very much welcome to have this as a feature in ScreenCapture. :slight_smile: I’m thus changing the category to “Feature request”. Thanks a lot!

(Andras Lasso) #2

It is available already - see “Advanced” section “Forward-backward” checkbox.

1 Like
(Seyed-Ahmad Ahmadi) #3

Awesome! :slight_smile: Didn’t notice this feature before. Thanks for the quick response!

1 Like