com.inscoper.api.Image¶
Image class represents an image with associated metadata. More...
Public Functions¶
| Name | |
|---|---|
| synchronized void | delete() |
| Image(UCharVector imageData, MetadataMap metadata) Constructor. |
|
| long | getPixelSize() Get the pixel size. |
| long | getBitDepth() Get the image bit depth. |
| long | getWidth() Get the image width. |
| long | getHeight() Get the image height. |
| EPixelType | getPixelType() Get the pixel type. |
| Object | getImageData() Get the image data. |
| boolean | hasMetadata(String name) Check if a metadata exists. |
| void | addMetadata(String name, Metadata value) Add or update a metadata. |
| void | removeMetadata(String name) Remove a metadata. |
| MetadataMap | getMetadata() Get all metadata. |
| Metadata | getMetadata(String key) Get a metadata. |
| void | setMetadata(MetadataMap metadata) Set all metadata. |
Protected Functions¶
| Name | |
|---|---|
| Image(long cPtr, boolean cMemoryOwn) | |
| void | swigSetCMemOwn(boolean own) |
| void | finalize() |
| long | getCPtr(Image obj) |
Detailed Description¶
Image class represents an image with associated metadata.
This class encapsulates raw image data associated with metadata, providing methods to access pixel properties, dimensions, and metadata.
Public Functions Documentation¶
function delete¶
function Image¶
Constructor.
Parameters:
- imageData : The raw bytes of the image
- metadata : A map pairing metadata keys with values
Initializes a new instance of the Image class with raw data and metadata.
function getPixelSize¶
Get the pixel size.
Return: The pixel size in bytes
Retrieves the size of a single pixel in bytes.
function getBitDepth¶
Get the image bit depth.
Return: The bit depth of the image
Retrieves the bit depth of the image (e.g., 8, 16 bits).
function getWidth¶
Get the image width.
Return: The width of the image in pixels
Retrieves the width of the image in pixels.
function getHeight¶
Get the image height.
Return: The height of the image in pixels
Retrieves the height of the image in pixels.
function getPixelType¶
Get the pixel type.
Return: The pixel type
Retrieves the format of the pixels (bit depth and gray/rgb).
function getImageData¶
Get the image data.
Return: The image data
Retrieves the raw image data.
function hasMetadata¶
Check if a metadata exists.
Parameters:
- name : The name of the metadata to check
Return: True if the metadata exists, false otherwise
Determines if a specific metadata exists in the image.
function addMetadata¶
Add or update a metadata.
Parameters:
- name : The name of the metadata
- value : The metadata value to store
Inserts a new metadata or updates an existing one.
function removeMetadata¶
Remove a metadata.
Parameters:
- name : The name of the metadata to remove
Exceptions:
- InscoperException If an error occurs
Deletes a metadata.
function getMetadata¶
Get all metadata.
Return: The map pairing metadata keys with values
Retrieves all metadata associated with the image.
function getMetadata¶
Get a metadata.
Parameters:
- key : The name of the metadata
Exceptions:
- InscoperException If the key is not found or an error occurs
Return: The metadata value
Retrieves a metadata.
function setMetadata¶
Set all metadata.
Parameters:
- metadata : The new map pairing metadata keys with values
Replaces all current metadata.
Protected Functions Documentation¶
function Image¶
function swigSetCMemOwn¶
function finalize¶
function getCPtr¶
Updated on 2026-04-02 at 10:55:37 +0200