tomosipo.qt.animation module
- class tomosipo.qt.animation.Animation(*geometries, total_duration_seconds=5)[source]
Bases:
objectDocumentation for Animation
- iter_video_frames()[source]
Return an iterator over the frames the video
- new_gl_view_widget()[source]
- save(path='geometry_video.mp4')[source]
- property total_steps
- video_as_array()[source]
- window()[source]
- tomosipo.qt.animation.animate(*geometries, total_duration_seconds=5)[source]
Returns an animation of the geometries
The return type is an object that can be saved:
>>> import tomosipo as ts >>> from tomosipo.qt import animate >>> animate(ts.parallel(angles=10)).save('/tmp/geometry.mp4');
It can also be opened in a window:
>>> animate(ts.parallel(angles=10)).window()
In a Jupyter notebook, the animation is automatically converted to a video and shown if it is the final value in a cell.
- Parameters:
total_duration_seconds – the total duration of the animation in seconds.
- Returns:
an animation object
- Return type:
Animation
- tomosipo.qt.animation.display_geometry(*geometries)[source]
Display interactive 3D animation of the acquisition geometry
Note: requires the installation of pyopengl.
- Parameters:
geometries – Any combination of volume and projection geometries.
- Returns:
Nothing
- Return type:
None
- tomosipo.qt.animation.update_widget(widget, geometries, colors, step)[source]