org.dcm4che2.media
Class DicomDirReader

java.lang.Object
  extended by org.dcm4che2.media.DicomDirReader
Direct Known Subclasses:
DicomDirWriter

public class DicomDirReader
extends java.lang.Object

Since:
Jun 25, 2005
Version:
$Revision: 12635 $ $Date:: 2010-01-18#$
Author:
gunter zeilinger(gunterze@gmail.com)

Field Summary
protected  IntHashtable<DicomObject> cache
           
protected  java.io.File file
           
protected  FileSetInformation filesetInfo
           
protected  DicomInputStream in
           
protected static int INACTIVE
           
protected static int INUSE
           
protected static org.slf4j.Logger log
           
protected  java.io.RandomAccessFile raf
           
protected  boolean showInactiveRecords
           
 
Constructor Summary
  DicomDirReader(java.io.File file)
           
  DicomDirReader(java.io.RandomAccessFile raf)
           
protected DicomDirReader(java.io.RandomAccessFile raf, FileSetInformation fileSetInfo)
           
 
Method Summary
 void clearCache()
           
 void close()
           
 DicomObject findFirstChildRecord(DicomObject parentRecord)
           
 DicomObject findFirstMatchingChildRecord(DicomObject parentRecord, DicomObject keys, boolean ignoreCaseOfPN)
           
 DicomObject findFirstMatchingRootRecord(DicomObject keys, boolean ignoreCaseOfPN)
           
 DicomObject findFirstRootRecord()
           
 DicomObject findInstanceRecord(DicomObject serrec, java.lang.String uid)
           
 DicomObject findNextMatchingSiblingRecord(DicomObject prevRecord, DicomObject keys, boolean ignoreCaseOfPN)
           
 DicomObject findNextSiblingRecord(DicomObject prevRecord)
           
 DicomObject findPatientRecord(java.lang.String pid)
           
 DicomObject findSeriesRecord(DicomObject styrec, java.lang.String uid)
           
 DicomObject findStudyRecord(DicomObject patrec, java.lang.String uid)
           
 java.io.File getFile()
           
 int getFileSetConsistencyFlag()
           
 java.io.File getFileSetDescriptorFile()
           
 FileSetInformation getFileSetInformation()
           
 java.lang.String getMediaStorageSOPInstanceUID()
           
 java.lang.String getSpecificCharacterSetofFileSetDescriptorFile()
           
 boolean isEmpty()
           
 boolean isNoKnownInconsistencies()
           
 boolean isShowInactiveRecords()
           
protected  DicomObject lastChildRecord(DicomObject parentRec)
           
protected  DicomObject lastRootRecord()
           
protected  DicomObject lastSiblingOrThis(DicomObject rec)
           
protected  DicomObject readRecord(int offset)
           
 void setShowInactiveRecords(boolean showInactiveRecords)
           
 java.lang.String[] toFileID(java.io.File f)
           
 java.io.File toReferencedFile(DicomObject rec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.slf4j.Logger log

INACTIVE

protected static final int INACTIVE
See Also:
Constant Field Values

INUSE

protected static final int INUSE
See Also:
Constant Field Values

raf

protected final java.io.RandomAccessFile raf

in

protected final DicomInputStream in

filesetInfo

protected final FileSetInformation filesetInfo

cache

protected final IntHashtable<DicomObject> cache

file

protected java.io.File file

showInactiveRecords

protected boolean showInactiveRecords
Constructor Detail

DicomDirReader

protected DicomDirReader(java.io.RandomAccessFile raf,
                         FileSetInformation fileSetInfo)
                  throws java.io.IOException
Throws:
java.io.IOException

DicomDirReader

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

DicomDirReader

public DicomDirReader(java.io.RandomAccessFile raf)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getFileSetConsistencyFlag

public int getFileSetConsistencyFlag()

isNoKnownInconsistencies

public boolean isNoKnownInconsistencies()

getFileSetDescriptorFile

public java.io.File getFileSetDescriptorFile()

getMediaStorageSOPInstanceUID

public java.lang.String getMediaStorageSOPInstanceUID()

getSpecificCharacterSetofFileSetDescriptorFile

public java.lang.String getSpecificCharacterSetofFileSetDescriptorFile()

isEmpty

public boolean isEmpty()

getFile

public final java.io.File getFile()

toReferencedFile

public java.io.File toReferencedFile(DicomObject rec)

toFileID

public java.lang.String[] toFileID(java.io.File f)

clearCache

public void clearCache()

getFileSetInformation

public FileSetInformation getFileSetInformation()

isShowInactiveRecords

public final boolean isShowInactiveRecords()

setShowInactiveRecords

public final void setShowInactiveRecords(boolean showInactiveRecords)

findFirstRootRecord

public DicomObject findFirstRootRecord()
                                throws java.io.IOException
Throws:
java.io.IOException

lastRootRecord

protected DicomObject lastRootRecord()
                              throws java.io.IOException
Throws:
java.io.IOException

findFirstMatchingRootRecord

public DicomObject findFirstMatchingRootRecord(DicomObject keys,
                                               boolean ignoreCaseOfPN)
                                        throws java.io.IOException
Throws:
java.io.IOException

findPatientRecord

public DicomObject findPatientRecord(java.lang.String pid)
                              throws java.io.IOException
Throws:
java.io.IOException

findNextSiblingRecord

public DicomObject findNextSiblingRecord(DicomObject prevRecord)
                                  throws java.io.IOException
Throws:
java.io.IOException

findNextMatchingSiblingRecord

public DicomObject findNextMatchingSiblingRecord(DicomObject prevRecord,
                                                 DicomObject keys,
                                                 boolean ignoreCaseOfPN)
                                          throws java.io.IOException
Throws:
java.io.IOException

findFirstChildRecord

public DicomObject findFirstChildRecord(DicomObject parentRecord)
                                 throws java.io.IOException
Throws:
java.io.IOException

findFirstMatchingChildRecord

public DicomObject findFirstMatchingChildRecord(DicomObject parentRecord,
                                                DicomObject keys,
                                                boolean ignoreCaseOfPN)
                                         throws java.io.IOException
Throws:
java.io.IOException

findStudyRecord

public DicomObject findStudyRecord(DicomObject patrec,
                                   java.lang.String uid)
                            throws java.io.IOException
Throws:
java.io.IOException

findSeriesRecord

public DicomObject findSeriesRecord(DicomObject styrec,
                                    java.lang.String uid)
                             throws java.io.IOException
Throws:
java.io.IOException

findInstanceRecord

public DicomObject findInstanceRecord(DicomObject serrec,
                                      java.lang.String uid)
                               throws java.io.IOException
Throws:
java.io.IOException

readRecord

protected DicomObject readRecord(int offset)
                          throws java.io.IOException
Throws:
java.io.IOException

lastChildRecord

protected DicomObject lastChildRecord(DicomObject parentRec)
                               throws java.io.IOException
Throws:
java.io.IOException

lastSiblingOrThis

protected DicomObject lastSiblingOrThis(DicomObject rec)
                                 throws java.io.IOException
Throws:
java.io.IOException

close

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


Copyright © 2011 dcm4che. All Rights Reserved.