]> Creatis software - gdcm.git/commitdiff
doxygenation
authorjpr <jpr>
Mon, 23 Feb 2004 17:32:10 +0000 (17:32 +0000)
committerjpr <jpr>
Mon, 23 Feb 2004 17:32:10 +0000 (17:32 +0000)
gdcmPython/gdcm.i
src/gdcmHeaderEntry.h
vtk/vtkGdcmReader.cxx

index 439884eacab0bef3bae6e31f182a7a77b64cab5e..9c04acd1aba52351f4c2fc275ac15f67b2615c00 100644 (file)
 #include "gdcmObject.h"
 #include "gdcmDicomDir.h"
 #include "gdcmDicomDirElement.h"
-#include "gdcmMeta.h"
-#include "gdcmPatient.h"
-#include "gdcmStudy.h"
-#include "gdcmSerie.h"
-#include "gdcmImage.h"
+#include "gdcmDicomDirMeta.h"
+#include "gdcmDicomDirPatient.h"
+#include "gdcmDicomDirStudy.h"
+#include "gdcmDicomDirSerie.h"
+#include "gdcmDicomDirImage.h"
 
 using namespace std;
 
@@ -170,13 +170,13 @@ extern gdcmGlobal gdcmGlob;
 }
 
 ////////////////////////////////////////////////////////////////////////////
-%typemap(out) ListPatient & {
+%typemap(out) ListDicomDirPatient & {
        PyObject* NewItem = (PyObject*)0;
        $result = PyList_New(0); // The result of this typemap
 
-       for (list<gdcmPatient *>::iterator New = ($1)->begin();
+       for (list<gdcmDicomDirPatient *>::iterator New = ($1)->begin();
            New != ($1)->end(); ++New) {
-               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmPatient,1);
+               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirPatient,1);
                PyList_Append($result, NewItem);
        }
 }
@@ -185,9 +185,9 @@ extern gdcmGlobal gdcmGlob;
        PyObject* NewItem = (PyObject*)0;
        $result = PyList_New(0); // The result of this typemap
 
-       for (list<gdcmStudy *>::iterator New = ($1)->begin();
+       for (list<gdcmDicomDirStudy *>::iterator New = ($1)->begin();
            New != ($1)->end(); ++New) {
-               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmStudy,1);
+               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirStudy,1);
                PyList_Append($result, NewItem);
        }
 }
@@ -196,20 +196,20 @@ extern gdcmGlobal gdcmGlob;
        PyObject* NewItem = (PyObject*)0;
        $result = PyList_New(0); // The result of this typemap
 
-       for (list<gdcmSerie *>::iterator New = ($1)->begin();
+       for (list<gdcmDicomDirSerie *>::iterator New = ($1)->begin();
            New != ($1)->end(); ++New) {
-               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmSerie,1);
+               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirSerie,1);
                PyList_Append($result, NewItem);
        }
 }
 
