com.pixelmed.dicom

## Class Overlay

- java.lang.Object
- - com.pixelmed.dicom.Overlay

    public class Overlay
    extends java.lang.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

Constructors
Constructor and Description
`Overlay(AttributeList list)`

### Method Summary

Methods
`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.
`java.awt.image.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(java.lang.String[] arg)` Read the DICOM input file as a list of attributes and extract the information related to overlays.
`java.lang.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 java.awt.image.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 java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### main

    public static void main(java.lang.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)