]> Creatis software - gdcm.git/blobdiff - src/gdcm.h
* python/setup.py : bug fix concerning install under windows
[gdcm.git] / src / gdcm.h
index c4737561aa279a4ee532a1a00a47a72c4acec373..aea4edc5c3a450ef9a9d4570a0b5af1ee7b45e92 100644 (file)
 // problems appears at loading of _gdcm.[so/dll]). So, simply uncomment
 // the declaration once you provided the definition of the method...
 
+#ifndef GDCM_H
+#define GDCM_H
+
 #include <string>
-#ifdef _MSC_VER
-using namespace std;  // string type lives in the std namespace on VC++
-#endif
+using namespace std;
 
 #include <iostream>
 #include <stddef.h>   // For size_t
 #include <stdio.h>    // FIXME For FILE on GCC only
 #include <list>
 #include <map>
+#include "gdcmException.h"
+
 
                      // The requirement for the hash table (or map) that
                       // we shall use:
@@ -38,8 +41,8 @@ using namespace std;  // string type lives in the std namespace on VC++
                       //    which should be around 4500 entries which is the
                       //    average dictionary size (said JPR)
                       //
-                      // En fait, je disais que dans LE Directory Dicom (dans son etat 2002)
-                      // il y a 1600 entrees.
+                      // En fait, je disais que dans LE Directory Dicom (dans son etat 2001)
+                      // il y a +/- 1600 entrees.
                       // Une valeur raisonable pour un  majorant du nombre d'entrees
                       // dans une entete DICOM d'une image semble semble etre 300
                       // Si on 'decortique' les elements SQ (ce qui ne semble pas etre fait pour le moment)
@@ -258,7 +261,11 @@ public:
        TagElValueHT & GetTagHt(void);  
        
        int SetElValueByNumber(string content, guint32 group, guint32 element);
-       int SetElValueByName(string content, string TagName);
+       int SetElValueByName  (string content, string TagName);
+       
+       int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
+       int SetElValueLengthByName  (guint32 l, string TagName);
+
 };
 
 ////////////////////////////////////////////////////////////////////////////
@@ -364,8 +371,10 @@ protected:
        int anonymize(ostream&);  // FIXME : anonymize should be a friend ?
 public:
        void LoadElements(void);
-       virtual void ParseHeader(void);
-       gdcmHeader(const char* filename);
+       virtual void ParseHeader(bool exception_on_error = false)
+         throw(gdcmFormatError);
+       gdcmHeader(const char *filename, bool exception_on_error = false)
+         throw(gdcmFileError);
        virtual ~gdcmHeader();
        
        size_t GetPixelOffset(void);
@@ -491,11 +500,11 @@ public:
        // Copies (at most MaxSize bytes) of data to caller's memory space.
        // Returns an error code on failure (if MaxSize is not big enough)
        
-       int PutImageDataHere(void* destination, size_t MaxSize );
+       int GetImageDataIntoVector(void* destination, size_t MaxSize );
        
        // Question :
        //
-       //      GetImageData et PutImageDataHere
+       //      GetImageData et GetImageDataIntoVector
        // Get et Put pour 2 fonctions qui font presque la meme chose :-(
        //
        
@@ -518,7 +527,7 @@ public:
        // Ca sera à l'utilisateur d'appeler son Reader correctement
                
        int WriteRawData (string nomFichier);
-       int WriteDcm (string nomFichier);
+       int WriteDcm     (string nomFichier);
 };
 
 //
@@ -540,3 +549,4 @@ public:
 //class gdcmMultiFrame : gdcmFile;
 
 
+#endif // #ifndef GDCM_H