-%typemap(out) ListImage & {
+%typemap(out) ListDicomDirImage & {
        PyObject* NewItem = (PyObject*)0;
        $result = PyList_New(0); // The result of this typemap
 
-       for (list<gdcmImage *>::iterator New = ($1)->begin();
+       for (list<gdcmDicomDirImage *>::iterator New = ($1)->begin();
            New != ($1)->end(); ++New) {
-               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmImage,1);
+               NewItem = SWIG_NewPointerObj(*New,SWIGTYPE_p_gdcmDicomDirImage,1);
                PyList_Append($result, NewItem);
        }
 }
@@ -258,8 +258,8 @@ extern gdcmGlobal gdcmGlob;
 %include "gdcmObject.h"
 %include "gdcmDicomDir.h"
 %include "gdcmDicomDirElement.h"
-%include "gdcmMeta.h"
-%include "gdcmPatient.h"
-%include "gdcmStudy.h"
-%include "gdcmSerie.h"
-%include "gdcmImage.h"
+%include "gdcmDicomDirMeta.h"
+%include "gdcmDicomDirPatient.h"
+%include "gdcmDicomDirStudy.h"
+%include "gdcmDicomDirSerie.h"
+%include "gdcmDicomDirImage.h"
index 577ff569ab3cf295770a659551fc31d4397e8b1a..0bb7c5938eaa9b1408a9a09114be0d82f90728f1 100644 (file)
@@ -17,28 +17,128 @@ class gdcmHeader;
 class GDCM_EXPORT gdcmHeaderEntry {
 public:
    gdcmHeaderEntry(gdcmDictEntry*);
-   
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the Dicom Group number of the current Dicom Header Entry
+    * @return 
+    */    
    inline guint16      GetGroup(void)     { return entry->GetGroup();  };
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the Dicom Element number of the current Dicom Header Entry
+    * @return 
+    */ 
    inline guint16      GetElement(void)   { return entry->GetElement();};
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the 'key' of the current Dicom Header Entry
+    * @return 
+    */
    inline std::string  GetKey(void)       { return entry->GetKey();    };
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the 'Name' '(e.g. "Patient's Name")
+    *          found in the Dicom Dictionnary
+    *          of the current Dicom Header Entry
+    * @return
+    */ 
    inline std::string  GetName(void)      { return entry->GetName();   };
+
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the 'Value Representation' 
+    *          (e.g. "PN" : Person Name, "SL" : Signed Long),
+    *          found in the Dicom Header or in the Dicom Dictionnary,
+    *          of the current Dicom Header Entry
+    * @return
+    */
    inline std::string  GetVR(void)        { return entry->GetVR();     };
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the 'Value' (e.g. "Dupond Marcel")
+    *          converted into a 'string', if it's stored as an integer
+    *          in the Dicom Header
+    *          of the current Dicom Header Entry
+    * @return
+    */ 
    inline std::string  GetValue(void)     { return value;              };
-
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the area value of the current Dicom Header Entry
+    *          when it's not string-translatable
+    *          (e.g : a LUT table)         
+    * @return
+    */    
    inline void *       GetVoidArea(void)  { return voidArea;           };
-   inline size_t       GetOffset(void)    { return Offset;             };   
-   inline guint32      GetLength(void)    { return UsableLength;       };   
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns offset (since the beginning of the file,
+    *          including the File Pramble, if any)
+    *          of the value of the current Dicom Header Entry
+    * \warning : offset of the *value*, not of the Dicom Header Entry
+    *  
+    * @return
+    */    
+   inline size_t       GetOffset(void)    { return Offset;             };
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the actual value length of the current Dicom Header Entry
+    * \warning this value is not *allways* the one stored in the Dicom Header
+    *          in case on well knowned buggs
+    * @return
+    */        
+   inline guint32      GetLength(void)    { return UsableLength;       };
+    
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   returns the 'read length' of the current Dicom Header Entry
+    * \warning this value is the one stored in the Dicom Header
+    *          but not mandatoryly the one thats's used
+    *          (in case on SQ, or delimiters, the usable length is set to zero)
+    * @return
+    */     
+   inline guint32      GetReadLength(void) { return ReadLength;};
 
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets the 'Value Representation' of the current Dicom Header Entry
+    */   
    inline void         SetVR(std::string v)      { entry->SetVR(v);          };    
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets both 'Read Length' and 'Usable Length'
+    *          of the current Dicom Header Entry
+    */ 
    inline void         SetLength(guint32 l)      { ReadLength=UsableLength=l;};
       
    // The following 3 members, for internal use only ! 
-   inline void         SetReadLength(guint32 l)  { ReadLength   = l; };        
-   inline void         SetUsableLength(guint32 l){ UsableLength = l; };        
-   inline guint32      GetReadLength(void)       { return ReadLength;};
-       
+   
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets only 'Read Length' (*not* 'Usable Length')
+    *          of the current Dicom Header Entry
+    */ 
+   inline void         SetReadLength(guint32 l)  { ReadLength   = l; };
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets only 'Usable Length' (*not* 'Read Length')
+    *          of the current Dicom Header Entry
+    */         
+   inline void         SetUsableLength(guint32 l){ UsableLength = l; }; 
+       
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets the value (string)
+    *          of the current Dicom Header Entry
+    */         
    inline void         SetValue(std::string val) { value = val;      };
-   inline void         SetVoidArea(void * area)  { voidArea = area;  };
+
+   /**
+    * \ingroup gdcmHeaderEntry
+    * \brief   Sets the value (non string)
+    *          of the current Dicom Header Entry
+    */ 
+    inline void         SetVoidArea(void * area)  { voidArea = area;  };
    
    /**
     * \ingroup gdcmHeaderEntry
@@ -100,8 +200,8 @@ private:
 // Variables
    gdcmDictEntry *entry;
    guint32 UsableLength;  // Updated from ReadLength, by FixFoungLentgh()
-                          // for fixing a bug in the header or helping
-                          // the parser going on 
+                          // for fixing a bug in the header 
+                          // or helping the parser going on 
                          
    guint32 ReadLength;    // Length actually read on disk
                           // (before FixFoundLength)
index 4b652a37be579ec78dbb2464e44e9743df0f5e9c..139623d32626e1a09105180b35f8011271df8928 100644 (file)
@@ -209,7 +209,11 @@ void vtkGdcmReader::ExecuteInformation()
       vtkDebugMacro("32 bits signed image");
       this->SetDataScalarTypeToInt();
    }
-
+   else if ( ImageType == "FD" )
+   {
+      vtkDebugMacro("64 bits Double image");
+      this->SetDataScalarTypeToDouble();
+   }
    //Set number of scalar components:
    this->SetNumberOfScalarComponents(this->NumComponents);