pco Java ImageIO Software Development Kit User Manual

June 9, 2024
PCO

pco-logo

pco Java ImageIO Software Development Kit

ImageIO Software Development Kit

Product Information

The pco.java ImageIO package provides a Java ImageIO API reader to display the raw images recorded by PCO cameras and the images loaded from the proprietary B16 file format. It also provides the ability to retrieve PCO-specific metadata from standard TIFF files. The package depends on the TIFF package of TwelveMonkeys ImageIO.

General

The pco.java ImageIO package provides a Java ImageIO API reader to display the raw images recorded by PCO cameras and the images loaded from the proprietary B16 file format. Provides the ability to retrieve PCO-specific metadata also from the standard TIFF files. Depends on the TIFF package of TwelveMonkeys ImageIO.

Installation

The project is built using Apache Maven. Maven artifacts are available on the Maven Central Repository. Binaries and sources are also available directly from www.pco.de.

The project is built using Apache Maven.

Group-ID: de.pco

Artifact-ID (Maven modules):

  • pco – Parent pom.xml
    pco-common – Common sources for pco-camera and pco-imageio

  • pco-camera – Java interface to control the PCO cameras

  • pco-imageio – Java ImageIO plugin for the PCO cameras and B16 files

  • pco-example – Example application

All jars are compiled and tested for at least Java 8. If only ImageIO plugin is necessary, add to your pom.xml

pco-Java-ImageIO-Software-Development-Kit-fig- \(1\)

Maven Artifacts

Basic Usage

The pco-imageio artifact offers a method to get the BufferedImage from the data recorded using the pco-camera module:

ImageData imageData = ... // see pco-camera manual 
RawImageReader reader = new RawImageReader(); 
RawImageInputStream riis = new RawImageInputStream(imageData); 
reader.setInput(riis); 
BufferedImage image = reader.read(0);

The pco-imageio artifact contains the ImageIO plugin for B16 files as well. After including pco-common-2.0.0.jar and pco-imageio-2.0.0.jar on the classpath, the standard method of loading image files will also be available for B16:

File file = new File(image.b16); 
BufferedImage image = ImageIO.read(file);
Advanced Usage

To retrieve the PCO metadata from the B16 files:

B16ImageReader reader = new B16ImageReader(); 
ImageInputStream iis = ImageIO.createImageInputStream(file); 
reader.setInput(iis); 
BufferedImage image = reader.read(0); 
PcoIIOMetadata metadata = (PcoIIOMetadata)reader.getImageMetadata(0);

To retrieve the PCO metadata from the TIFF files:

TIFFImageReader reader = new TIFFImageReader(); 
... 
TIFFImageMetadata tim = (TIFFImageMetadata)reader.getImageMetadata(0); 
B16ImageWriter writer = new B16ImageWriter(); 
ImageTypeSpecifier imageType = null; 
PcoIIOMetadata metadata = null; 
imageType = reader.getImageTypes(0).next(); 
metadata = (PcoIIOMetadata)writer.convertImageMetadata(tim, ...

Note: Please refer to the user manual for detailed information on installation and usage.

Example

The PCO-example artifact contains an example GUI application. Its purpose is to get the images from the camera, to display them (including the additional metadata from the camera) and to save a particular image into B16 file. It also enables the user to load and display B16 and TIFF files, edit the metadata and save the file again. Run the example application (by installed Java) with the mere double-click on pco-example/pco -example-2.0.0-jar-with- dependencies.jaror from the console usingpco-Java-ImageIO-Software-
Development-Kit-fig- \(6\)

Alternatively, get the maven pco-example artifact by adding to your pom.xml pco-Java-ImageIO-Software-Development-Kit-fig- \(7\)

The application depends both on PCO-camera and on pco-imageio artifacts. Source codes of the application are in the package de.pco.example, the main class is GuiExample. Then you can start the example application from your main method by callingpco-Java-ImageIO-Software-Development-Kit-fig-
\(8\)

User manual
To open the camera connection click on the CS (Camera scanner) button. Select the number of images to be recorded and click on the Record button. Then you will be able to switch between the recorded images by the left and right arrow buttons.

On the right-hand side you see a column with the metadata obtained from the camera in addition with the image. You can change the metadata accordingly, e. g. put a commentary in the TEXT field.
Save the image and the corresponding metadata into B16 file by the menu option File→Save. You can load B16 files and also the 8-bit and 16-bit TIFF files by File→Open. If these files were created using PCO SW, they also contain the camera metadata and the current example application will display it also.

Contact Information

PCO Europe
+49 9441 2005 50
[email protected]
pco.de

PCO America
+1 866 678 4566
[email protected]
pco-tech.com

PCO Asia
+65 6549 7054
[email protected]
PCO-imaging.com

PCO china
+86 512 67634643
[email protected]
pco.cn.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

PCO User Manuals

Related Manuals