protected DataWriter createDataWriter(T inst, String tsuid) throws Exception { DicomInputStream in = new DicomInputStream(inst.getFile()); in.readFileMetaInformation(); return new InputStreamDataWriter(in); }
String[] fileIDs = instRec.getStrings(Tag.ReferencedFileID); String uri = ddr.toFile(fileIDs).toURI().toString(); list.add(new InstanceLocator(cuid, iuid, tsuid, uri)); if (sopIUIDs != null && sopIUIDs.length == 1) break;
String[] fileIDs = instRec.getStrings(Tag.ReferencedFileID); String uri = ddr.toFile(fileIDs).toURI().toString(); list.add(new InstanceLocator(cuid, iuid, tsuid, uri)); if (sopIUIDs != null && sopIUIDs.length == 1) break;
protected DataWriter createDataWriter(T inst, String tsuid) throws Exception { DicomInputStream in = new DicomInputStream(inst.getFile()); in.readFileMetaInformation(); return new InputStreamDataWriter(in); }
@Override protected DataWriter createDataWriter(InstanceLocator inst, String tsuid) throws IOException { Attributes attrs; DicomInputStream in = new DicomInputStream(inst.getFile()); try { if (withoutBulkData) { in.setIncludeBulkData(IncludeBulkData.NO); attrs = in.readDataset(-1, Tag.PixelData); } else { in.setIncludeBulkData(IncludeBulkData.URI); attrs = in.readDataset(-1, -1); } } finally { SafeClose.close(in); } if (delayCStore > 0) try { Thread.sleep(delayCStore); } catch (InterruptedException ignore) {} return new DataWriterAdapter(attrs); }
@Override protected DataWriter createDataWriter(InstanceLocator inst, String tsuid) throws IOException { Attributes attrs; DicomInputStream in = new DicomInputStream(inst.getFile()); try { if (withoutBulkData) { in.setIncludeBulkData(IncludeBulkData.NO); attrs = in.readDataset(-1, Tag.PixelData); } else { in.setIncludeBulkData(IncludeBulkData.URI); attrs = in.readDataset(-1, -1); } } finally { SafeClose.close(in); } if (delayCStore > 0) try { Thread.sleep(delayCStore); } catch (InterruptedException ignore) {} return new DataWriterAdapter(attrs); }