/** * Write a DICOM object to the output stream using the specified * <code>DicomObject</code> to obtain the transfer syntax UID and other * attributes. * * @param attrs * The <code>DicomObject</code> containing the DICOM tags to * write into the file. * @throws IOException */ public void writeDicomFile(DicomObject attrs) throws IOException { String tsuid = attrs.getString(Tag.TransferSyntaxUID); if (tsuid == null) throw new IllegalArgumentException( "Missing (0002,0010) Transfer Syntax UID"); writeFileMetaInformation(attrs); writeDataset(attrs, tsuid); }