com.pixelmed.display
Class ConsumerFormatImageMaker

java.lang.Object
  extended by com.pixelmed.display.ConsumerFormatImageMaker

public class ConsumerFormatImageMaker
extends Object

A class of static methods to make consumer format images from DICOM objects.


Field Summary
static String ALL_ANNOTATIONS
           
 
Constructor Summary
ConsumerFormatImageMaker()
           
 
Method Summary
static void convertFileToEightBitImage(String dicomFileName, String outputFileName, String outputFormat, double windowCenter, double windowWidth, int imageWidth, int imageHeight, int imageQuality, String annotation, int debugLevel)
          Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.
static void convertFileToEightBitImage(String dicomFileName, String outputFileName, String outputFormat, int debugLevel)
          Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.
static void main(String[] arg)
          Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.
static BufferedImage makeEightBitImage(AttributeList list, int debugLevel)
          Create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_ANNOTATIONS

public static final String ALL_ANNOTATIONS
See Also:
Constant Field Values
Constructor Detail

ConsumerFormatImageMaker

public ConsumerFormatImageMaker()
Method Detail

makeEightBitImage

public static final BufferedImage makeEightBitImage(AttributeList list,
                                                    int debugLevel)
                                             throws DicomException

Create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.

Uses the window center and width in the attribute list.

Parameters:
list - the DICOM attributes
debugLevel -
Returns:
an 8 bit BufferedImage
Throws:
if - attribute is not an image
DicomException

convertFileToEightBitImage

public static void convertFileToEightBitImage(String dicomFileName,
                                              String outputFileName,
                                              String outputFormat,
                                              int debugLevel)
                                       throws DicomException,
                                              IOException

Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.

Uses the window center and width in the file.

Parameters:
dicomFileName - the input file name
outputFileName - the output file name
outputFormat - the output file format name that a JIIO SPI will recognize (e.g. "jpeg")
debugLevel -
Throws:
DicomException
IOException

convertFileToEightBitImage

public static void convertFileToEightBitImage(String dicomFileName,
                                              String outputFileName,
                                              String outputFormat,
                                              double windowCenter,
                                              double windowWidth,
                                              int imageWidth,
                                              int imageHeight,
                                              int imageQuality,
                                              String annotation,
                                              int debugLevel)
                                       throws DicomException,
                                              IOException

Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.

Parameters:
dicomFileName - the input file name
outputFileName - the output file name
outputFormat - the output file format name that a JIIO SPI will recognize (e.g. "jpeg")
windowCenter - the window center to use
windowWidth - the window width to use, or 0 if to use the width and center in the DICOM file
imageWidth - the width (number of columns) to make, or <= 0 if default (the width in the DICOM file, or scaled by height with pixel aspect ratio preserved)
imageHeight - the height (number of rows) to make, or <= 0 if default (the height in the DICOM file, or scaled by width with pixel aspect ratio preserved)
imageQuality - the image quality from 1 to 100 (best), or -1 if absent
annotation - the type of annotation to apply, or null if absent
debugLevel -
Throws:
DicomException
IOException

main

public static void main(String[] arg)

Read a DICOM image input file, and create a single frame 8-bit per channel image (windowed if grayscale) from the first, or only, frame.

Parameters:
arg - two required parameters, the input file name, output file name, optionally the format (defaults to jpeg), then optionally the window center and width, then optionally the desired width and height, then optionally the image quality from 0 to 100, then optionally whether or not to include annotation ("annotate" or other) then optionally the debug level