//-----------------------------------------------------------------------------
/*
- * \defgroup gdcmHeader
- * \brief
+ * \defgroup gdcmParser
+ * \brief used by both gdcmHeader and gdcmDicomDir
*/
class GDCM_EXPORT gdcmParser
{
IterHT GetHeaderEntrySameNumber(guint16 group, guint16 element);
// IterHT GetHeaderEntrySameName (std::string Name);
-
void LoadHeaderEntrySafe(gdcmHeaderEntry *);
void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
static const unsigned int HEADER_LENGTH_TO_READ;
static const unsigned int MAX_SIZE_LOAD_ELEMENT_VALUE;
+ static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE;
protected:
int enableSequences;
private:
// Read
- void Parse(bool exception_on_error = false) throw(gdcmFormatError);
+ bool ParseHeader(bool exception_on_error = false) throw(gdcmFormatError);
void LoadHeaderEntries (void);
void LoadHeaderEntry (gdcmHeaderEntry *);
void SkipBytes(guint32);
void Initialise(void);
- void CheckSwap(void);
+ bool CheckSwap(void);
void SwitchSwapToBigEndian(void);
void SetMaxSizeLoadEntry(long);
+ void SetMaxSizePrintEntry(long);
- // Dict
+ // DictEntry related utilities
gdcmDictEntry *GetDictEntryByName (std::string Name);
gdcmDictEntry *GetDictEntryByNumber(guint16, guint16);
-
- // HeaderEntry related utilities
- gdcmHeaderEntry *ReadNextHeaderEntry (void);
- gdcmHeaderEntry *NewHeaderEntryByNumber(guint16 group,
- guint16 element);
- gdcmHeaderEntry *NewHeaderEntryByName (std::string Name);
gdcmDictEntry *NewVirtualDictEntry(guint16 group,
guint16 element,
std::string vr = "Unknown",
std::string fourth = "Unknown",
std::string name = "Unknown");
gdcmDictEntry *NewVirtualDictEntry(gdcmHeaderEntry *);
+
+ // HeaderEntry related utilities
+ gdcmHeaderEntry *ReadNextHeaderEntry (void);
+ gdcmHeaderEntry *NewHeaderEntryByNumber(guint16 group,
+ guint16 element);
+ gdcmHeaderEntry *NewHeaderEntryByName (std::string Name);
+
- // Deprecated (Not used)
- gdcmHeaderEntry *NewManualHeaderEntryToPubDict(std::string NewTagName,
- std::string VR);
+ // Deprecated (Not used) --> commented out
+ //gdcmHeaderEntry *NewManualHeaderEntryToPubDict(std::string NewTagName,
+ // std::string VR);
guint32 GenerateFreeTagKeyInGroup(guint16 group);
// Refering underlying filename.
// 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 treshold 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;
+
};
//-----------------------------------------------------------------------------