/** * Write a DICOM dataset to the output stream. * * @param attrs * A DicomObject containing the attributes to write. * @param tsuid * A String containing the transfer syntax UID of the file. * @throws IOException */ public void writeDataset(DicomObject attrs, String tsuid) throws IOException { writeDataset(attrs, TransferSyntax.valueOf(tsuid)); }
/** * 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); }
public void writeTo(PDVOutputStream out, String tsuid) throws IOException { DicomOutputStream dos = new DicomOutputStream(out); dos.writeDataset(data, TransferSyntax.valueOf(tsuid)); }
public void writePostPixeldata(DicomObject dobj, String transferSyntax) throws IOException{ dos.writeDataset(dobj, transferSyntax); dos.flush(); finishStream(); }
attrs.putString(Tag.RetrieveURI, VR.UT, info.f.toURI().toString()); dos.writeDataset(attrs, tsuid); } else { DicomInputStream dis = null;
dos.writeDataset(attrs, tsuid); } else { DicomInputStream dis = new DicomInputStream(info.getInputStream());
dos.writeDicomFile(dobj); } else { dos.writeDataset(dobj, dobj.getString(Tag.TransferSyntaxUID));