Provides basic functionality for pylon image classes. More...
#include <pylon/PylonImageBase.h>
Public Member Functions | |
virtual void | Save (EImageFileFormat imageFileFormat, const String_t &filename, CImagePersistenceOptions *pOptions=NULL) const |
Saves the image to disk. More... | |
virtual void | Load (const String_t &filename) |
Loads an image from a disk. More... | |
virtual bool | CanSaveWithoutConversion (EImageFileFormat imageFileFormat) const |
Can be used to check whether the image can be saved without prior conversion. More... | |
virtual SPixelData | GetPixelData (uint32_t posX, uint32_t posY) const |
Retrieves the data of a pixel. More... | |
virtual bool | IsSupportedPixelType (EPixelType pixelType) const =0 |
Can be used to check whether the pixel type is supported. More... | |
virtual bool | IsAdditionalPaddingSupported () const =0 |
Can be used to check whether the value of PaddingX can be defined by the user. More... | |
virtual void | Reset (EPixelType pixelType, uint32_t width, uint32_t height, EImageOrientation orientation=ImageOrientation_TopDown)=0 |
Resets the image properties and provides a buffer to hold the image. More... | |
virtual void | Reset (EPixelType pixelType, uint32_t width, uint32_t height, size_t paddingX, EImageOrientation orientation=ImageOrientation_TopDown)=0 |
Resets the image properties including user defined PaddingX and provides a buffer to hold the image. More... | |
virtual void | Release ()=0 |
Releases the image buffer and resets to an invalid image. More... | |
virtual bool | IsValid () const =0 |
Can be used to check whether an image is valid. More... | |
virtual EPixelType | GetPixelType () const =0 |
Get the current pixel type. More... | |
virtual uint32_t | GetWidth () const =0 |
Get the current number of columns in pixels. More... | |
virtual uint32_t | GetHeight () const =0 |
Get the current number of rows. More... | |
virtual size_t | GetPaddingX () const =0 |
Get the number of extra data bytes at the end of each row. More... | |
virtual EImageOrientation | GetOrientation () const =0 |
Get the vertical orientation of the image in memory. More... | |
virtual void * | GetBuffer ()=0 |
Get the pointer to the buffer. More... | |
virtual const void * | GetBuffer () const =0 |
Get the pointer to the buffer containing the image. More... | |
virtual size_t | GetImageSize () const =0 |
Get the size of the image in bytes. More... | |
virtual bool | IsUnique () const =0 |
Indicates that the referenced buffer is only referenced by this image. More... | |
virtual bool | GetStride (size_t &strideBytes) const =0 |
Get the stride in bytes. More... | |
Provides basic functionality for pylon image classes.
|
virtual |
Can be used to check whether the image can be saved without prior conversion.
This is a convenience method that calls CImagePersistence::CanSaveWithoutConversion().
[in] | imageFileFormat | Target file format for the image to be saved. |
|
pure virtualinherited |
Get the pointer to the buffer.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the pointer to the buffer containing the image.
The buffer is at least as large as the value returned by GetImageSize().
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the current number of rows.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the size of the image in bytes.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the vertical orientation of the image in memory.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the number of extra data bytes at the end of each row.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
virtual |
Retrieves the data of a pixel.
[in] | posX | Horizontal position of the pixel. The first column has position 0. |
[in] | posY | Vertical position of the pixel. The first row has position 0. |
posX
and posY
must be located inside the image area. Supported pixel types:
|
pure virtualinherited |
Get the current pixel type.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the stride in bytes.
The stride in bytes can not be computed for packed image format when the stride is not byte aligned. See also Pylon::IsPacked(). The stride in bytes can not be computed if the image is invalid.
[out] | strideBytes | The stride in byte if it can be computed. |
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Get the current number of columns in pixels.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Can be used to check whether the value of PaddingX can be defined by the user.
Implemented in Pylon::CPylonImage.
|
pure virtualinherited |
Can be used to check whether the pixel type is supported.
Implemented in Pylon::CPylonImage.
|
pure virtualinherited |
Indicates that the referenced buffer is only referenced by this image.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
pure virtualinherited |
Can be used to check whether an image is valid.
Implemented in Pylon::CPylonImage, and Pylon::CGrabResultImageT< GrabResultT >.
|
virtual |
Loads an image from a disk.
This is a convenience method that calls CImagePersistence::Load()
[in] | filename | Name and path of the image. |
|
pure virtualinherited |
Releases the image buffer and resets to an invalid image.
Implemented in Pylon::CPylonImage.
|
pure virtualinherited |
Resets the image properties and provides a buffer to hold the image.
[in] | pixelType | The pixel type of the new image. |
[in] | width | The number of pixels in a row in the new image. |
[in] | height | The number of rows in the new image. |
[in] | orientation | The vertical orientation of the image in the image buffer. |
width
value must be >= 0 and < _I32_MAX. height
value must be >= 0 and < _I32_MAX. Implemented in Pylon::CPylonImage.
|
pure virtualinherited |
Resets the image properties including user defined PaddingX and provides a buffer to hold the image.
Extends the Reset(EPixelType, uint32_t, uint32_t) method with user provided padding.
[in] | pixelType | The pixel type of the new image. |
[in] | width | The number of pixels in a row in the new image. |
[in] | height | The number of rows in the new image. |
[in] | paddingX | The number of extra data bytes at the end of each row. |
[in] | orientation | The vertical orientation of the image in the image buffer. |
Implemented in Pylon::CPylonImage.
|
virtual |
Saves the image to disk.
Converts the image to a format that can be saved if required.
This is a convenience method that calls CImagePersistence::Save().
If required, the image is automatically converted into a new image and saved afterwards. See CImagePersistence::CanSaveWithoutConversion() for more information. An image with a bit depth higher than 8 bit is stored with 16 bit bit depth, if supported by the image file format. In this case the pixel data is MSB aligned.
If more control over the conversion is required, the CImageFormatConverter class can be used to convert the input image before saving it.
[in] | imageFileFormat | File format to save the image in. |
[in] | filename | Name and path of the image. |
[in] | pOptions | Additional options. |