public void addAll(Attributes attrs) { queryAttrs.addAll(attrs); }
public Attributes(Attributes other, boolean bigEndian) { this(bigEndian, other.size); if (other.properties != null) properties = new HashMap<String, Object>(other.properties); addAll(other); }
static void mergeKeys(Attributes attrs, Attributes keys) { try { attrs.accept(new MergeNested(keys), false); } catch (Exception e) { throw new RuntimeException(e); } attrs.addAll(keys); }
static void mergeKeys(Attributes attrs, Attributes keys) { try { attrs.accept(new MergeNested(keys), false); } catch (Exception e) { throw new RuntimeException(e); } attrs.addAll(keys); }
@Override public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) { try (DicomInputStream dis = new DicomInputStream(path.toFile())) { Attributes dataset = dis.readDataset(-1, -1); dataset.addAll(cliAttrs); System.out.println(format.format(dataset)); } catch (IOException e) { System.err.println("Failed to parse DICOM file " + path); e.printStackTrace(); } return FileVisitResult.CONTINUE; } }
@Override public Attributes getDicomObject() { Attributes dcm = new Attributes(); DicomMediaUtils.fillAttributes(tags, dcm); dcm.addAll(attributes); return dcm; }
private void addFunctionGroups(Attributes dest, Attributes fgs) { dest.addSelected(fgs, Tag.ReferencedImageSequence); Attributes fg; for (int sqTag : fgs.tags()) if (sqTag != Tag.ReferencedImageSequence && (fg = fgs.getNestedDataset(sqTag)) != null) dest.addAll(fg); }
@Override public void coerce(Attributes attrs, Attributes modified) { Attributes.unifyCharacterSets(attrs, newAttrs); if (modified != null) { attrs.update(Attributes.UpdatePolicy.OVERWRITE, newAttrs, modified); } else { attrs.addAll(newAttrs); } if (next != null) next.coerce(attrs, modified); } }
private void addFunctionGroups(Attributes dest, Attributes fgs) { dest.addSelected(fgs, Tag.ReferencedImageSequence); Attributes fg; for (int sqTag : fgs.tags()) if (sqTag != Tag.ReferencedImageSequence && (fg = fgs.getNestedDataset(sqTag)) != null) dest.addAll(fg); }
private Attributes readPostAttr(DicomInputStream dis) throws IOException { Attributes postAttr = dis.readDataset(-1, -1); postAttr.addAll(metadata.getAttributes()); metadata = new DicomMetaData(metadata.getFileMetaInformation(), postAttr); return postAttr; }
@Override public boolean visit(Attributes attrs, int tag, VR vr, Object val) { if (isNotEmptySequence(val)) { Object o = keys.remove(tag); if (isNotEmptySequence(o)) ((Sequence) val).get(0).addAll(((Sequence) o).get(0)); } return true; }
@Override public boolean visit(Attributes attrs, int tag, VR vr, Object val) { if (isNotEmptySequence(val)) { Object o = keys.remove(tag); if (isNotEmptySequence(o)) ((Sequence) val).get(0).addAll(((Sequence) o).get(0)); } return true; }
public void retrieve(File f) throws IOException, InterruptedException { Attributes attrs = new Attributes(); DicomInputStream dis = null; try { attrs.addSelected(new DicomInputStream(f).readDataset(-1, -1), inFilter); } finally { SafeClose.close(dis); } attrs.addAll(keys); retrieve(attrs); }
public void retrieve(File f) throws IOException, InterruptedException { Attributes attrs = new Attributes(); DicomInputStream dis = null; try { attrs.addSelected(new DicomInputStream(f).readDataset(-1, -1), inFilter); } finally { SafeClose.close(dis); } attrs.addAll(keys); retrieve(attrs); }
public void retrieve(File f) throws IOException, InterruptedException { Attributes attrs = new Attributes(); DicomInputStream dis = null; try { attrs.addSelected(new DicomInputStream(f).readDataset(-1, -1), inFilter); } finally { SafeClose.close(dis); } attrs.addAll(keys); retrieve(attrs); }