Package com.pixelmed.convert
Class EncapsulateData
java.lang.Object
com.pixelmed.convert.EncapsulateData
A class to create a DICOM encapsulated data object from a data file and supplied metadata and/or composite context.
E.g., to encapsulate a PDF, CDA or STL file.
-
Constructor Summary
ConstructorsConstructorDescriptionEncapsulateData
(String inputFileName, String metadataFileName, String compositeContextFileName, String outputFileName) Create a DICOM encapsulated data object from a data file and supplied metadata -
Method Summary
Modifier and TypeMethodDescriptionstatic String
determineMediaTypeFromFile
(String filename) static String
determineModalityFromSOPClass
(String sopClassUID) static String
determineSOPClassFromMediaType
(String mediaType) static void
Create a DICOM encapsulated data object from a data file and supplied metadata.
-
Constructor Details
-
EncapsulateData
public EncapsulateData(String inputFileName, String metadataFileName, String compositeContextFileName, String outputFileName) throws FileNotFoundException, IOException, DicomException Create a DICOM encapsulated data object from a data file and supplied metadata
The SOP Class will be automatically determined from the supplied file type.
- Parameters:
inputFileName
- file containing data to be encapsulatedmetadataFileName
- file containing metadata to be included, may be null or empty stringcompositeContextFileName
- file containing DICOM patient and study composite context to reuse, may be null or empty stringoutputFileName
- file to write the DICOM encapsulated object to- Throws:
FileNotFoundException
- if a file cannot be foundIOException
- if there is a problem reading or writingDicomException
- if there is a problem parsing or extracting required content
-
-
Method Details
-
determineMediaTypeFromFile
-
determineSOPClassFromMediaType
-
determineModalityFromSOPClass
-
main
Create a DICOM encapsulated data object from a data file and supplied metadata.
The SOP Class will be automatically determined from the supplied file type.
- Parameters:
arg
- two to four parameters, the input data file, optionally a metadata file, optionally a patient/study composite context source DICOM file, and the output file
-