Creating image sequences#
Walkthrough#
Load sinogram#
The image sequence is created from a sinogram. First, load (or optimize) a sinogram.
import vamtoolbox as vam
sino = vam.geometry.loadVolume(file_name=vam.resources.load("sino0.sino"))
Create image sequence configurations#
The image sequence configuration contains the properties that determine how the sinogram is to be displayed on a screen or digital light projection device. See ImageConfig to see the options and how they affect the image sequence. Here, two different ImageConfig objects are created for demonstration.
iconfig0=vam.imagesequence.ImageConfig(image_dims=(1920,1080),array_num=2,array_offset=450)
iconfig1=vam.imagesequence.ImageConfig(image_dims=(1920,1080),rotate_angle=45,size_scale=2)
Creating image sequence objects#
With the ImageConfig and a Sinogram the ImageSeq object can be created. The preview() method of the object is used to show a preview of image sequence.
image_seq = vam.imagesequence.ImageSeq(image_config=iconfig0,sinogram=sino)
image_seq.preview()
image_seq = vam.imagesequence.ImageSeq(image_config=iconfig1,sinogram=sino)
image_seq.preview()
Example file#
examples/imagesequence.py#
import vamtoolbox as vam
sino = vam.geometry.loadVolume(file_name=vam.resources.load("sino0.sino"))
iconfig0=vam.imagesequence.ImageConfig(image_dims=(1920,1080),array_num=2,array_offset=450)
iconfig1=vam.imagesequence.ImageConfig(image_dims=(1920,1080),rotate_angle=45,size_scale=2)
image_seq = vam.imagesequence.ImageSeq(image_config=iconfig0,sinogram=sino)
image_seq.preview()
image_seq = vam.imagesequence.ImageSeq(image_config=iconfig1,sinogram=sino)
image_seq.preview()