PySpin.ImageList

class ImageList(*args)

Used to hold a list of image objects.

static Load(filename) ImageList

Parameters

filename: char const *

Add(self, image)

Parameters

image: Spinnaker::ImagePtr

Adds a copy of an image object.

param image:

An image object to be added to this list.

Append(self, list)

Parameters

list: Spinnaker::ImageList const &

Appends a copy of the image list.

param list:

Another ImageList object, whose elements are added to this list.

Clear(self)

Clears the list of images and destroys their corresponding reference counted objects. This is necessary in order to clean up the parent interface. It is important that the camera list is destroyed or is cleared before calling system->ReleaseInstance() or else the call to system->ReleaseInstance() will result in an error message thrown that a reference to the camera is still held.

See: System::ReleaseInstance()

GetByIndex(self, index) ImagePtr

Parameters

index: unsigned int

Returns a pointer to an image object at the “index”. This function will throw a Spinnaker exception with SPINNAKER_ERR_INVALID_PARAMETER error if the input index is out of range.

param index:

The index at which to retrieve the Image object

A pointer to an image object.

GetByPayloadType(self, payloadType) ImagePtr

Parameters

payloadType: enum Spinnaker::ImagePayloadType const

Returns a pointer to an image object with the specified image payload type. This function will return a null image pointer if no image with matching image payload type is found.

param payloadType:

The stream index of the Image object to retrieve

A pointer to a image object.

GetByPixelFormat(self, pixelFormat) ImagePtr

Parameters

pixelFormat: enum Spinnaker::PixelFormatEnums

Returns a pointer to the first image object with the pixel format from the list. This function will return a null image pointer if no image with matching pixel format is found.

param pixelFormat:

The pixel format of the Image object to retrieve

A pointer to an image object.

GetByStreamIndex(self, streamIndex) ImagePtr

Parameters

streamIndex: uint64_t const

Returns a pointer to an image object with the specified stream index. This function will return a NULL ImagePtr if no image with matching stream index is found.

param streamIndex:

The stream index of the Image object to retrieve

A pointer to a image object.

GetImagesByPayloadType(self, payloadType) ImageList

Parameters

payloadType: enum Spinnaker::ImagePayloadType const

Returns an ImageList containing all the images matching the specified image payload type. This function will return an empty list if no image with matching image payload type is found.

param payloadType:

The stream index of the Image object to retrieve

A pointer to a image object.

GetImagesByPixelFormat(self, pixelFormat) ImageList

Parameters

pixelFormat: enum Spinnaker::PixelFormatEnums

Returns an ImageList containing all imageList objects that match the pixel format provided. This function will return an empty list if no image with matching pixel format is found.

param pixelFormat:

The pixel format of the Image object to retrieve

An ImageList containing all matching image objects.

GetSize(self) unsigned int

Returns the size of the image list. The size is the number of Image objects stored in the list.

An integer that represents the list size.

Release(self)
RemoveByIndex(self, index)

Parameters

index: unsigned int

Removes an image at “index” and destroys its corresponding reference counted object. This function will throw a Spinnaker exception with SPINNAKER_ERR_INVALID_PARAMETER error if the input index is out of range.

param index:

The index at which to remove the Image object

RemoveByPayloadType(self, payloadType)

Parameters

payloadType: enum Spinnaker::ImagePayloadType const

Removes an image object with the specified payload type from the list. This function will throw a Spinnaker exception with SPINNAKER_ERR_INVALID_PARAMETER error if the list does not have any image with the specified payload type.

param payloadType:

The payload type of the Image object to retrieve

RemoveByPixelFormat(self, pixelFormat)

Parameters

pixelFormat: enum Spinnaker::PixelFormatEnums

Removes an image object with the image pixel format from the list. This function will throw a Spinnaker exception with SPINNAKER_ERR_INVALID_PARAMETER error if the list does not have any image with the specified pixel format.

param pixelFormat:

The pixel format of the image object to remove

RemoveByStreamIndex(self, streamIndex)

Parameters

streamIndex: uint64_t const

Removes an image object with the stream index from the list. This function will throw a Spinnaker exception with SPINNAKER_ERR_INVALID_PARAMETER error if the list does not have any image with the specified stream index.

param streamIndex:

The stream index of the Image object to retrieve

Save(self, filename)

Parameters

filename: char const *

Saves an image list as an object to a file.

param filename:

Name of the file to save the current image list object to. It is recommended to use the file extension ‘sil’.

See:

Load()