:py:mod:`vamtoolbox.imagesequence` ================================== .. py:module:: vamtoolbox.imagesequence Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: vamtoolbox.imagesequence.ImageConfig vamtoolbox.imagesequence.ImageSeq Functions ~~~~~~~~~ .. autoapisummary:: vamtoolbox.imagesequence.loadImageSeq vamtoolbox.imagesequence._insertImage vamtoolbox.imagesequence._arrayInsertImage vamtoolbox.imagesequence._invertU vamtoolbox.imagesequence._invertV vamtoolbox.imagesequence._scaleSize vamtoolbox.imagesequence._scaleIntensity vamtoolbox.imagesequence._truncateIntensity vamtoolbox.imagesequence._rotate .. py:class:: ImageConfig(image_dims, **kwargs) .. py:class:: ImageSeq(image_config, sinogram) .. py:method:: __getstate__() Helper for pickle. .. py:method:: __setstate__(d) .. py:method:: save(name: str) save imagesequence.ImageSeq as 'name.imgseq' .. py:method:: preview() Preview an animated image sequence .. py:method:: saveAsVideo(save_path: str, rot_vel: float, num_loops: float = 1, mode: str = 'conventional', angle_increment_per_image: float = None, preview: bool = False) :param save_path: filename of output video e.g. "video.mp4" :type save_path: str :param rot_vel: rotation velocity (deg/s) :type rot_vel: float :param num_loops: number of times to loop the images in playback. In conventional mode, num_loops is equivalent to the number of rotations because the image set is assumed to span a full rotation. :type num_loops: float, optional :param mode: 'conventional' mode: angle_increment_per_image is derived from number of images, assuming the image set span a full rotation. Video duration is proportional to num_loops. The argument angle_increment_per_image is ignored in this mode. 'prescribed' mode: angle_increment_per_image is prescribed. Assuming the video plays back the image set exactly once, regardless whether the image set span less or more than one rotation. The argument num_loops is ignored in this mode. :type mode: str, optional :param angle_increment_per_image: spacing of images (deg) :type angle_increment_per_image: float, optional :param preview: preview the video while the function exports the video :type preview: bool, optional .. py:method:: saveAsImages(save_dir: str, image_prefix: str = 'image', image_type: str = '.png') .. py:function:: loadImageSeq(file_name: str) .. py:function:: _insertImage(image, image_out, image_config, v_offset, **kwargs) .. py:function:: _arrayInsertImage(image, image_out, image_config) .. py:function:: _invertU(sinogram) .. py:function:: _invertV(sinogram) .. py:function:: _scaleSize(sinogram, scale_factor) .. py:function:: _scaleIntensity(sinogram, intensity_scalar) .. py:function:: _truncateIntensity(sinogram, maximum_intensity) .. py:function:: _rotate(sinogram, angle_deg)