]> Creatis software - gdcm.git/commitdiff
doxygenation
authorjpr <jpr>
Mon, 22 Mar 2004 14:48:34 +0000 (14:48 +0000)
committerjpr <jpr>
Mon, 22 Mar 2004 14:48:34 +0000 (14:48 +0000)
16 files changed:
src/gdcmDicomDirElement.cxx
src/gdcmDicomDirElement.h
src/gdcmDictSet.h
src/gdcmDirList.cxx
src/gdcmException.cxx
src/gdcmFile.cxx
src/gdcmHeaderEntry.h
src/gdcmHeaderHelper.cxx
src/gdcmJpeg.cxx
src/gdcmJpeg12.cxx
src/gdcmJpeg2000.cxx
src/gdcmObject.h
src/gdcmParser.h
src/gdcmRLE.cxx
src/gdcmUtil.cxx
src/gdcmUtil.h

index 35746ab9cf49c483398088658872b4af01ef7cb3..c26b9d32ae87c4f4167f633a99dec15d32867ee1 100644 (file)
@@ -71,7 +71,7 @@
 
 /**
  * \ingroup gdcmDicomDirElement
- * \brief   destructor 
+ * \brief   canonical destructor 
  */
  gdcmDicomDirElement::~gdcmDicomDirElement() {
    DicomDirMetaList.clear();
index 2c9a561ebc2d0ce2dead6fb121cb88c096b40305..0099c1dfcef13d32076b94c8ecd158dc6a49491c 100644 (file)
@@ -79,10 +79,16 @@ public:
       {return(DicomDirImageList);};
 
 private:
+   /// gdcmElements chained list, related to the MetaElements of DICOMDIR
    ListDicomDirMetaElem    DicomDirMetaList;
+   /// gdcmElements chained list, related to the PatientElements of DICOMDIR
    ListDicomDirPatientElem DicomDirPatientList;
+   /// gdcmElements chained list, related to the StudyElements of DICOMDIR
    ListDicomDirStudyElem   DicomDirStudyList;
+   /// gdcmElements chained list, related to the SerieElements of DICOMDIR
    ListDicomDirSerieElem   DicomDirSerieList;
+   /// gdcmElements chained list, related to the ImageElements of DICOMDIR
+   
    ListDicomDirImageElem   DicomDirImageList;
 };
 
index e970b80bc899c89117f550cc6ba17c33130a5d23..2c480fff5971b89aafb541324273b2cc40fb4539 100644 (file)
@@ -57,7 +57,7 @@ private:
    DictSetHT Dicts;
    /// Directory path to dictionaries
    std::string DictPath;
-
+   /// H table for the on the fly created gdcmDictEntries  
    std::map<std::string,gdcmDictEntry *> virtualEntry;
 };
 
index 5339ebeb18730e88e5659e80cfdf154642ff2550..203c0a5f11b8cb31912e819e60061baa383e75fa 100644 (file)
    #include <unistd.h>
 #endif
 
