:py:mod:`vamtoolbox.dlp.players` ================================ .. py:module:: vamtoolbox.dlp.players Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: vamtoolbox.dlp.players.VideoPlayer vamtoolbox.dlp.players.SequencePlayer vamtoolbox.dlp.players._Process Functions ~~~~~~~~~ .. autoapisummary:: vamtoolbox.dlp.players._worker vamtoolbox.dlp.players.player vamtoolbox.dlp.players.preview .. py:class:: VideoPlayer(path) .. py:method:: pauseVideo() .. py:method:: resumeVideo() .. py:class:: SequencePlayer(*args, **kwargs) Bases: :py:obj:`pyglet.sprite.Sprite` [1]: https://github.com/pyglet/pyglet/issues/152#issuecomment-597480199 .. py:property:: frame_index .. py:method:: pauseSequence() .. py:method:: resumeSequence() .. py:method:: onAnimationEnd() .. py:class:: _Process(*args, **kwargs) Bases: :py:obj:`pyglet.window.Window` .. py:method:: run() .. py:method:: on_draw() .. py:method:: on_key_press(symbol, modifiers) .. py:function:: _worker(*args, **kwargs) .. py:function:: player(*args, **kwargs) :param rot_vel: rotation velocity in degrees per second :type rot_vel: float :param start_index: starting index of image sequence, default is 0 :type start_index: int, optional :param image_seq: imagesequence.ImageSeq object :type image_seq: imagesequence.ImageSeq, optional :param sinogram: geometry.Sinogram object :type sinogram: geometry.Sinogram, optional :param image_config: imagesequence.ImageConfig object defining sinogram to image transformation :type image_config: imagesequence.ImageConfig, optional :param images_dir: file directory to saved images :type images_dir: str, optional :param screen_num: number of the screen to display onto, default -1 (last screen) :type screen_num: int, optional :param windowed: bordered window, default False :type windowed: bool, optional :param duration: duration of sequence or video playback, default None (infinite playback) :type duration: float, optional :param pause_bg_color: color to be shown when playback is paused, default (0,0,0) (black background) :type pause_bg_color: tuple, optional :param debug_fps: display estimated fps on the displayed window, default False :type debug_fps: bool, optional .. rubric:: Examples Press spacebar to start playback. During playback, press spacebar to pause or resume playback. Specifying ImageSeq object >>> I = ImageSeq() >>> player(image_seq=I,rot_vel=12) Specifying Sinogram object >>> sino = loadVolume("C:\mysinogram.sino") >>> player(sinogram=sino,rot_vel=12) Specifying images directory >>> dir = "C:\images" >>> player(rot_vel=12,images_dir=dir) Specifying video file >>> path = "C:\video.mp4" >>> player(rot_vel=12,video=path) .. py:function:: preview(image_seq)