]> Creatis software - gdcm.git/blobdiff - src/gdcmHeader.h
Correction of previous commit. Sorry. --- Frog.
[gdcm.git] / src / gdcmHeader.h
index b082bd8336f0a3a3a4368e0930a58515cbe8eceb..3ccf8cf47efde914ce5a3ad82fe89bd68f0e0d5a 100644 (file)
@@ -1,10 +1,11 @@
-// gdcmHeader.h
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.22 2003/05/06 15:52:13 jpr Exp $
 
 #ifndef GDCMHEADER_H
 #define GDCMHEADER_H
 
 #include <map>
 #include "gdcmCommon.h"
+#include "gdcmUtil.h"
 #include "gdcmException.h"
 #include "gdcmDictSet.h"
 #include "gdcmElValue.h"
@@ -36,10 +37,9 @@ class GDCM_EXPORT gdcmHeader {
 private:
    /// Pointer to the Value Representation Hash Table which contains all
    /// the VR of the DICOM version3 public dictionary. 
-   static VRHT *dicom_vr;
-   /// Global dictionary container
-   gdcmDictSet* Dicts;
+   gdcmVR *dicom_vr;     // Not a class member for thread-safety reasons
+   /// Pointer to global dictionary container
+   gdcmDictSet* Dicts;   // Not a class member for thread-safety reasons
    /// Public dictionary used to parse this header
    gdcmDict* RefPubDict;
    /// Optional "shadow dictionary" (private elements) used to parse this
@@ -71,12 +71,9 @@ private:
 
    guint16 ReadInt16(void);
    guint32 ReadInt32(void);
-   guint16 SwapShort(guint16);
-   guint32 SwapLong(guint32);
    guint32 FindLengthOB(void);
    void Initialise(void);
    void CheckSwap(void);
-   void InitVRDict(void);
    void SwitchSwapToBigEndian(void);
    // CLEAN ME: NewManualElValToPubDict is NOT called any more.
    gdcmElValue*  NewManualElValToPubDict(string NewTagName, string VR);
@@ -89,6 +86,7 @@ private:
    gdcmElValue * ReadNextElement(void);
    gdcmElValue * NewElValueByNumber(guint16 group, guint16 element);
    gdcmElValue * NewElValueByName(string name);
+
    void FindLength(gdcmElValue *);
    void FindVR(gdcmElValue *);
    void LoadElementValue(gdcmElValue *);
@@ -101,6 +99,11 @@ private:
 protected:
    FILE * fp;
    FileType filetype;
+   
+   gdcmElValue * GetElValueByNumber(guint16 group, guint16 element);
+
+   guint16 SwapShort(guint16); // needed by gdcmFile
+   guint32 SwapLong(guint32);  // for JPEG Files :-(
    bool OpenFile(bool exception_on_error = false)
      throw(gdcmFileError);
    bool CloseFile(void);