X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmParser.h;h=6f6c30bbf8557bf736b79df91c9f2a84d48a4a9f;hb=c5618e6b8276e1b21bbea354fe8bcba3c78eb4bd;hp=c9306c394530d83dcc8871d7ed5517d623a47984;hpb=4f48626ba6d2dc26d40f07b780b0fdb5fcc04911;p=gdcm.git diff --git a/src/gdcmParser.h b/src/gdcmParser.h index c9306c39..6f6c30bb 100644 --- a/src/gdcmParser.h +++ b/src/gdcmParser.h @@ -4,6 +4,7 @@ #define GDCMPARSER_H #include "gdcmCommon.h" + #include "gdcmVR.h" #include "gdcmTS.h" #include "gdcmException.h" @@ -13,6 +14,8 @@ #include #include + + //----------------------------------------------------------------------------- typedef std::string VRKey; typedef std::string VRAtr; @@ -37,25 +40,25 @@ private: /// Public dictionary used to parse this header gdcmDict *RefPubDict; - /// Optional "shadow dictionary" (private elements) used to parse + /// \brief Optional "shadow dictionary" (private elements) used to parse /// this header gdcmDict *RefShaDict; /// Equals 1 if a gdcmHeaderEntry was added post parsing int wasUpdated; - /// Equals =1 if user wants to skip shadow groups while parsing + /// \brief Equals =1 if user wants to skip shadow groups while parsing /// (to save space) int ignoreShadow; - /// Size threshold above which an element value will NOT be loaded in - /// memory (to avoid loading the image/volume itself). By default, + /// \brief Size threshold above which an element value will NOT be loaded + /// in memory (to avoid loading the image/volume itself). By default, /// this upper bound is fixed to 1024 bytes (which might look reasonable /// when one considers the definition of the various VR contents). guint32 MaxSizeLoadEntry; - /// Size threshold above which an element value will NOT be *printed* in - /// order no to polute the screen output. By default, this upper bound + /// \brief Size threshold above which an element value will NOT be *printed* + /// in order no to polute the screen output. By default, this upper bound /// is fixed to 64 bytes. guint32 MaxSizePrintEntry; @@ -63,7 +66,7 @@ protected: /// Refering underlying filename. std::string filename; - /// SWap code (e.g. Big Endian, Little Endian, Bad Big Endian, + /// \brief SWap code (e.g. Big Endian, Little Endian, Bad Big Endian, /// Bad Little Endian) according to the processor Endianity and /// what is written on disc. int sw; @@ -77,12 +80,15 @@ protected: /// 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 + /// \brief 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 + /// \brief Elements whose value is longer than MAX_SIZE_PRINT_ELEMENT_VALUE /// are NOT printed. + /// \todo Currently not used since collides with #define in + /// \ref gdcmHeaderEntry.cxx. See also + /// \ref gdcmParser::SetMaxSizePrintEntry() static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE; /// Hash Table (multimap), to provide fast access @@ -91,10 +97,10 @@ protected: /// Chained list, to keep the 'spacial' ordering ListTag listEntries; - /// will be set 1 if user asks to 'go inside' the 'sequences' (VR = "SQ") + /// Will be set 1 if user asks to 'go inside' the 'sequences' (VR = "SQ") int enableSequences; - /// Amount of printed details for each Header Entry (Dicom Element): + /// \brief Amount of printed details for each Header Entry (Dicom Element): /// 0 : stands for the least detail level. int printLevel; @@ -105,7 +111,9 @@ public: /// Canonical Printing method (see also gdcmParser::SetPrintLevel) virtual void Print (std::ostream &os = std::cout) {PrintEntry(os);}; - virtual void PrintEntry (std::ostream &os = std::cout); + virtual void PrintEntry (std::ostream &os = std::cout); + + // the 2 following will be merged virtual void PrintPubDict (std::ostream &os = std::cout); virtual void PrintShaDict (std::ostream &os = std::cout); @@ -193,9 +201,8 @@ protected: private: // Read - bool ParseHeader(bool exception_on_error = false) throw(gdcmFormatError); + bool LoadHeaderEntries(bool exception_on_error = false) throw(gdcmFormatError); - void LoadHeaderEntries (void); void LoadHeaderEntry (gdcmHeaderEntry *); void FindHeaderEntryLength(gdcmHeaderEntry *); void FindHeaderEntryVR (gdcmHeaderEntry *);