Package com.pixelmed.dicom
Class Overlay
- java.lang.Object
-
- com.pixelmed.dicom.Overlay
-
public class Overlay extends java.lang.ObjectA 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 Description Overlay(AttributeList list)Overlay(SingleOverlay[] arrayOfOverlays)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeListgetAttributeList()intgetColumnOrigin(int frame, int overlay)Get the column orgin of the overlay.intgetNumberOfOverlays(int frame)Get the number of overlays available for a particular frame.java.awt.image.BufferedImagegetOverlayAsBinaryBufferedImage(int frame, int overlay)Get a binary image constructed from the overlay bitmap.intgetRowOrigin(int frame, int overlay)Get the row orgin of the overlay.static voidmain(java.lang.String[] arg)Read the DICOM input file as a list of attributes and extract the information related to overlays.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Overlay
public Overlay(SingleOverlay[] arrayOfOverlays)
- Parameters:
arrayOfOverlays-
-
Overlay
public Overlay(AttributeList list)
- Parameters:
list-
-
-
Method Detail
-
getAttributeList
public AttributeList getAttributeList() throws DicomException
- Throws:
DicomException
-
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-specificoverlay- 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-specificoverlay- 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-specificoverlay- 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:
toStringin classjava.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)
-
-