The image object class. More...
Public Member Functions | |
virtual | ~Image () |
Virtual destructor. More... | |
ColorProcessingAlgorithm | GetColorProcessing () const |
Gets the color algorithm used to produce the image. More... | |
ImagePtr | Convert (Spinnaker::PixelFormatEnums format, ColorProcessingAlgorithm colorAlgorithm=DEFAULT) const |
Converts the current image buffer to the specified output pixel format and stores the result in the specified image. More... | |
void | Convert (ImagePtr destinationImage, Spinnaker::PixelFormatEnums format, ColorProcessingAlgorithm colorAlgorithm=DEFAULT) const |
Converts the current image buffer to the specified output pixel format and stores the result in the specified destination image. More... | |
void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, Spinnaker::PixelFormatEnums pixelFormat) |
Sets new dimensions of the image object and allocates memory. More... | |
void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, Spinnaker::PixelFormatEnums pixelFormat, void *pData) |
Sets new dimensions of the image object. More... | |
void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData, PayloadTypeInfoIDs dataPayloadType, size_t dataSize) |
Sets new dimensions of the image object. More... | |
void | Release () |
uint64_t | GetID () const |
Gets a unique ID for this image. More... | |
void * | GetData () const |
Gets a pointer to the data associated with the image. More... | |
float | GetDataAbsoluteMax () const |
Get the value for which no image data will exceed. More... | |
float | GetDataAbsoluteMin () const |
Get the value for which no image data will be less than. More... | |
void * | GetPrivateData () const |
Gets a pointer to the user passed data associated with the image. More... | |
size_t | GetBufferSize () const |
Gets the size of the buffer associated with the image in bytes. More... | |
void | DeepCopy (const ImagePtr pSrcImage) |
Performs a deep copy of the Image. More... | |
size_t | GetWidth () const |
Gets the width of the image in pixels. More... | |
size_t | GetHeight () const |
Gets the height of the image in pixels. More... | |
size_t | GetStride () const |
Gets the stride of the image in bytes. More... | |
size_t | GetBitsPerPixel () const |
Gets the number of bits used per pixel in the image. More... | |
size_t | GetNumChannels () const |
Gets the number of channels (depth) used in the image. More... | |
size_t | GetXOffset () const |
Gets the ROI x offset in pixels for this image. More... | |
size_t | GetYOffset () const |
Gets the ROI y offset in pixels for this image. More... | |
size_t | GetXPadding () const |
Gets the x padding in bytes for this image. More... | |
size_t | GetYPadding () const |
Gets the y padding in bytes for this image. More... | |
uint64_t | GetFrameID () const |
Gets the frame ID for this image. More... | |
size_t | GetPayloadType () const |
Gets the payload type that was transmitted. More... | |
PayloadTypeInfoIDs | GetTLPayloadType () const |
Gets the GenTL specific payload type that was transmitted. More... | |
uint64_t | GetTLPixelFormat () const |
Gets the pixel format of the image. More... | |
PixelFormatNamespaceID | GetTLPixelFormatNamespace () const |
Returns an enum value that represents the namespace in which this image's TL specific pixel format resides. More... | |
GenICam::gcstring | GetPixelFormatName () const |
Returns a string value that represents this image's pixel format. More... | |
Spinnaker::PixelFormatEnums | GetPixelFormat () const |
Returns an enum value that represents the pixel format of this image. More... | |
Spinnaker::PixelFormatIntType | GetPixelFormatIntType () const |
Returns an enum value that represents the integer type used in the pixel format of this image. More... | |
bool | IsIncomplete () const |
Returns a boolean value indicating if this image was incomplete. More... | |
size_t | GetValidPayloadSize () const |
Returns the size of valid data in the image payload. More... | |
uint64_t | GetChunkLayoutId () const |
Returns the id of the chunk data layout. More... | |
uint64_t | GetTimeStamp () const |
Gets the time stamp for the image in nanoseconds. More... | |
void | Save (const char *pFilename, ImageFileFormat format=FROM_FILE_EXT) const |
Saves the image to the specified file name with the file format specified. More... | |
void | Save (const char *pFilename, PNGOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, PPMOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, PGMOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, TIFFOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, JPEGOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, JPG2Option &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
void | Save (const char *pFilename, BMPOption &pOption) const |
Saves the image to the specified file name with the options specified. More... | |
const ChunkData & | GetChunkData () const |
Returns a pointer to a chunk data interface. More... | |
void | CalculateStatistics (ImageStatistics &pStatistics) |
Retrieves a number of pixel statistics for an image including a histogram array of the range of pixel values. More... | |
bool | HasCRC () const |
Checks if the image contains ImageCRC checksum from chunk data. More... | |
bool | CheckCRC () const |
Checks if the computed checksum matches with chunk data's ImageCRC. More... | |
size_t | GetImageSize () const |
Returns the size of the image. More... | |
bool | IsInUse () |
Returns true if the image is still in use by the stream. More... | |
ImageStatus | GetImageStatus () const |
Returns data integrity status of the image returned from GetNextImage() More... | |
bool | IsCompressed () const |
Returns a boolean value indicating whether this image is compressed. More... | |
![]() | |
virtual | ~IImage () |
Static Public Member Functions | |
static ImagePtr | Create () |
Create an image object. More... | |
static ImagePtr | Create (const ImagePtr image) |
Create an image object that is a deep copy of the input image. More... | |
static ImagePtr | Create (size_t width, size_t height, size_t offsetX, size_t offsetY, Spinnaker::PixelFormatEnums pixelFormat, void *pData) |
Create an image object with the specified parameters. More... | |
static ImagePtr | Create (size_t width, size_t height, size_t offsetX, size_t offsetY, Spinnaker::PixelFormatEnums pixelFormat, void *pData, PayloadTypeInfoIDs dataPayloadType, size_t dataSize) |
Create an image object with the specified parameters. More... | |
static void | SetDefaultColorProcessing (ColorProcessingAlgorithm colorAlgorithm) |
Sets the default color processing algorithm. More... | |
static ColorProcessingAlgorithm | GetDefaultColorProcessing () |
Gets the default color processing algorithm. More... | |
static void | SetNumDecompressionThreads (unsigned int numThreads) |
Sets the default number of threads used for image decompression during Convert(). More... | |
static unsigned int | GetNumDecompressionThreads () |
Gets the number of threads used for image decompression during Convert(). More... | |
static const char * | GetImageStatusDescription (ImageStatus status) |
Returns a string describing the meaning of the status enum. More... | |
Protected Member Functions | |
ImageData * | GetImageData () const |
Image () | |
Image (const ImagePtr image) | |
Image (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData) | |
Image (size_t width, size_t height, size_t offsetX, size_t offsetY, Spinnaker::PixelFormatEnums pixelFormat, void *pData, PayloadTypeInfoIDs payloadType, size_t payloadSize) | |
ImagePtr | CreateShared () const |
void | DeepCopy (const Image &pSrcImage) |
void | Convert (PixelFormatEnums format, Image &pDestImage, ColorProcessingAlgorithm colorAlgorithm=DEFAULT) const |
![]() | |
IImage () | |
Friends | |
class | IDataStream |
class | Stream |
class | ImageConverter |
class | ImageConverterIpp |
class | ImageFiler |
class | ImageStatsCalculator |
class | ImageUtilityImpl |
class | ImageUtilityPolarizationImpl |
The image object class.
|
virtual |
Virtual destructor.
|
protected |
|
protected |
|
protected |
|
virtual |
Retrieves a number of pixel statistics for an image including a histogram array of the range of pixel values.
pStatistics | The statistics of an image. |
Implements IImage.
|
virtual |
Checks if the computed checksum matches with chunk data's ImageCRC.
Implements IImage.
|
virtual |
Converts the current image buffer to the specified output pixel format and stores the result in the specified image.
The destination image does not need to be configured in any way before the call is made. Note that compressed images are decompressed before any further color processing or conversion during this call. Decompression is multi-threaded and defaults to utilizing one less than the number of concurrent threads supported by the system. The default number of decompression threads can be set with SetNumDecompressionThreads().
format | Output format of the converted image. |
colorAlgorithm | Optional color processing algorithm for producing the converted image |
Implements IImage.
|
virtual |
Converts the current image buffer to the specified output pixel format and stores the result in the specified destination image.
The destination image buffer size must be sufficient to store the converted image data. Note that compressed images are decompressed before any further color processing or conversion during this call. Decompression is multi-threaded and defaults to utilizing one less than the number of concurrent threads supported by the system. The default number of decompression threads can be set with SetNumDecompressionThreads().
destinationImage | Destination image where the converted output result will be stored. |
format | Output format of the converted image. |
colorAlgorithm | Optional color processing algorithm for producing the converted image. |
Implements IImage.
|
protected |
|
static |
Create an image object.
Create an image object that is a deep copy of the input image.
image | The input image to copy |
|
static |
Create an image object with the specified parameters.
width | The image width in pixels |
height | The image height in pixels |
offsetX | The image X offset |
offsetY | The image Y offset |
pixelFormat | The image pixel format |
pData | The image data |
|
static |
Create an image object with the specified parameters.
This function is used to create an image from existing image data with a specific payload type, such as a compressed image.
Note that images with chunk payload types are saved with only the image data preserved. Remember to specify the non-chunk equivalent payload type when creating images with these chunk payload types. For example, images need to be created with PAYLOAD_TYPE_IMAGE payload type if the original image had PAYLOAD_TYPE_EXTENDED_CHUNK payload type.
width | The image width in pixels |
height | The image height in pixels |
offsetX | The image X offset |
offsetY | The image Y offset |
pixelFormat | The image pixel format |
pData | The compressed image data |
dataPayloadType | The payload type of the data. This value can be retrieved from an existing image by using the GetTLPayloadType() function call. |
dataSize | The size of the provided data in bytes |
|
protected |
|
virtual |
|
protected |
|
virtual |
|
virtual |
Gets the size of the buffer associated with the image in bytes.
For user created images, this function returns the size of the user provided data if the data size was provided. If the data size was not provided, the buffer size is calculated based on the image dimensions and pixel format.
Implements IImage.
|
virtual |
Returns a pointer to a chunk data interface.
No ownership is transfered, the chunk data interface reference is valid until Image::Release() is called on this image.
Implements IImage.
|
virtual |
Returns the id of the chunk data layout.
Implements IImage.
|
virtual |
|
virtual |
Gets a pointer to the data associated with the image.
This function is considered unsafe. The pointer returned could be invalidated if the buffer is released. The pointer may also be invalidated if the Image object is passed to Image::Release().
Implements IImage.
|
virtual |
Get the value for which no image data will exceed.
Implements IImage.
|
virtual |
Get the value for which no image data will be less than.
Implements IImage.
|
static |
Gets the default color processing algorithm.
|
virtual |
|
virtual |
|
virtual |
Gets a unique ID for this image.
Each image in a steam will have a unique ID to help identify it.
Implements IImage.
|
protectedvirtual |
Implements IImage.
|
virtual |
Returns the size of the image.
For chunk images, only the size of chunk image portion is reported here. The entire chunk data payload can be queried by GetValidPayloadSize(). For compressed images, this value may be different than the image size once decompressed.
Implements IImage.
|
virtual |
Returns data integrity status of the image returned from GetNextImage()
Implements IImage.
|
static |
Returns a string describing the meaning of the status enum.
|
virtual |
Gets the number of channels (depth) used in the image.
Returns 0 if the number of channels for the given pixel format is unknown.
Implements IImage.
|
static |
Gets the number of threads used for image decompression during Convert().
|
virtual |
Gets the payload type that was transmitted.
This is a device types specific value that identifies how the image was transmitted. This information is retrieved from the Transport Layer Image format headers. It is retrieved on a per image basis.
Implements IImage.
|
virtual |
Returns an enum value that represents the pixel format of this image.
The enum can be used with the easy access GenICam features available through the Camera.h header file. This easy access enum can also be used in the Convert() function.
Implements IImage.
|
virtual |
Returns an enum value that represents the integer type used in the pixel format of this image.
Implements IImage.
|
virtual |
Returns a string value that represents this image's pixel format.
The string is a valid SFNC name that maps to the underlying TL specific pixel format. This is the most generic way to identify the pixel format of the image.
Implements IImage.
|
virtual |
Gets a pointer to the user passed data associated with the image.
This function is considered unsafe. The pointer returned could be invalidated if the buffer is released. The pointer may also be invalidated if the Image object is passed to Image::Release().
TODO: no way to set private data for image yet.
Implements IImage.
|
virtual |
|
virtual |
Gets the time stamp for the image in nanoseconds.
Implements IImage.
|
virtual |
Gets the GenTL specific payload type that was transmitted.
This is a Transport Layer specific value that identifies how the image was transmitted. This information is retrieved from the Transport Layer Image format headers. It is retrieved on a per image basis.
Implements IImage.
|
virtual |
Gets the pixel format of the image.
This is a Transport Layer specific pixel format that identifies how the pixels in the image should be interpreted. To understand how to interpret this value it is necessary to know what the transport layer namespace is. This can be retrieved through a call to GetTLPixelFormatNamespace(). This information is retrieved from the Transport Layer Image format headers. It is retrieved on a per image basis.
Implements IImage.
|
virtual |
Returns an enum value that represents the namespace in which this image's TL specific pixel format resides.
This information is important to properly interpret the value returned by GetTLPixelFormat()
Implements IImage.
|
virtual |
Returns the size of valid data in the image payload.
This is the actual amount of data read from the device. A user created image has a payload size of zero. The value returned here can be equal to the value returned by GetImageSize() if image data is the only payload. Note that GetBufferSize() returns the total size of bytes allocated for the image and could be equal to or greater than the size returned by this function.
Implements IImage.
|
virtual |
Gets the width of the image in pixels.
This information is retrieved from the Transport Layer image format headers. It is retrieved on a per image basis.
Implements IImage.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Checks if the image contains ImageCRC checksum from chunk data.
Implements IImage.
|
virtual |
Returns a boolean value indicating whether this image is compressed.
Implements IImage.
|
virtual |
Returns a boolean value indicating if this image was incomplete.
An image is marked as incomplete if the transport layer received less data then it requested.
Implements IImage.
|
virtual |
Returns true if the image is still in use by the stream.
Implements IImage.
|
virtual |
Implements IImage.
|
virtual |
Sets new dimensions of the image object and allocates memory.
width | The width of image in pixels to set. |
height | The height of image in pixels to set. |
offsetX | The x offset in pixels to set. |
offsetY | The y offset in pixels to set. |
pixelFormat | Pixel format to set. |
Implements IImage.
|
virtual |
Sets new dimensions of the image object.
width | The width of image in pixels to set. |
height | The height of image in pixels to set. |
offsetX | The x offset in pixels to set. |
offsetY | The y offset in pixels to set. |
pixelFormat | Pixel format to set. |
pData | Pointer to the image buffer. |
Implements IImage.
|
virtual |
Sets new dimensions of the image object.
This function is used to create an image from existing image data with a specific payload type, such as a compressed image.
width | The width of image in pixels to set. |
height | The height of image in pixels to set. |
offsetX | The x offset in pixels to set. |
offsetY | The y offset in pixels to set. |
pixelFormat | Pixel format to set. |
pData | Pointer to the image buffer. |
dataPayloadType | The payload type of the data. This value can be retrieved from an existing image by using the GetTLPayloadType() function call. |
dataSize | The size of the provided data in bytes |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the file format specified.
Note that only the image data is saved regardless of the payload type used to transmit the image from camera to host. Saving a RAW image that was transmitted using the chunk image payload type will only contain the image data portion and none of the other chunks are preserved.
pFilename | Filename to save image with. |
format | File format to save in. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
virtual |
Saves the image to the specified file name with the options specified.
pFilename | Filename to save image with. |
pOption | Options to use while saving image. |
Implements IImage.
|
static |
Sets the default color processing algorithm.
This method will be used for any image with the DEFAULT algorithm set. The method used is determined at the time of the Convert() call, therefore the most recent execution of this function will take precedence. The default setting is shared within the current process.
colorAlgorithm | The color processing algorithm to set. |
|
static |
Sets the default number of threads used for image decompression during Convert().
The number of threads used is defaulted to be equal to one less than the number of concurrent threads supported by the system.
numThreads | Number of parallel image decompression threads set to run |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Contact Support | Spinnaker® SDK Programmer's Guide and API Reference | Thu Dec 16 2021 © FLIR Integrated Imaging Solutions Inc. All rights reserved. |