private void openForReadOnly(File file) throws IOException { this.file = file; in = new DicomDirReader(file); }
private void openForReadOnly(File file) throws IOException { this.file = file; in = new DicomDirReader(file); }
private void openDicomDirForReadOnly() throws IOException { ddReader = new DicomDirReader(dicomDir); }
private void openDicomDirForReadOnly() throws IOException { ddReader = new DicomDirReader(dicomDir); }
MediaSeriesGroup patient = null; try (DicomDirReader reader = new DicomDirReader(dcmDirFile)) { dcmPatient = findFirstRootDirectoryRecordInUse(reader);
private void compact(File f, File bak) throws IOException { File tmp = File.createTempFile("DICOMDIR", null, f.getParentFile()); DicomDirReader r = new DicomDirReader(f); try { fsInfo.setFilesetUID(r.getFileSetUID()); fsInfo.setFilesetID(r.getFileSetID()); fsInfo.setDescriptorFile( r.getDescriptorFile()); fsInfo.setDescriptorFileCharset( r.getDescriptorFileCharacterSet()); create(tmp); copyFrom(r); } finally { close(); try { r.close(); } catch (IOException ignore) {} } bak.delete(); rename(f, bak); rename(tmp, f); }
private void compact(File f, File bak) throws IOException { File tmp = File.createTempFile("DICOMDIR", null, f.getParentFile()); DicomDirReader r = new DicomDirReader(f); try { fsInfo.setFilesetUID(r.getFileSetUID()); fsInfo.setFilesetID(r.getFileSetID()); fsInfo.setDescriptorFile( r.getDescriptorFile()); fsInfo.setDescriptorFileCharset( r.getDescriptorFileCharacterSet()); create(tmp); copyFrom(r); } finally { close(); try { r.close(); } catch (IOException ignore) {} } bak.delete(); rename(f, bak); rename(tmp, f); }