public class DicomDirWriter extends DicomDirReader
Modifier and Type | Field and Description |
---|---|
private byte[] |
dirInfoHeader |
private byte[] |
dirRecordHeader |
private ArrayList<Attributes> |
dirtyRecords |
private int |
firstRecordPos |
private static int |
IN_USE |
private static int |
INACTIVE |
private static int |
KNOWN_INCONSISTENCIES |
private IdentityHashMap<Attributes,Attributes> |
lastChildRecords |
private static Logger |
LOG |
private int |
nextRecordPos |
private static int |
NO_KNOWN_INCONSISTENCIES |
private static Comparator<Attributes> |
offsetComparator |
private DicomOutputStream |
out |
private int |
rollbackLen |
Modifier | Constructor and Description |
---|---|
private |
DicomDirWriter(File file) |
findFirstRootDirectoryRecordInUse, findLastLowerDirectoryRecord, findLowerDirectoryRecord, findLowerDirectoryRecordInUse, findLowerInstanceRecord, findNextDirectoryRecord, findNextDirectoryRecordInUse, findNextInstanceRecord, findNextPatientRecord, findNextSeriesRecord, findNextStudyRecord, findPatientRecord, findRootDirectoryRecord, findRootDirectoryRecord, findRootInstanceRecord, findSeriesRecord, findStudyRecord, getDescriptorFile, getDescriptorFileCharacterSet, getFile, getFileMetaInformation, getFileSetConsistencyFlag, getFileSetID, getFileSetInformation, getFileSetUID, getOffsetOfFirstRootDirectoryRecord, getOffsetOfLastRootDirectoryRecord, getTransferSyntaxUID, inUse, isEmpty, isPrivate, knownInconsistencies, readFirstRootDirectoryRecord, readLastRootDirectoryRecord, readLowerDirectoryRecord, readNextDirectoryRecord, setFileSetConsistencyFlag, setOffsetOfFirstRootDirectoryRecord, setOffsetOfLastRootDirectoryRecord, toFile
private static final int KNOWN_INCONSISTENCIES
private static final int NO_KNOWN_INCONSISTENCIES
private static final int IN_USE
private static final int INACTIVE
private final byte[] dirInfoHeader
private final byte[] dirRecordHeader
private final DicomOutputStream out
private final int firstRecordPos
private int nextRecordPos
private int rollbackLen
private IdentityHashMap<Attributes,Attributes> lastChildRecords
private final ArrayList<Attributes> dirtyRecords
private static final Comparator<Attributes> offsetComparator
private DicomDirWriter(File file) throws IOException
IOException
public DicomEncodingOptions getEncodingOptions()
public void setEncodingOptions(DicomEncodingOptions encOpts)
public static DicomDirWriter open(File file) throws IOException
IOException
public static void createEmptyDirectory(File file, String iuid, String id, File descFile, String charset) throws IOException
IOException
public static void createEmptyDirectory(File file, Attributes fmi, String id, File descFile, String charset) throws IOException
IOException
private static Attributes createFileSetInformation(File file, String id, File descFile, String charset)
public Attributes addRootDirectoryRecord(Attributes rec) throws IOException
IOException
public Attributes addLowerDirectoryRecord(Attributes parentRec, Attributes rec) throws IOException
IOException
public Attributes findOrAddPatientRecord(Attributes rec) throws IOException
IOException
public Attributes findOrAddStudyRecord(Attributes patRec, Attributes rec) throws IOException
IOException
public Attributes findOrAddSeriesRecord(Attributes studyRec, Attributes rec) throws IOException
IOException
public boolean deleteRecord(Attributes rec) throws IOException
IOException
public void rollback() throws IOException
IOException
public void clearCache()
clearCache
in class DicomDirReader
public void commit() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class DicomDirReader
IOException
private void updateDirInfoHeader()
private void restoreDirInfo()
private void writeDirInfoHeader() throws IOException
IOException
private void writeDirRecordHeader(Attributes rec) throws IOException
IOException
private void writeSequenceDelimitationItem() throws IOException
IOException
private void addRecord(int tag, Attributes prevRec, Attributes rec) throws IOException
IOException
private void writeRecord(int offset, Attributes rec) throws IOException
IOException
private void writeFileSetConsistencyFlag(int flag) throws IOException
IOException
private void markAsDirty(Attributes rec)
public int purge() throws IOException
IOException
private boolean purge(Attributes rec, int[] count) throws IOException
IOException
Copyright © 2017 dcm4che.org. All rights reserved.