|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dcm4che2.image.OverlayUtils
public class OverlayUtils
Provides utility methods to extract overlay information from DICOM files.
Constructor Summary | |
---|---|
OverlayUtils()
|
Method Summary | |
---|---|
static int |
extractFrameNumber(int imageIndex)
Extra the frame number portion of the overlay number/imageIndex value. |
static java.awt.image.BufferedImage |
extractOverlay(DicomObject ds,
int overlayNumber,
javax.imageio.ImageReader reader,
java.lang.String rgbs)
Read an overlay image or region instead of a regular image. |
static int |
getOverlayHeight(DicomObject ds,
int overlayNumber)
Reads the height of the overlay - needs to be done separately from the primary width even though they are supposed to be identical, as a stand alone overlay won't have any width/height except in the overlay tags. |
static int |
getOverlayWidth(DicomObject ds,
int overlayNumber)
Reads the width of the overlay - needs to be done separately from the primary width even though they are supposed to be identical, as a stand alone overlay won't have any width/height except in the overlay tags. |
static boolean |
isOverlay(int imageIndex)
Returns true if the given frame number references an overlay - that is, is the form 0x60xx yyyy where xx is the overlay number, and yyyy is the overlay frame number. |
protected static byte[] |
padToFixRowByteBoundary(byte[] unpaddedData,
int rows,
int cols)
This method is used for soon-to-be-rasterized bit arrays that are contained within byte arrays (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OverlayUtils()
Method Detail |
---|
public static boolean isOverlay(int imageIndex)
imageIndex
-
public static int extractFrameNumber(int imageIndex)
imageIndex
-
public static java.awt.image.BufferedImage extractOverlay(DicomObject ds, int overlayNumber, javax.imageio.ImageReader reader, java.lang.String rgbs) throws java.io.IOException
ds
- is a DicomObject to read the overlay from.overlayNumber
- - of the form 0x60xx yyyy where xx is the overlay index and
yyyy is the frame indexreader
- is the image reader used to extract the raster for the high
bitsrgb
- is the colour to apply, can be null to use black & white
overlays.
java.io.IOException
- only if an image from the image reader is attempted and
throws an exception.protected static byte[] padToFixRowByteBoundary(byte[] unpaddedData, int rows, int cols)
unpaddedData
- The byte array containing the bit array to be padded as necessaryrows
- The height of the image in pixelscols
- The width of the image in pixels
public static int getOverlayWidth(DicomObject ds, int overlayNumber)
overlayNumber
-
java.io.IOException
public static int getOverlayHeight(DicomObject ds, int overlayNumber)
overlayNumber
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |