public class DicomStreamCopier
extends java.lang.Object
A class to copy DICOM attributes from anm input stream to an output stream, converting the encoding of the attributes between transfer syntaxes if necessary.
DicomInputStream
,
DicomOutputStream
Constructor and Description |
---|
DicomStreamCopier(DicomInputStream i,
DicomOutputStream o)
Copy a dicom input stream to a dicom output stream, using any meta information header if present in input, but not copying it.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] arg)
Copy one file to another parsing and recreating the DICOM attributes using the specified transfer syntaxes.
|
public DicomStreamCopier(DicomInputStream i, DicomOutputStream o) throws DicomException, java.io.IOException
Copy a dicom input stream to a dicom output stream, using any meta information header if present in input, but not copying it.
Implements the CP 1066 proposal to handle values too long to fit in Explicit VR by writing a UN rather than the actual VR.
i
- the input streamo
- the output stream, which is closed after the copy is donejava.io.IOException
- if an I/O error occursDicomException
- if error in DICOM encodingpublic static void main(java.lang.String[] arg)
Copy one file to another parsing and recreating the DICOM attributes using the specified transfer syntaxes.
arg
- four arguments, the input transfer syntax uid (must be zero length if metaheader present), the input filename,
the output transfer syntax uid and the output filename