]> Creatis software - gdcm.git/blobdiff - src/gdcmDocument.h
Oops.
[gdcm.git] / src / gdcmDocument.h
index 84b7224ddb51272e5b720c163715a70f00d94f84..7335eecc27df7684a359b064b5aed79e98566989 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/08/30 14:40:33 $
-  Version:   $Revision: 1.121 $
+  Date:      $Date: 2005/10/26 15:53:40 $
+  Version:   $Revision: 1.128 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,8 +30,6 @@
 
 namespace gdcm 
 {
-class ValEntry;
-class BinEntry;
 class SeqEntry;
 class Dict;
 
@@ -41,9 +39,10 @@ class Dict;
  */
 class GDCM_EXPORT Document : public ElementSet
 {
-public:
+   gdcmTypeMacro(Document);
 
-typedef std::list<Element> ListElements;
+public:
+   typedef std::list<DicomElement> ListElements;
 
 // Loading
    //Deprecated : use SetFileName() + Load()
@@ -71,6 +70,7 @@ typedef std::list<Element> ListElements;
    // System access (meaning endian related !?)
    uint16_t SwapShort(uint16_t);
    uint32_t SwapLong(uint32_t);
+   double SwapDouble(double);
    /// \brief  Unswaps back the bytes of 2-bytes long integer 
    ///         so they agree with the processor order.
    uint16_t UnswapShort(uint16_t a) { return SwapShort(a);}
@@ -92,7 +92,7 @@ typedef std::list<Element> ListElements;
 
 // Content entries
    virtual void LoadEntryBinArea(uint16_t group, uint16_t elem);
-   virtual void LoadEntryBinArea(BinEntry *entry);
+   virtual void LoadEntryBinArea(DataEntry *entry);
 
    void LoadDocEntrySafe(DocEntry *entry);
    void AddForceLoadElement(uint16_t group, uint16_t elem);
@@ -118,13 +118,12 @@ protected:
    // to instanciate from this class Document (only gdcm::File and
    // gdcm::DicomDir are meaningfull).
    Document();
-   Document( std::string const &filename );
    virtual ~Document();
    
    uint16_t ReadInt16() throw ( FormatError );
    uint32_t ReadInt32() throw ( FormatError );
    void     SkipBytes(uint32_t);
-   int ComputeGroup0002Length( FileType filetype );
+   int ComputeGroup0002Length( );
 
 // Variables
    /// Refering underlying filename.
@@ -193,11 +192,8 @@ private:
    void LoadDocEntry         (DocEntry *e, bool forceLoad = false);
    void FindDocEntryLength   (DocEntry *e) throw ( FormatError );
    uint32_t FindDocEntryLengthOBOrOW() throw( FormatUnexpected );
-   std::string FindDocEntryVR();
-   bool CheckDocEntryVR      (VRKey k);
-
-   std::string GetDocEntryValue  (DocEntry *entry);
-   std::string GetDocEntryUnvalue(DocEntry *entry);
+   VRKey FindDocEntryVR();
+   bool CheckDocEntryVR      (const VRKey &k);
 
    void SkipDocEntry          (DocEntry *entry);
    void SkipToNextDocEntry    (DocEntry *entry);