private Sequence refSOPSeq(String studyIUID, String seriesIUID) {
Attributes refStudy = getOrAddItem(evidenceSeq, Tag.StudyInstanceUID, studyIUID);
Sequence refSeriesSeq = refStudy.ensureSequence(Tag.ReferencedSeriesSequence, 10);
Attributes refSeries = getOrAddItem(refSeriesSeq,Tag.SeriesInstanceUID, seriesIUID);
return refSeries.ensureSequence(Tag.ReferencedSOPSequence, 100);
}
private Attributes getOrAddItem(Sequence seq, int tag, String value) {
for (Attributes item : seq)
if (value.equals(item.getString(tag)))