Tools for creating screen capture of rotating brain

Hi everyone,

I’d like to record a video of a 3D brain/tractography view that rotates automatically. Does anyone know of a tool I could use? I’d like the brain to rotate on its own without me having to drag it manually because that turns out very uneven in a video (what I’m doing at the moment is using my laptop’s screen capture option and rotating the brain myself but I’m not happy with that). Thank you in advance!

Hello! The FURY library is great for this.

We wrote some detailed examples of creating visualizations and videos of anatomy + tractography with FURY here:

https://tractometry.org/pyAFQ/tutorials/tutorial_examples/plot_003_viz.html

https://tractometry.org/pyAFQ/howto/howto_examples/plot_stages_of_tractometry.html

This is also built into suma in the AFNI software package. suma can show tractogaphy, rendered volume, mappings from fMRIm and it can record output. You can drive via script or just set recording on with ‘R’ and save the output recording window. See the video here for some details:

For voxel-based images, one solution is MRIcroGL, which allows you to write Python scripts to automate views. Below is the example of the Scripting/Templates/Explode menu item. Note you can uncomment the “gl.savebmp()” to save screenshots that you can concatenate into an animated movie for a web site (e.g. a GIF or AVI movie). The Scripting/Templates/ct_abdomen.

For mesh based surfaces, one solution is Surfice, which allows you to write Python scripts to automate views. Below is the example Scripting/Templates/Subcortical. Again yuo can use the “gl.savebmp()” function to save each frame as a standard bitmap for subsequent conversion to an animated movie.

FWIW FSLeyes is capable of generating screenshots from the command-line, and pretty much everything is configurable via the command-line interface. Saad Jbabdi wrote a humourous example on how to generate an animated gif using FSLeyes and imagemagick, which you can find at applications/data_visualisation/fsleyes_render.md · main · FSL / win-pytreat · GitLab

Oh, and I completely forgot - FSLeyes has a Save animated GIF option, so you can generate GIFs such as the following entirely through the FSLeyes interface:

movie

You can achieve this by opening a 3D view, setting up the scene as you wish, then in the view settings (spanner icon) changing the Movie axis to Z, then choosing the Settings → 3D view → Save animated GIF menu option.