+// ================= WARNING 
+// ================= DOXYGEN DOESN'T WORK FOR THIS FILE ?!?
+// =================
+
 // Constructor / Destructor
 /*
  * \ingroup gdcmDirList
  * \brief Constructor  
- * @param  dirName
- * @param  recursive 
+ * @param  dirName root directory name
+ * @param  recursive whether we want to explore recursively or not 
  */
 gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
 {
index d1120896d15e790ea1281e14ea66e77de07a2fb6..cc95e0cd554fe3cb7fa3d1cf6025ee46b6b2eaec 100644 (file)
@@ -10,8 +10,9 @@
 
 /*
  * \ingroup gdcmException
- * \brief 
- * @param   
+ * \brief constructor
+ * @param f
+ * @param msg  
  */
 gdcmException::gdcmException(const std::string &f, const std::string& msg) throw()
 #ifdef __GNUC__
@@ -28,8 +29,8 @@ catch(...) {
 
 /*
  * \ingroup gdcmException
- * \brief 
- * @param   
+ * \brief fatal
+ * @param from 
  */
  void gdcmException::fatal(const char *from) throw() {
   try {
@@ -51,8 +52,8 @@ catch(...) {
 
 /*
  * \ingroup gdcmException
- * \brief 
- * @param   
+ * \brief getName
+ * @return string
  */
  std::string gdcmException::getName() const throw() {
   try {
@@ -74,7 +75,7 @@ catch(...) {
        iname = std::string(iname, nb, std::string::npos);
       }
       return name;
-#else             // no class name demangling
+#else           // no class name demangling
       //name = typeid(*this).name();
       return "Exception";
 #endif
@@ -87,7 +88,7 @@ catch(...) {
 
 /*
  * \ingroup gdcmException
- * \brief 
+ * \brief gdcmException::operator
  * @param   
  */
  gdcmException::operator const char *() const throw() {
@@ -97,7 +98,7 @@ catch(...) {
 //-----------------------------------------------------------------------------
 /*
  * \ingroup gdcmException
- * \brief 
+ * \brief gdcmException::operator <<
  * @param   
  */
  std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
index 176b2c8c1b66abcc018d415854cc048593b3b88a..f802dcb86ae9a4515f136e6c9998d89a8ce73e19 100644 (file)
@@ -628,7 +628,7 @@ bool gdcmFile::WriteDcmExplVR (std::string fileName) {
  *        (a l'attention des logiciels cliniques 
  *        qui ne prennent en entrĂ©e QUE des images ACR ...
  * \warning if a DICOM_V3 header is supplied,
- *         groups < 0x0008 and shadow groups are ignored)
+ *         groups < 0x0008 and shadow groups are ignored
  * \warning NO TEST is performed on processor "Endiannity".
  * @param fileName name of the file to be created
  *                 (any already existing file is overwritten)
index cff9a758d1b2cf5beabd071c3a231f14f2f44748..0dab4ad9260ccdc5bca64c64384001fa9e9b23d3 100644 (file)
@@ -220,6 +220,7 @@ private:
    /// the underlying dictionary.      
    bool ImplicitVR;
                          
+   /// Header Entry value, stores as a std::string (VR will be used, later, to decode)
    std::string  value;
 
    /// unsecure memory area to hold 'non string' values 
@@ -227,7 +228,7 @@ private:
    void *voidArea;
    /// Offset from the begining of file for direct user access              
    size_t Offset; 
-      
+   /// How many details are to be printed (value : 0,1,2)      
    int printLevel;
 };
 
index 4317a6f8caf9694dabc8616eb8d2e52baf9cd9a4..9cdab5708e766616c3496dad0a3857f03b8e7a7a 100644 (file)
@@ -122,7 +122,7 @@ std::string gdcmHeaderHelper::GetPixelType() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0028,0030 : Pixel Spacing
-  *             else 1.
+  *             else 1.0
   * @return X dimension of a pixel
   */
 float gdcmHeaderHelper::GetXSpacing() {
@@ -146,7 +146,7 @@ float gdcmHeaderHelper::GetXSpacing() {
 /**
   * \ingroup gdcmHeaderHelper
   * \brief gets the info from 0028,0030 : Pixel Spacing
-  *             else 1.
+  *             else 1.0
   * @return Y dimension of a pixel
   */
 float gdcmHeaderHelper::GetYSpacing() {
@@ -171,7 +171,7 @@ float gdcmHeaderHelper::GetYSpacing() {
   *\ingroup gdcmHeaderHelper
   *\brief gets the info from 0018,0088 : Space Between Slices
   *                else from 0018,0050 : Slice Thickness
-  *                else 1.
+   *                else 1.0
   * @return Z dimension of a voxel-to be
   */
 float gdcmHeaderHelper::GetZSpacing() {
index 15bdd1a17b3926d1fc14b29bc3766f6eb79a435c..1f6e45f44609cc7889f66944597a9f8f61de8933 100644 (file)
@@ -147,6 +147,16 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo) {
  * Sample routine for JPEG decompression.  We assume that the source file name
  * is passed in.  We want to return 1 on success, 0 on error.
  */
+ /**
+ * \ingroup gdcmFile
+ * \brief   routine for JPEG decompression 
+ * @param fp pointer to an already open file descriptor 
+ *                      8 significant bits per pixel
+ * @param image_buffer to receive uncompressed pixels
+ * @return 1 on success, 0 on error
+ */
 //GLOBAL(bool)
 bool gdcmFile::gdcm_read_JPEG_file (FILE *fp,void * image_buffer) {
    char *pimage;
index da5be5d8af30efdde3c21466637aff37181615b6..f67a3fa6af190c1313dde90a9f596af36d94f886 100644 (file)
@@ -161,6 +161,16 @@ my_error_exit (j_common_ptr cinfo) {
  * Sample routine for JPEG decompression.  We assume that the source file name
  * is passed in.  We want to return 1 on success, 0 on error.
  */
+ /**
+ * \ingroup gdcmFile
+ * \brief   routine for JPEG decompression 
+ * @param fp pointer to an already open file descriptor 
+ *                      12 significant bits per pixel
+ * @param image_buffer to receive uncompressed pixels
+ * @return 1 on success, 0 on error
+ */
 bool gdcmFile::gdcm_read_JPEG_file12 (FILE *fp,void * image_buffer) {
    char *pimage;
 
index 2d60fe09b816bb6973715c8e4f65dcaf78ecc098..1c9c8e499cee9bff82b7c5936fad94392654cc43 100644 (file)
@@ -4,6 +4,16 @@
 #include "gdcmFile.h"
 
 //-----------------------------------------------------------------------------
+ /**
+ * \ingroup gdcmFile
+ * \brief   routine for JPEG decompression 
+ * @param fp pointer to an already open file descriptor 
+ *                      JPEG2000 encoded image
+ * @param image_buffer to receive uncompressed pixels
+ * @return 1 on success, 0 on error
+ * @warning : not yet made
+ */
+
 bool gdcmFile::gdcm_read_JPEG2000_file (FILE *fp,void * image_buffer) {
    printf("Sorry JPEG 2000 File not yet taken into account\n");
    return false;
index 9d2eca19d2c5d06265ebd3afa6850648af364593..7e20d9cc9156a1c85ef02b799dc4f2d397bedb8d 100644 (file)
@@ -17,10 +17,6 @@ typedef std::list<gdcmObject *> ListContent;
 class GDCM_EXPORT gdcmObject 
 {
 public:
-   gdcmObject(ListTag::iterator begin,ListTag::iterator end,
-              TagHeaderEntryHT *ptagHT, ListTag *plistEntries); 
-   ~gdcmObject(void);
-
    /**
     * \ingroup gdcmParser
     * \brief   Sets the print level for the Dicom Header 
@@ -58,6 +54,11 @@ public:
        { return(endObj);  }
 
 protected:
+ // constructor and destructor are protected to avoid end user to instanciate this class.
+   gdcmObject(ListTag::iterator begin,ListTag::iterator end,
+              TagHeaderEntryHT *ptagHT, ListTag *plistEntries); 
+   ~gdcmObject(void);
+
 
 void FillObject(std::list<gdcmElement> elemList);
 
index 4220bfba3955b4dbcc8d2fc852cdc1082246ae56..8335d9f7362cd97bb85bc6a601635659965e53f7 100644 (file)
@@ -35,12 +35,6 @@ typedef std::map<GroupKey, int> GroupHT;
 class GDCM_EXPORT gdcmParser
 {
 public:
-   gdcmParser(bool exception_on_error  = false);
-   gdcmParser(const char *inFilename, 
-              bool  exception_on_error = false, 
-              bool  enable_sequences   = false,
-             bool  ignore_shadow      = false);
-   virtual ~gdcmParser(void);
 
 // Print
    /**
@@ -126,6 +120,14 @@ public:
    guint32 UnswapLong(guint32);  // needed by gdcmFile
 
 protected:
+// constructor and destructor are protected to forbid end user to instanciate
+// class gdcmParser (only gdcmHeader and gdcmDicomDir are meaningfull)
+   gdcmParser(bool exception_on_error  = false);
+   gdcmParser(const char *inFilename, 
+              bool  exception_on_error = false, 
+              bool  enable_sequences   = false,
+             bool  ignore_shadow      = false);
+   virtual ~gdcmParser(void);
 // Entry
    int CheckIfEntryExistByNumber(guint16 Group, guint16 Elem ); // int !
    virtual std::string GetEntryByName    (std::string tagName);
@@ -177,8 +179,11 @@ protected:
    */
    FileType filetype;  
 
+/// after opening the file, we read HEADER_LENGTH_TO_READ bytes.
    static const unsigned int HEADER_LENGTH_TO_READ; 
+/// Elements whose value is longer than MAX_SIZE_LOAD_ELEMENT_VALUE are NOT loaded
    static const unsigned int MAX_SIZE_LOAD_ELEMENT_VALUE;
+/// Elements whose value is longer than  MAX_SIZE_PRINT_ELEMENT_VALUE are NOT printed  
    static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE;
 
 protected:
index 4387ebcfd78bb1460a1b434c9c886a81399184ab..784b5f593783122b116e1e806d44550054a4d41f 100644 (file)
@@ -12,8 +12,7 @@
  * \brief     Reads a 'Run Length Encoded' Dicom encapsulated file
  * @param     fp already open File Pointer
  * @param     image_buffer destination Address (in caller's memory space) 
- *            at which the pixel data should be copied
- *   
+ *            at which the pixel data should be copied 
  * @return    Boolean 
  */
 bool gdcmFile::gdcm_read_RLE_file (FILE *fp,void * image_buffer) {
index 5b5243de71dfc5e0cce0752de859131744817082..897899eb47db15955ea9bc67f2edf50e05c5cf4c 100644 (file)
 gdcmDebug dbg;
 
 //-----------------------------------------------------------------------------
+/**
+ * \ingroup gdcmDebug
+ * \brief   constructor
+ * @param level debug level
+ */ 
+
 gdcmDebug::gdcmDebug(int level) {
    DebugLevel = level;
 }
 
+/**
+ * \ingroup gdcmDebug
+ * \brief   Verbose 
+ * @param Level level
+ * @param Msg1 first message part
+ * @param Msg2 second message part 
+ */
 void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) {
    if (Level > DebugLevel)
       return ;
    std::cerr << Msg1 << ' ' << Msg2 << std::endl;
 }
 
+/**
+ * \ingroup gdcmDebug
+ * \brief   Error 
+ * @param Test test
+ * @param Msg1 first message part
+ * @param Msg2 second message part 
+ */
 void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) {
    if (!Test)
       return;
@@ -28,13 +48,28 @@ void gdcmDebug::Error( bool Test, const char * Msg1, const char * Msg2) {
    Exit(1);
 }
 
+/**
+ * \ingroup gdcmDebug
+ * \brief   Error 
+ * @param Msg1 first message part
+ * @param Msg2 second message part
+ * @param Msg3 Third message part  
+ */
 void gdcmDebug::Error(const char* Msg1, const char* Msg2,
                       const char* Msg3) {
    std::cerr << Msg1 << ' ' << Msg2 << ' ' << Msg3 << std::endl;
    Exit(1);
 }
 
-void gdcmDebug::Assert(int Level, bool Test,
+/**
+ * \ingroup gdcmDebug
+ * \brief   Assert 
+ * @param Level level 
+ * @param Test test
+ * @param Msg1 first message part
+ * @param Msg2 second message part
+ */
+ void gdcmDebug::Assert(int Level, bool Test,
                  const char * Msg1, const char * Msg2) {
    if (Level > DebugLevel)
       return ;
@@ -42,6 +77,11 @@ void gdcmDebug::Assert(int Level, bool Test,
       std::cerr << Msg1 << ' ' << Msg2 << std::endl;
 }
 
+/**
+ * \ingroup gdcmDebug
+ * \brief   Exit 
+ * @param a return code 
+ */
 void gdcmDebug::Exit(int a) {
 #ifdef __GNUC__
    std::exit(a);
@@ -52,12 +92,22 @@ void gdcmDebug::Exit(int a) {
 }
 
 //-----------------------------------------------------------------------------
+/// Pointer to a container, holding *all* the Dicom Dictionaries
 gdcmDictSet         *gdcmGlobal::Dicts  = (gdcmDictSet *)0;
+/// Pointer to a H table containing the 'Value Representations'
 gdcmVR              *gdcmGlobal::VR     = (gdcmVR *)0;
+/// Pointer to a H table containing the Transfer Syntax codes and their english description 
 gdcmTS              *gdcmGlobal::TS     = (gdcmTS *)0;
+/// Pointer to a H table containing the Dicom Elements necessary to describe each part of a DICOMDIR 
 gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
+/// gdcm Glob
 gdcmGlobal gdcmGlob;
 
+
+/**
+ * \ingroup gdcmGlobal
+ * \brief   constructor : populates the
+ */
 gdcmGlobal::gdcmGlobal(void) {
    if (VR || TS || Dicts || ddElem)
       dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
@@ -67,6 +117,10 @@ gdcmGlobal::gdcmGlobal(void) {
    ddElem = new gdcmDicomDirElement();
 }
 
+/**
+ * \ingroup gdcmGlobal
+ * \brief   canonical destructor 
+ */
 gdcmGlobal::~gdcmGlobal() {
    delete Dicts;
    delete VR;
@@ -125,7 +179,10 @@ void Tokenize (const std::string& str,
 
 
 ///////////////////////////////////////////////////////////////////////////
-// to prevent a flashing screen when non-printable character
+/*
+ * \brief  to prevent a flashing screen when non-printable character
+ * @param 
+ */
 char *_cleanString(char *v) {
    char *d;
    int i, l;
@@ -140,7 +197,10 @@ char *_cleanString(char *v) {
 }
 
 ///////////////////////////////////////////////////////////////////////////
-// to prevent a flashing screen when non-printable character
+/*
+ * \brief   to prevent a flashing screen when non-printable character
+ * @param 
+ */
 std::string _CreateCleanString(std::string s) {
    std::string str=s;
 
@@ -179,6 +239,7 @@ const std::string SEPARATOR = "/";
 ///////////////////////////////////////////////////////////////////////////
 /*
  * \brief   Get the (directory) path from a full path file name
+ * @param 
  */
 std::string GetPath(std::string &fullName)
 {
@@ -194,6 +255,7 @@ std::string GetPath(std::string &fullName)
 ///////////////////////////////////////////////////////////////////////////
 /*
  * \brief   Get the (last) name of a full path file name
+ * @param 
  */
 std::string GetName(std::string &fullName)
 {   
index af4a67688146c8b3b28b1637cbb184a6d0080f39..4dcbc4fbf7ad0915955f5416222f823ddd7142d8 100644 (file)
  */
 class gdcmDebug {
 public:
-       gdcmDebug(int level = GDCM_DEBUG);
+   gdcmDebug(int level = GDCM_DEBUG);
 
-       void SetDebug (int i) {DebugLevel = i;}
+  /**
+    * \ingroup gdcmDebug
+    * \brief   sets the debug level 
+    * @param i debug level to be set
+  */ 
+   void SetDebug (int i) 
+      {DebugLevel = i;}
 
    void Verbose(int, const char*, const char* ="");
-       void Error(bool, const char*,  const char* ="");
-       void Error(const char*, const char* ="", const char* ="");
+   void Error(bool, const char*,  const char* ="");
+   void Error(const char*, const char* ="", const char* ="");
 
-       void Assert(int, bool, const char*, const char*);
-       void Exit(int);
+   void Assert(int, bool, const char*, const char*);
+   void Exit(int);
 
 private:
-       int DebugLevel;
+/// warning message level to be displayed
+   int DebugLevel;
 };
 
 //-----------------------------------------------------------------------------
@@ -65,18 +72,18 @@ private:
 //-----------------------------------------------------------------------------
 std::istream & eatwhite(std::istream & is);
 
-void Tokenize (const std::string& str,
-               std::vector<std::string>& tokens,
-               const std::string& delimiters = " ");
+   void Tokenize (const std::string& str,
+                  std::vector<std::string>& tokens,
+                  const std::string& delimiters = " ");
 
-extern gdcmDebug dbg;
+   extern gdcmDebug dbg;
 
-char *_cleanString(char *v);
-std::string _CreateCleanString(std::string s);
+   char *_cleanString(char *v);
+   std::string _CreateCleanString(std::string s);
 
-void NormalizePath (std::string &name);
-std::string GetPath(std::string &fullName);
-std::string GetName(std::string &fullName);
+   void NormalizePath (std::string &name);
+   std::string GetPath(std::string &fullName);
+   std::string GetName(std::string &fullName);
 //-----------------------------------------------------------------------------
 #endif