Class ImageToDicom
A class for converting RGB consumer image format input files (anything JIIO can recognize) into DICOM images of a specified SOP Class, or single or multi frame DICOM Secondary Capture images.
-
Constructor Summary
ConstructorsConstructorDescriptionImageToDicom(String inputFile, String outputFile, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber) Read a consumer image format input file (anything JIIO can recognize), and create a single or multi frame DICOM Secondary Capture image.ImageToDicom(String inputFile, String outputFile, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber, String modality, String sopClass) 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. -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeListgenerateDICOMPixelModuleFromConsumerImageFile(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 AttributeListRead a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.static AttributeListgenerateDICOMPixelModuleFromConsumerImageFile(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 shortgetBitsPerSample(Node metadata) protected static StringgetCompressionType(Node metadata) static voidRead a consumer image format input file (anything JIIO can recognize), and create an image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
-
Constructor Details
-
ImageToDicom
public ImageToDicom(String inputFile, String outputFile, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber) throws IOException, DicomException Read a consumer image format input file (anything JIIO can recognize), and create a single or multi frame DICOM Secondary Capture image.
- Parameters:
inputFile- consumer image format input fileoutputFile- DICOM output imagepatientName- patient namepatientID- patient IDstudyID- study IDseriesNumber- series numberinstanceNumber- instance number- Throws:
IOException- if an I/O error occursDicomException- if error in DICOM encoding
-
ImageToDicom
public ImageToDicom(String inputFile, String outputFile, String patientName, String patientID, String studyID, String seriesNumber, String instanceNumber, String modality, String sopClass) throws 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.
- Parameters:
inputFile- consumer image format input fileoutputFile- DICOM output imagepatientName- patient namepatientID- patient IDstudyID- study IDseriesNumber- series numberinstanceNumber- instance numbermodality- may be nullsopClass- may be null- Throws:
IOException- if an I/O error occursDicomException- if error in DICOM encoding
-
-
Method Details
-
getCompressionType
-
getBitsPerSample
-
generateDICOMPixelModuleFromConsumerImageFile
public static AttributeList generateDICOMPixelModuleFromConsumerImageFile(String inputFile, AttributeList list) throws IOException, DicomException Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
- Parameters:
inputFile- a consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000, GIF, etc.)list- an existing (possibly empty) attribute list, if null, a new one will be created; may already include "better" image pixel module attributes to use- Returns:
- attribute list with Image Pixel Module (including Pixel Data) added
- Throws:
IOException- if an I/O error occursDicomException- if error in DICOM encoding
-
generateDICOMPixelModuleFromConsumerImageFile
public static AttributeList generateDICOMPixelModuleFromConsumerImageFile(File inputFile, AttributeList list) throws IOException, DicomException Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
- Parameters:
inputFile- a consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000, GIF, etc.)list- an existing (possibly empty) attribute list, if null, a new one will be created; may already include "better" image pixel module attributes to use- Returns:
- attribute list with Image Pixel Module (including Pixel Data) added
- Throws:
IOException- if an I/O error occursDicomException- if error in DICOM encoding
-
generateDICOMPixelModuleFromConsumerImageFile
public static AttributeList generateDICOMPixelModuleFromConsumerImageFile(String inputFile) throws IOException, DicomException Read a consumer image format input file (anything JIIO can recognize), and create a single frame DICOM Image Pixel Module.
- Parameters:
inputFile- a consumer format image file (e.g., 8 or > 8 bit JPEG, JPEG 2000, GIF, etc.)- Returns:
- a new attribute list with Image Pixel Module (including Pixel Data) added
- Throws:
IOException- if an I/O error occursDicomException- if error in DICOM encoding
-
main
Read a consumer image format input file (anything JIIO can recognize), and create an image of the specified SOP Class, or a single or multi frame DICOM Secondary Capture image.
- Parameters:
arg- seven, eight or nine parameters, the inputFile, outputFile, patientName, patientID, studyID, seriesNumber, instanceNumber, and optionally the modality, and SOP Class
-