Package pyvision :: Package types :: Module Video :: Class VideoFromImageStack
[hide private]
[frames] | no frames]

Class VideoFromImageStack

source code

    object --+    
             |    
VideoInterface --+
                 |
                VideoFromImageStack


This class allows the user to treat a stack of grayscale images in a 3D numpy array as a video.
    We assume that the dimensions of the array are ordered as (frame number, width, height).

Instance Methods [hide private]
 
__init__(self, imageStack, size=None)
imageStack is the numpy ndarray that represents the image stack.
source code
 
query(self)
Must be overridden to implement the specific frame-grabbing required by different video sources.
source code
 
__iter__(self)
Return an iterator for this video
source code

Inherited from VideoInterface: grab, next, play, resize

Inherited from VideoInterface (private): _pauseAndPlay

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, imageStack, size=None)
(Constructor)

source code 

    imageStack is the numpy ndarray that represents the image stack. Should be of dimensions (frames,width,height).
    Optionally, this can be any object, such as pyvision.ImageBuffer, that implements asStackBW() method that returns
    the grayscale image stack.
size is the optional width,height to resize the input frames.

Overrides: object.__init__

query(self)

source code 

Must be overridden to implement the specific frame-grabbing required by different video sources.

Overrides: VideoInterface.query
(inherited documentation)

__iter__(self)

source code 

Return an iterator for this video

Overrides: VideoInterface.__iter__