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, toFileprivate 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
IOExceptionpublic DicomEncodingOptions getEncodingOptions()
public void setEncodingOptions(DicomEncodingOptions encOpts)
public static DicomDirWriter open(File file) throws IOException
IOExceptionpublic static void createEmptyDirectory(File file, String iuid, String id, File descFile, String charset) throws IOException
IOExceptionpublic static void createEmptyDirectory(File file, Attributes fmi, String id, File descFile, String charset) throws IOException
IOExceptionprivate static Attributes createFileSetInformation(File file, String id, File descFile, String charset)
public Attributes addRootDirectoryRecord(Attributes rec) throws IOException
IOExceptionpublic Attributes addLowerDirectoryRecord(Attributes parentRec, Attributes rec) throws IOException
IOExceptionpublic Attributes findOrAddPatientRecord(Attributes rec) throws IOException
IOExceptionpublic Attributes findOrAddStudyRecord(Attributes patRec, Attributes rec) throws IOException
IOExceptionpublic Attributes findOrAddSeriesRecord(Attributes studyRec, Attributes rec) throws IOException
IOExceptionpublic boolean deleteRecord(Attributes rec) throws IOException
IOExceptionpublic void rollback() throws IOException
IOExceptionpublic void clearCache()
clearCache in class DicomDirReaderpublic void commit() throws IOException
IOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DicomDirReaderIOExceptionprivate void updateDirInfoHeader()
private void restoreDirInfo()
private void writeDirInfoHeader() throws IOException
IOExceptionprivate void writeDirRecordHeader(Attributes rec) throws IOException
IOExceptionprivate void writeSequenceDelimitationItem() throws IOException
IOExceptionprivate void addRecord(int tag, Attributes prevRec, Attributes rec) throws IOException
IOExceptionprivate void writeRecord(int offset, Attributes rec) throws IOException
IOExceptionprivate void writeFileSetConsistencyFlag(int flag) throws IOException
IOExceptionprivate void markAsDirty(Attributes rec)
public int purge() throws IOException
IOExceptionprivate boolean purge(Attributes rec, int[] count) throws IOException
IOExceptionCopyright © 2017 dcm4che.org. All rights reserved.