- Common ways to obtain DicomDirWriter
private void myMethod () {}
public synchronized Attributes addLowerDirectoryRecord( Attributes parentRec, Attributes rec) throws IOException { Attributes prevRec = lastChildRecords.get(parentRec); if (prevRec == null) prevRec = findLastLowerDirectoryRecord(parentRec); if (prevRec != null) addRecord(Tag.OffsetOfTheNextDirectoryRecord, prevRec, rec); else addRecord(Tag.OffsetOfReferencedLowerLevelDirectoryEntity, parentRec, rec); lastChildRecords.put(parentRec, rec); return rec; }
public synchronized Attributes addRootDirectoryRecord(Attributes rec) throws IOException { Attributes lastRootRecord = readLastRootDirectoryRecord(); if (lastRootRecord == null) { writeRecord(firstRecordPos, rec); setOffsetOfFirstRootDirectoryRecord(firstRecordPos); } else { addRecord(Tag.OffsetOfTheNextDirectoryRecord, lastRootRecord, rec); } setOffsetOfLastRootDirectoryRecord((int) rec.getItemPosition()); return rec; }