]> Creatis software - gdcm.git/blobdiff - src/gdcmHeaderEntry.h
2004-02-06 Jean-Pierre Roux
[gdcm.git] / src / gdcmHeaderEntry.h
index 1c8520aecc211afafa6676045cc7df55d7312fe0..577ff569ab3cf295770a659551fc31d4397e8b1a 100644 (file)
@@ -3,11 +3,12 @@
 #ifndef GDCMHeaderEntry_H
 #define GDCMHeaderEntry_H
 
+#include <iostream>
+#include <stdio.h>
+
 #include "gdcmDictEntry.h"
 class gdcmHeader;
 
-#include <stdio.h>
-
 //-----------------------------------------------------------------------------
 /*
  * The dicom header of a Dicom file contains a set of such entries
@@ -23,9 +24,11 @@ public:
    inline std::string  GetName(void)      { return entry->GetName();   };
    inline std::string  GetVR(void)        { return entry->GetVR();     };
    inline std::string  GetValue(void)     { return value;              };
+
    inline void *       GetVoidArea(void)  { return voidArea;           };
    inline size_t       GetOffset(void)    { return Offset;             };   
    inline guint32      GetLength(void)    { return UsableLength;       };   
+
    inline void         SetVR(std::string v)      { entry->SetVR(v);          };    
    inline void         SetLength(guint32 l)      { ReadLength=UsableLength=l;};
       
@@ -45,49 +48,49 @@ public:
     */
    inline void gdcmHeaderEntry::SetOffset(size_t of) { Offset = of; };
 
-   /**
-    * \ingroup gdcmHeaderEntry
-    * \brief   Sets the DicEntry of the current Dicom Element
-    * @param   NewEntry pointer to the DictEntry
-    */ 
-   inline void gdcmHeaderEntry::SetDictEntry(gdcmDictEntry *NewEntry) { 
-      entry = NewEntry; 
-   };
-
    /**
     * \ingroup gdcmHeaderEntry
     * \brief   Sets to TRUE the ImplicitVr flag of the current Dicom Element
     */
-   inline void gdcmHeaderEntry::SetImplicitVr(void) { 
-      ImplicitVr = true; 
-   };
+   inline void gdcmHeaderEntry::SetImplicitVR(void) { ImplicitVR = true; };
  
    /**
     * \ingroup gdcmHeaderEntry
     * \brief   tells us if the current Dicom Element was checked as ImplicitVr
     * @return true if the current Dicom Element was checked as ImplicitVr
     */ 
-   inline bool  gdcmHeaderEntry::IsImplicitVr(void) { 
-       return ImplicitVr; 
-    };
+   inline bool  gdcmHeaderEntry::IsImplicitVR(void) { return ImplicitVR; };
+
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   tells us if the VR of the current Dicom Element is Unkonwn
+    * @return true if the VR is unkonwn
+    */ 
+   inline bool   gdcmHeaderEntry::IsVRUnknown(void) { return entry->IsVRUnknown(); };
+
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets the DicEntry of the current Dicom Element
+    * @param   NewEntry pointer to the DictEntry
+    */ 
+   inline void gdcmHeaderEntry::SetDictEntry(gdcmDictEntry *NewEntry) { 
+      entry = NewEntry;
+   };
 
    /**
     * \ingroup gdcmHeaderEntry
     * \brief   Gets the DicEntry of the current Dicom Element
     * @return  the DicEntry of the current Dicom Element
     */
-   gdcmDictEntry * gdcmHeaderEntry::GetDictEntry(void) { 
-      return entry;    
-   }; 
+   gdcmDictEntry * gdcmHeaderEntry::GetDictEntry(void) { return entry; }; 
 
    /**
     * \ingroup gdcmHeaderEntry
-    * \brief   tells us if the VR of the current Dicom Element is Unkonwn
-    * @return true if the VR is unkonwn
-    */ 
-   inline bool   gdcmHeaderEntry::IsVRUnknown(void) { 
-      return entry->IsVRUnknown(); 
-   };
+    * \brief   Sets the print level for the Dicom Header Elements
+    * \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
+    */
+   void SetPrintLevel(int level) { printLevel = level; };
+   void Print (std::ostream & os = std::cout); 
 
 private:
    // FIXME: In fact we should be more specific and use :
@@ -108,16 +111,17 @@ private:
                           // going on.
                           // *for internal* use only
        
-   bool ImplicitVr;       // Even when reading explicit vr files, some
+   bool ImplicitVR;       // Even when reading explicit vr files, some
                          // elements happen to be implicit. Flag them here
                          // since we can't use the entry->vr without breaking
                          // the underlying dictionary.
                          
 
    std::string  value;
-   void *voidArea;  // unsecure memory area to hold 'non string' values 
+   void *voidArea;   // unsecure memory area to hold 'non string' values 
                      // (ie : Lookup Tables, overlays)
    size_t Offset;    // Offset from the begining of file for direct user access
+   int printLevel;
 };
 
 //-----------------------------------------------------------------------------