protected DicomDirReader(RandomAccessFile raf, FileSetInformation fileSetInfo) throws IOException { this.raf = raf; this.in = new DicomInputStream(raf, TransferSyntax.ExplicitVRLittleEndian); this.filesetInfo = fileSetInfo; }
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); DicomInputStream dis = new DicomInputStream(s, TransferSyntax.ExplicitVRLittleEndian); attrs = new BasicDicomObject(); dis.readDicomObject(attrs, -1); } }
if (info.f.getAbsolutePath().endsWith(".gz")) dis = new DicomInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(info.f), 256))); dis= new DicomInputStream(info.f); if (info.f.getAbsolutePath().endsWith(".gz")) dis = new DicomInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(info.f), 256))); dis = new DicomInputStream(info.f);
if (f.getAbsolutePath().endsWith(".gz")) in = new DicomInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(f), 256))); in = new DicomInputStream(f);
private DicomObject readDicomObject(TransferSyntax ts) throws IOException { DicomObject dcm = new BasicDicomObject(); DicomInputStream din = new DicomInputStream(this, ts); try { din.readDicomObject(dcm, -1); } catch (DicomCodingException e) { log.warn(as.toString() + ": Failed to decode dicom object: " + e.getMessage()); throw new AAbort(); } finally { CloseUtils.safeClose(din); } return dcm; }
DicomInputStream in = null; try { in = new DicomInputStream(inStream); in.setHandler(new StopTagInputHandler(Tag.StudyDate)); in.readDicomObject(dcmObj, PEEK_LEN);
byte[] byteArr = ByteStreams.toByteArray(new DicomInputStream(iStream.getInputStream())); dcmsnd.addFile(ByteBuffer.wrap(byteArr)); System.out.println("Added NewFile: "+rui.toString());
public DicomElement get(int tag, VR vr) { DicomElement e = get(tag); if (e == null || e.vr() == vr) { return e; } if (e.vr() != VR.UN) { throw new UnsupportedOperationException("Update VR from " + e.vr() + " to " + vr + " not supported"); } if (vr != VR.SQ) { return putBytes(tag, vr, e.getBytes()); } DicomElement sq = putSequence(tag); if (!e.isEmpty()) { try { byte[] b = e.getBytes(); DicomInputStream in = new DicomInputStream( new ByteArrayInputStream(b), UID.ImplicitVRLittleEndian); in.readItems(sq, b.length); } catch (IOException e1) { throw new RuntimeException("Failed to parse value of " + e + " as sequence of items", e1); } } return sq; } }
dis = new DicomInputStream(f); dis.setHandler(new StopTagInputHandler(Tag.PixelData)); DicomObject d = dis.readDicomObject();
public DicomDirReader(RandomAccessFile raf) throws IOException { this.raf = raf; in = new DicomInputStream(raf); in.setHandler(new StopTagInputHandler(Tag.DirectoryRecordSequence)); filesetInfo = new FileSetInformation(); in.readDicomObject(filesetInfo.getDicomObject(), -1); in.setHandler(in); }
DicomInputStream dis = new DicomInputStream(info.getInputStream()); try { dis.setHandler(new StopTagInputHandler(Tag.PixelData)); dos.writeDataset(attrs, tsuid); } else { DicomInputStream dis = new DicomInputStream(info.getInputStream()); try { DicomOutputStream dos = new DicomOutputStream(out);
byte[] b = sq.getFragment(i); InputStream is = new ByteArrayInputStream(b); DicomInputStream dis1 = new DicomInputStream(is, TransferSyntax.ImplicitVRLittleEndian); DicomObject item = new BasicDicomObject();
return; dis = new DicomInputStream(iis); DicomInputHandler ih = new StopTagInputHandler(Tag.PixelData); if( isSkipLargePrivate() ) {
DicomInputStream postDis = new DicomInputStream(iis, TransferSyntax.valueOf(tsuid)); if( isSkipLargePrivate() ) { DicomInputHandler dih = new SizeSkipInputHandler(null);