public class EncapsulateImageInDicom
extends java.lang.Object
A class for encapsulating compressed grayscale or RGB consumer image format input files (that JIIO can recognize) into DICOM images of a specified SOP Class, or single or multi frame DICOM Secondary Capture images.
Constructor and Description |
---|
EncapsulateImageInDicom(java.lang.String inputFile,
java.lang.String outputFile,
java.lang.String patientName,
java.lang.String patientID,
java.lang.String studyID,
java.lang.String seriesNumber,
java.lang.String instanceNumber,
java.lang.String modality,
java.lang.String sopClass,
AttributeList sourceList)
Read a consumer image format input file (anything JIIO can recognize), and create a DICOM image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
|
Modifier and Type | Method and Description |
---|---|
static AttributeList |
generateDICOMPixelModuleFromConsumerImageFile(java.io.File inputFile,
AttributeList list)
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
|
static AttributeList |
generateDICOMPixelModuleFromConsumerImageFile(java.lang.String inputFile)
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
|
static AttributeList |
generateDICOMPixelModuleFromConsumerImageFile(java.lang.String inputFile,
AttributeList list)
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
|
protected static short |
getBitsPerSample(org.w3c.dom.Node metadata) |
static short |
getColumns(org.w3c.dom.Node metadata) |
protected static java.lang.String |
getCompressionType(org.w3c.dom.Node metadata) |
protected static short |
getElementAttributeFromMetadata(org.w3c.dom.Node metadata,
java.lang.String elementName,
java.lang.String attributeName) |
protected static short |
getJPEGProcess(org.w3c.dom.Node metadata) |
protected static java.lang.String |
getPhotometricInterpretation(org.w3c.dom.Node metadata) |
static short |
getRows(org.w3c.dom.Node metadata) |
protected static short |
getSamplePrecision(org.w3c.dom.Node metadata) |
protected static short |
getSamplesPerPixel(org.w3c.dom.Node metadata) |
protected static java.lang.String |
getTransferSyntaxUIDFromJPEGProcess(short process) |
static void |
main(java.lang.String[] arg)
Read a compressed grayscale or RGB consumer image format input file (that JIIO can recognize), and encapsulate it in an image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
|
public EncapsulateImageInDicom(java.lang.String inputFile, java.lang.String outputFile, java.lang.String patientName, java.lang.String patientID, java.lang.String studyID, java.lang.String seriesNumber, java.lang.String instanceNumber, java.lang.String modality, java.lang.String sopClass, AttributeList sourceList) throws java.io.IOException, DicomException
Read a consumer image format input file (anything JIIO can recognize), and create a DICOM image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
inputFile
- consumer image format input fileoutputFile
- DICOM output imagepatientName
- patient namepatientID
- patient IDstudyID
- study IDseriesNumber
- series numberinstanceNumber
- instance numbermodality
- may be nullsopClass
- may be nullsourceList
- list of attributes to use rather than supplied or generated values, may be null or emptyjava.io.IOException
- if an I/O error occursDicomException
- if error in DICOM encodingpublic static AttributeList generateDICOMPixelModuleFromConsumerImageFile(java.io.File inputFile, AttributeList list) throws java.io.IOException, DicomException
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
inputFile
- a compressed consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000)list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already include "better" image pixel module attributes to usejava.io.IOException
- if an I/O error occursDicomException
- if error in DICOM encodingpublic static AttributeList generateDICOMPixelModuleFromConsumerImageFile(java.lang.String inputFile) throws java.io.IOException, DicomException
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
inputFile
- a consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000, GIF, etc.)java.io.IOException
- if an I/O error occursDicomException
- if error in DICOM encodingpublic static AttributeList generateDICOMPixelModuleFromConsumerImageFile(java.lang.String inputFile, AttributeList list) throws java.io.IOException, DicomException
Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
inputFile
- a compressed consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000)list
- an existing (possibly empty) attribute list, if null, a new one will be created; may already include "better" image pixel module attributes to usejava.io.IOException
- if an I/O error occursDicomException
- if error in DICOM encodingprotected static short getBitsPerSample(org.w3c.dom.Node metadata)
public static short getColumns(org.w3c.dom.Node metadata)
protected static java.lang.String getCompressionType(org.w3c.dom.Node metadata)
protected static short getElementAttributeFromMetadata(org.w3c.dom.Node metadata, java.lang.String elementName, java.lang.String attributeName)
protected static short getJPEGProcess(org.w3c.dom.Node metadata)
protected static java.lang.String getPhotometricInterpretation(org.w3c.dom.Node metadata)
public static short getRows(org.w3c.dom.Node metadata)
protected static short getSamplePrecision(org.w3c.dom.Node metadata)
protected static short getSamplesPerPixel(org.w3c.dom.Node metadata)
protected static java.lang.String getTransferSyntaxUIDFromJPEGProcess(short process)
public static void main(java.lang.String[] arg)
Read a compressed grayscale or RGB consumer image format input file (that JIIO can recognize), and encapsulate it in an image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
arg
- seven, eight or nine parameters, the inputFile, outputFile, patientName, patientID, studyID, seriesNumber, instanceNumber, and optionally the modality, and SOP Class