org.dcm4che2.media
Class DicomDirWriter

java.lang.Object
  extended by org.dcm4che2.media.DicomDirReader
      extended by org.dcm4che2.media.DicomDirWriter

public class DicomDirWriter
extends DicomDirReader

Since:
06.07.2006
Version:
$Revision: 12635 $ $Date: 2010-01-18 14:15:50 +0100 (Mon, 18 Jan 2010) $
Author:
Gunter Zeilinger

Field Summary
protected  DicomObject cachedLastChildRecord
           
protected  DicomObject cachedParentRecord
           
protected  byte[] dirInfoHeader
           
protected  byte[] dirRecordHeader
           
protected  java.util.ArrayList<DicomObject> dirtyRecords
           
protected  long firstRecordPos
           
protected  DicomOutputStream out
           
protected  long recordSeqLen
           
protected  long rollbackLen
           
 
Fields inherited from class org.dcm4che2.media.DicomDirReader
cache, file, filesetInfo, in, INACTIVE, INUSE, log, raf, showInactiveRecords
 
Constructor Summary
DicomDirWriter(java.io.File file)
           
DicomDirWriter(java.io.File file, FileSetInformation fileSetInfo)
           
 
Method Summary
 void addChildRecord(DicomObject parentRec, DicomObject dcmobj)
           
 DicomObject addPatientRecord(DicomObject patrec)
           
 void addRootRecord(DicomObject rec)
           
 DicomObject addSeriesRecord(DicomObject styrec, DicomObject serrec)
           
 void addSiblingRecord(DicomObject prevRec, DicomObject dcmobj)
           
 DicomObject addStudyRecord(DicomObject patrec, DicomObject styrec)
           
 void close()
           
 void commit()
           
 void deleteRecord(DicomObject rec)
           
 boolean isExplicitItemLength()
           
 boolean isExplicitItemLengthIfZero()
           
 boolean isExplicitSequenceLength()
           
 boolean isExplicitSequenceLengthIfZero()
           
 boolean isIncludeGroupLength()
           
 int purge()
           
 void rollback()
           
 void setExplicitItemLength(boolean explicitItemLength)
           
 void setExplicitItemLengthIfZero(boolean explicitItemLengthIfZero)
           
 void setExplicitSequenceLength(boolean explicitSequenceLength)
           
 void setExplicitSequenceLengthIfZero(boolean explicitSequenceLengthIfZero)
           
 void setIncludeGroupLength(boolean includeGroupLength)
           
 
Methods inherited from class org.dcm4che2.media.DicomDirReader
clearCache, findFirstChildRecord, findFirstMatchingChildRecord, findFirstMatchingRootRecord, findFirstRootRecord, findInstanceRecord, findNextMatchingSiblingRecord, findNextSiblingRecord, findPatientRecord, findSeriesRecord, findStudyRecord, getFile, getFileSetConsistencyFlag, getFileSetDescriptorFile, getFileSetInformation, getMediaStorageSOPInstanceUID, getSpecificCharacterSetofFileSetDescriptorFile, isEmpty, isNoKnownInconsistencies, isShowInactiveRecords, lastChildRecord, lastRootRecord, lastSiblingOrThis, readRecord, setShowInactiveRecords, toFileID, toReferencedFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstRecordPos

protected final long firstRecordPos

dirInfoHeader

protected final byte[] dirInfoHeader

dirRecordHeader

protected final byte[] dirRecordHeader

recordSeqLen

protected long recordSeqLen

rollbackLen

protected long rollbackLen

dirtyRecords

protected java.util.ArrayList<DicomObject> dirtyRecords

cachedParentRecord

protected DicomObject cachedParentRecord

cachedLastChildRecord

protected DicomObject cachedLastChildRecord

out

protected final DicomOutputStream out
Constructor Detail

DicomDirWriter

public DicomDirWriter(java.io.File file)
               throws java.io.IOException
Throws:
java.io.IOException

DicomDirWriter

public DicomDirWriter(java.io.File file,
                      FileSetInformation fileSetInfo)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

isExplicitItemLength

public final boolean isExplicitItemLength()

setExplicitItemLength

public final void setExplicitItemLength(boolean explicitItemLength)

isExplicitItemLengthIfZero

public final boolean isExplicitItemLengthIfZero()

setExplicitItemLengthIfZero

public final void setExplicitItemLengthIfZero(boolean explicitItemLengthIfZero)

isExplicitSequenceLength

public final boolean isExplicitSequenceLength()

setExplicitSequenceLength

public final void setExplicitSequenceLength(boolean explicitSequenceLength)

isExplicitSequenceLengthIfZero

public final boolean isExplicitSequenceLengthIfZero()

setExplicitSequenceLengthIfZero

public final void setExplicitSequenceLengthIfZero(boolean explicitSequenceLengthIfZero)

isIncludeGroupLength

public final boolean isIncludeGroupLength()

setIncludeGroupLength

public final void setIncludeGroupLength(boolean includeGroupLength)

addRootRecord

public void addRootRecord(DicomObject rec)
                   throws java.io.IOException
Throws:
java.io.IOException

addPatientRecord

public DicomObject addPatientRecord(DicomObject patrec)
                             throws java.io.IOException
Throws:
java.io.IOException

addSiblingRecord

public void addSiblingRecord(DicomObject prevRec,
                             DicomObject dcmobj)
                      throws java.io.IOException
Throws:
java.io.IOException

addChildRecord

public void addChildRecord(DicomObject parentRec,
                           DicomObject dcmobj)
                    throws java.io.IOException
Throws:
java.io.IOException

addStudyRecord

public DicomObject addStudyRecord(DicomObject patrec,
                                  DicomObject styrec)
                           throws java.io.IOException
Throws:
java.io.IOException

addSeriesRecord

public DicomObject addSeriesRecord(DicomObject styrec,
                                   DicomObject serrec)
                            throws java.io.IOException
Throws:
java.io.IOException

deleteRecord

public void deleteRecord(DicomObject rec)
                  throws java.io.IOException
Throws:
java.io.IOException

rollback

public void rollback()
              throws java.io.IOException
Throws:
java.io.IOException

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class DicomDirReader
Throws:
java.io.IOException

purge

public int purge()
          throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 dcm4che. All Rights Reserved.