X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmParser.h;h=be88d134b5a3972431a1267aad015bc3440a2351;hb=8402492c91eb411888fb7e220e0f02b3d94c59db;hp=74db3d233c6fd53d53f5360a01ef42217fbdb442;hpb=a547ed6d41e444153f4bea38c47810fe7f50d88e;p=gdcm.git diff --git a/src/gdcmParser.h b/src/gdcmParser.h index 74db3d23..be88d134 100644 --- a/src/gdcmParser.h +++ b/src/gdcmParser.h @@ -98,6 +98,9 @@ public: // System access inline int GetSwapCode(void) { return sw; } + guint16 GetGrPixel(void) {return GrPixel;} + guint16 GetNumPixel(void) {return NumPixel;} + guint16 SwapShort(guint16); // needed by gdcmFile guint32 SwapLong(guint32); // needed by gdcmFile guint16 UnswapShort(guint16); // needed by gdcmFile @@ -131,7 +134,7 @@ protected: void LoadHeaderEntrySafe(gdcmHeaderEntry *); void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR); - void WriteEntries(FileType type, FILE *); + void WriteEntries(FILE *_fp,FileType type); // Variables FILE *fp; @@ -142,12 +145,19 @@ protected: static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE; protected: + TagHeaderEntryHT tagHT; // H Table (multimap), to provide fast access + ListTag listEntries; // chained list, to keep the 'spacial' ordering + int enableSequences; int printLevel; - TagHeaderEntryHT tagHT; // H Table (multimap), to provide fast access - ListTag listEntries; // chained list, to keep the 'spacial' ordering - + // For some ACR-NEMA images, it's *not* 7fe0, 0010 ... + guint16 GrPixel; + guint16 NumPixel; + // some files may contain icons; GrPixel,NumPixel appears several times + // Let's remember how many times! + int countGrPixel; + private: // Read bool ParseHeader(bool exception_on_error = false) throw(gdcmFormatError); @@ -183,9 +193,9 @@ private: gdcmDictEntry *GetDictEntryByNumber(guint16, guint16); gdcmDictEntry *NewVirtualDictEntry(guint16 group, guint16 element, - std::string vr = "Unknown", - std::string fourth = "Unknown", - std::string name = "Unknown"); + std::string vr = "unkn", + std::string fourth = "unkn", + std::string name = "unkn"); gdcmDictEntry *NewVirtualDictEntry(gdcmHeaderEntry *); // HeaderEntry related utilities @@ -227,7 +237,7 @@ private: // order no to polute the screen output. By default, // this upper bound is fixed to 64 bytes. guint32 MaxSizePrintEntry; - + }; //-----------------------------------------------------------------------------