As a plugin
DeCaMino is composed of a jar file and a native library file. When these files are copied to the class path and library path of an Image I/O aware application, the DICOM file format is immediately available for reading and writing.
When reading, for instance with
BufferedImage image = ImageIO.read(new File("image.dcm"));the plugin returns an image with all DICOM gray-scale transforms applied, so that the image is immedialetly suitable for rendering on a display. Reading of series of images is also supported by Image I/O with the
When writing an image or a series of images that was not encoded as a DICOM object in the first place, such as in:
BufferedImage image = ImageIO.read(new File("image.png")); ImageIO.write(image, "dicom", new File("image.dcm"));a conform DICOM object is created using one of the Multiframe Secondary Capture SOP class. This means that up to 16-bit grayscale images and 8-bit color images may be written. By default, the pixel data is written uncompressed, but the compression scheme (DICOM transfer syntax) and level can be chosen using generic Image I/O parameters.