com.pixelmed.dicom
Class Overlay

java.lang.Object
  extended by com.pixelmed.dicom.Overlay

public class Overlay
extends Object

A set of bitmap overlays constructed from a DICOM attribute list.

Note that multiple overlays may be present, they may be multi-frame, and they may be in the OverlayData element or the PixelData element.


Constructor Summary
Overlay(AttributeList list)
           
 
Method Summary
 int getColumnOrigin(int frame, int overlay)
          Get the column orgin of the overlay.
 int getNumberOfOverlays(int frame)
          Get the number of overlays available for a particular frame.
 BufferedImage getOverlayAsBinaryBufferedImage(int frame, int overlay)
          Get a binary image constructed from the overlay bitmap.
 int getRowOrigin(int frame, int overlay)
          Get the row orgin of the overlay.
static void main(String[] arg)
          Read the DICOM input file as a list of attributes and extract the information related to overlays.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Overlay

public Overlay(AttributeList list)
Parameters:
list -
Method Detail

getNumberOfOverlays

public int getNumberOfOverlays(int frame)
Get the number of overlays available for a particular frame.

Parameters:
frame - numbered from zero; needed to select which overlay if frame-specific
Returns:
the number of overlays available for the frame, 0 if none

getOverlayAsBinaryBufferedImage

public BufferedImage getOverlayAsBinaryBufferedImage(int frame,
                                                     int overlay)
Get a binary image constructed from the overlay bitmap.

Parameters:
frame - numbered from zero; needed to select which overlay if frame-specific
overlay - numbered from zero
Returns:
a java.awt.image.BufferedImage of type TYPE_BYTE_BINARY, or null if there is no such overlay for that frame

getRowOrigin

public int getRowOrigin(int frame,
                        int overlay)
Get the row orgin of the overlay.

Parameters:
frame - numbered from zero; needed to select which overlay if frame-specific
overlay - numbered from zero
Returns:
the origin, with zero being the top row of the image (not 1 as in the DICOM OverlayOrigin attribute), or zero if there is no such overlay

getColumnOrigin

public int getColumnOrigin(int frame,
                           int overlay)
Get the column orgin of the overlay.

Parameters:
frame - numbered from zero; needed to select which overlay if frame-specific
overlay - numbered from zero
Returns:
the origin, with zero being the left column of the image (not 1 as in the DICOM OverlayOrigin attribute), or zero if there is no such overlay

toString

public final String toString()
Overrides:
toString in class Object

main

public static void main(String[] arg)

Read the DICOM input file as a list of attributes and extract the information related to overlays.

Parameters:
arg - array of one string (the filename to read and dump)