The image object class. More...
#include <Image.h>
Public Member Functions | |
virtual | ~Image () |
Virtual destructor. | |
ColorProcessingAlgorithm | GetColorProcessing () const |
Gets the color algorithm used to produce the image. | |
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. | |
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. | |
void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData, TLPayloadType dataPayloadType, size_t dataSize) |
Sets new dimensions of the image object. | |
void | Release () |
uint64_t | GetID () const |
Gets a unique ID for this image that is associated with a stream. | |
uint64_t | GetStreamIndex () const |
Gets the stream channel index of where the image is received. | |
void * | GetData () const |
Gets a pointer to the data associated with the image. | |
float | GetDataAbsoluteMax () const |
Get the value for which no image data will exceed. | |
float | GetDataAbsoluteMin () const |
Get the value for which no image data will be less than. | |
void * | GetPrivateData () const |
Gets a pointer to the user passed data associated with the image. | |
size_t | GetBufferSize () const |
Gets the size of the buffer associated with the image in bytes. | |
void | DeepCopy (const ImagePtr pSrcImage) |
Performs a deep copy of the Image. | |
size_t | GetWidth () const |
Gets the width of the image in pixels. | |
size_t | GetHeight () const |
Gets the height of the image in pixels. | |
size_t | GetStride () const |
Gets the stride of the image in bytes. | |
size_t | GetBitsPerPixel () const |
Gets the number of bits used per pixel in the image. | |
size_t | GetNumChannels () const |
Gets the number of channels (depth) used in the image. | |
size_t | GetXOffset () const |
Gets the ROI x offset in pixels for this image. | |
size_t | GetYOffset () const |
Gets the ROI y offset in pixels for this image. | |
size_t | GetXPadding () const |
Gets the x padding in bytes for this image. | |
size_t | GetYPadding () const |
Gets the y padding in bytes for this image. | |
uint64_t | GetFrameID () const |
Gets the frame ID for this image. | |
size_t | GetPayloadType () const |
Gets the payload type that was transmitted. | |
TLPayloadType | GetTLPayloadType () const |
Gets the GenTL specific payload type that was transmitted. | |
uint64_t | GetTLPixelFormat () const |
Gets the pixel format of the image. | |
TLPixelFormatNamespace | GetTLPixelFormatNamespace () const |
Returns an enum value that represents the namespace in which this image's TL specific pixel format resides. | |
GenICam::gcstring | GetPixelFormatName () const |
Returns a string value that represents this image's pixel format. | |
Spinnaker::PixelFormatEnums | GetPixelFormat () const |
Returns an enum value that represents the pixel format of this image. | |
Spinnaker::PixelFormatIntType | GetPixelFormatIntType () const |
Returns an enum value that represents the integer type used in the pixel format of this image. | |
bool | IsIncomplete () const |
Returns a boolean value indicating if this image was incomplete. | |
size_t | GetValidPayloadSize () const |
Returns the size of valid data in the image payload. | |
uint64_t | GetChunkLayoutId () const |
Returns the id of the chunk data layout. | |
uint64_t | GetTimeStamp () const |
Gets the time stamp for the image in nanoseconds. | |
void | Save (const char *pFilename, ImageFileFormat format=SPINNAKER_IMAGE_FILE_FORMAT_FROM_FILE_EXT) const |
Saves the image to the specified file name with the file format specified. | |
void | Save (const char *pFilename, PNGOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, PPMOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, PGMOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, TIFFOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, JPEGOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, JPG2Option &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, BMPOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
void | Save (const char *pFilename, SIOption &pOption) const |
Saves the image to the specified file name with the options specified. | |
bool | HasChunkData () const |
Checks if the image contains chunk data. | |
const ChunkData & | GetChunkData () const |
Returns a pointer to a chunk data interface. | |
void | CalculateStatistics (ImageStatistics &pStatistics) |
Retrieves a number of pixel statistics for an image including a histogram array of the range of pixel values. | |
bool | HasCRC () const |
Checks if the image contains ImageCRC checksum from chunk data. | |
bool | CheckCRC () const |
Checks if the computed checksum matches with chunk data's ImageCRC. | |
size_t | GetImageSize () const |
Returns the size of the image. | |
bool | IsInUse () |
Returns true if the image is still in use by the stream. | |
ImageStatus | GetImageStatus () const |
Returns data integrity status of the image returned from GetNextImage() | |
bool | IsCompressed () const |
Returns a boolean value indicating whether this image is compressed. | |
Public Member Functions inherited from IImage | |
virtual | ~IImage () |
virtual ColorProcessingAlgorithm | GetColorProcessing () const =0 |
virtual void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat)=0 |
virtual void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData)=0 |
virtual void | ResetImage (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData, TLPayloadType dataPayloadType, size_t dataSize)=0 |
virtual void | Release ()=0 |
virtual uint64_t | GetID () const =0 |
virtual uint64_t | GetStreamIndex () const =0 |
virtual void * | GetData () const =0 |
virtual void * | GetPrivateData () const =0 |
virtual float | GetDataAbsoluteMax () const =0 |
virtual float | GetDataAbsoluteMin () const =0 |
virtual size_t | GetBufferSize () const =0 |
virtual void | DeepCopy (const ImagePtr pSrcImage)=0 |
virtual size_t | GetWidth () const =0 |
virtual size_t | GetHeight () const =0 |
virtual size_t | GetStride () const =0 |
virtual size_t | GetBitsPerPixel () const =0 |
virtual size_t | GetNumChannels () const =0 |
virtual size_t | GetXOffset () const =0 |
virtual size_t | GetYOffset () const =0 |
virtual size_t | GetXPadding () const =0 |
virtual size_t | GetYPadding () const =0 |
virtual uint64_t | GetFrameID () const =0 |
virtual size_t | GetPayloadType () const =0 |
virtual TLPayloadType | GetTLPayloadType () const =0 |
virtual uint64_t | GetTLPixelFormat () const =0 |
virtual TLPixelFormatNamespace | GetTLPixelFormatNamespace () const =0 |
virtual GenICam::gcstring | GetPixelFormatName () const =0 |
virtual PixelFormatEnums | GetPixelFormat () const =0 |
virtual PixelFormatIntType | GetPixelFormatIntType () const =0 |
virtual bool | IsIncomplete () const =0 |
virtual size_t | GetValidPayloadSize () const =0 |
virtual uint64_t | GetChunkLayoutId () const =0 |
virtual uint64_t | GetTimeStamp () const =0 |
virtual void | Save (const char *pFilename, ImageFileFormat format=SPINNAKER_IMAGE_FILE_FORMAT_FROM_FILE_EXT) const =0 |
virtual void | Save (const char *pFilename, PNGOption &pOption) const =0 |
virtual void | Save (const char *pFilename, PPMOption &pOption) const =0 |
virtual void | Save (const char *pFilename, PGMOption &pOption) const =0 |
virtual void | Save (const char *pFilename, TIFFOption &pOption) const =0 |
virtual void | Save (const char *pFilename, JPEGOption &pOption) const =0 |
virtual void | Save (const char *pFilename, JPG2Option &pOption) const =0 |
virtual void | Save (const char *pFilename, BMPOption &pOption) const =0 |
virtual void | Save (const char *pFilename, SIOption &option) const =0 |
virtual const ChunkData & | GetChunkData () const =0 |
virtual void | CalculateStatistics (ImageStatistics &pStatistics)=0 |
virtual bool | HasCRC () const =0 |
virtual bool | HasChunkData () const =0 |
virtual bool | CheckCRC () const =0 |
virtual size_t | GetImageSize () const =0 |
virtual bool | IsInUse ()=0 |
virtual ImageStatus | GetImageStatus () const =0 |
virtual bool | IsCompressed () const =0 |
Static Public Member Functions | |
static ImagePtr | Create () |
Create an image object. | |
static ImagePtr | Create (const ImagePtr image) |
Create an image object that is a deep copy of the input image. | |
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. | |
static ImagePtr | Create (size_t width, size_t height, size_t offsetX, size_t offsetY, PixelFormatEnums pixelFormat, void *pData, TLPayloadType dataPayloadType, size_t dataSize) |
Create an image object with the specified parameters. | |
static ImagePtr | Load (const char *pFilename, ImageFileFormat format=SPINNAKER_IMAGE_FILE_FORMAT_FROM_FILE_EXT) |
Loads the image from the specified file name with the options specified. | |
static const char * | GetImageStatusDescription (ImageStatus status) |
Returns a string describing the meaning of the status enum. | |
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, PixelFormatEnums pixelFormat, void *pData, TLPayloadType payloadType, size_t payloadSize) | |
ImagePtr | CreateShared () const |
void | DeepCopy (const Image &pSrcImage) |
Protected Member Functions inherited from IImage | |
IImage () | |
virtual ImageData * | GetImageData () const =0 |
Friends | |
class | IDataStream |
class | Stream |
class | ImageConverter |
class | ImageConverterIpp |
class | ImageImpl |
class | ImageListImpl |
class | ImageFiler |
class | ImageProcessorImpl |
class | ImageStatsCalculator |
class | ImageUtilityImpl |
class | ImageUtilityPolarizationImpl |
class | ImageUtilityPlanarImpl |
class | SpinnakerGPUImpl |
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.
|
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.
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 |
|
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 |
|
protected |
|
protected |
|
virtual |
|
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 |
Gets the color algorithm used to produce the image.
Implements IImage.
|
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.
|
virtual |
|
virtual |
|
virtual |
Gets a unique ID for this image that is associated with a stream.
Note that an ID of 0 indicates that the image is no longer associated with a stream or is a copy of the original image.
Implements IImage.
|
protectedvirtual |
Implements IImage.
|
virtual |
Returns the size of the image.
If the image is compressed, the value returned represents the size of the compressed image data in bytes. For chunk enabled data transmissions, only the size of the image chunk is reported here. If the image chunk is compressed, the value returned represents the size of the compressed image data in bytes. The entire chunk data payload including the image chunk and other optional data chunks can be queried by GetValidPayloadSize().
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.
|
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 ImageProcessor::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 |
Gets the stream channel index of where the image is received.
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. For non-chunk images, the value returned here is equal to the value returned by GetImageSize(). For chunk enabled data transmissions, the sum of the image chunk, other optional data chunks (e.g. ExposureTime) and their associated chunk headers is returned here. 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 chunk data.
Implements IImage.
|
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.
|
static |
Loads the image from the specified file name with the options specified.
pFilename | Filename to load image with. |
format | File format to save in. |
|
virtual |
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 |
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 |
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 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.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |