Trispark JDT
2.50.13

com.archimed.dicom.image
Class ImageIO

java.lang.Object
  extended by com.archimed.dicom.image.ImageIO

public class ImageIO
extends java.lang.Object

This is a class providing methods to convert image data stored in a DicomImage to an ImageProducer and back.
Supported DICOM Images:

Photometric Interpretation Pixel Depth ColorModel used
MONOCHROME? 8 IndexColorModel
MONOCHROME? >8 GrayColorModel
PALETTE COLOR 8 IndexColorModel
RGB 8 DirectColorModel

Since:
18/02/1999

Field Summary
protected  JdtLogger log
           
 
Constructor Summary
ImageIO(DicomImage d)
          Constructs a new ImageIO object for in- / output of ImageProducers.
 
Method Summary
 java.awt.image.ImageProducer getImageProducer()
          Constructs an ImageProducer based on the pixels of the first (or only) frame.
 java.awt.image.ImageProducer getImageProducer(int i)
          This method constructs an ImageProducer based on the pixels of frame with index i.
 java.util.Vector getImageProducers()
          Builds an ImageProducer for all the frames in the image and returns them in a Vector.
 DicomImage getSource()
          returns the specified DICOMObject.
 void setImageProducer(java.awt.image.ImageProducer ip)
          Reads an ImageProducer and converts the image data into the single-frame DicomImage.
 int size()
          returns the number of frames in the specified DICOMObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected JdtLogger log
Constructor Detail

ImageIO

public ImageIO(DicomImage d)
        throws DicomException
Constructs a new ImageIO object for in- / output of ImageProducers.
Note: the DicomImage is stored referentially, not copied. Any changes are made directly to the DicomImage.

Parameters:
d - - the source/target for Image IO
Throws:
DicomException
Method Detail

getImageProducer

public java.awt.image.ImageProducer getImageProducer()
                                              throws DicomException
Constructs an ImageProducer based on the pixels of the first (or only) frame.

Throws:
DicomException
See Also:
getImageProducer

getImageProducer

public java.awt.image.ImageProducer getImageProducer(int i)
                                              throws DicomException
This method constructs an ImageProducer based on the pixels of frame with index i. The index of the frames starts with 0. Construction of an ImageProducer out of a RGB image or a MONOCHROME image with depth > 8 bits can be rather slow because it requires a reorganisation of the pixel data. If the image data is compressed, it is decoded using the com.archimed.dicom.codec package.

Returns:
an ImageProducer that essentialy is an MemoryImageSource with a different ColorModel depending on the image type (specified above).
Throws:
DicomException - is thrown when something is wrong with the image data, when the index is out of bounds or when the image type is not supported.

getImageProducers

public java.util.Vector getImageProducers()
                                   throws DicomException
Builds an ImageProducer for all the frames in the image and returns them in a Vector.

Returns:
all the available ImageProducers stored in a Vector
Throws:
DicomException
See Also:
getImageProducer

setImageProducer

public void setImageProducer(java.awt.image.ImageProducer ip)
Reads an ImageProducer and converts the image data into the single-frame DicomImage. The method is synchronized because it has to wait for all of the imagedata to be delivered by the ImageProducer.

Parameters:
ip - the ImageProducer containing the imagedata to be stored

size

public int size()
returns the number of frames in the specified DICOMObject.


getSource

public DicomImage getSource()
returns the specified DICOMObject.


Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.