X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeader.h;h=91b92549255f7137735515769cb708e3ccb133a5;hb=45c3270f0afbdb22a10da1fa2c993125ca960304;hp=ec1943ba30f741e27974276c3489b9118dbd02d9;hpb=df0e00d2604b7406cf0041e8b897e9338403835e;p=gdcm.git diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index ec1943ba..91b92549 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -47,9 +47,9 @@ private: gdcmDict* RefShaDict; /// ELement VALueS parsed with the PUBlic dictionary. - gdcmElValSet PubElVals; + gdcmElValSet PubElValSet; /// ELement VALueS parsed with the SHAdow dictionary. - gdcmElValSet ShaElVals; + gdcmElValSet ShaElValSet; /// Refering underlying filename. string filename; FILE * fp; @@ -97,6 +97,7 @@ private: void SkipElementValue(gdcmElValue *); void FixFoundLength(gdcmElValue*, guint32); bool IsAnInteger(gdcmElValue *); + void LoadElements(void); bool IsImplicitVRLittleEndianTransferSyntax(void); bool IsExplicitVRLittleEndianTransferSyntax(void); @@ -122,7 +123,7 @@ protected: int write(ostream&); int anonymize(ostream&); // FIXME : anonymize should be a friend ? public: - void LoadElements(void); + bool IsReadable(void); virtual void ParseHeader(bool exception_on_error = false) throw(gdcmFormatError); gdcmHeader(const char *filename, bool exception_on_error = false) @@ -143,9 +144,9 @@ public: string GetPubElValRepByName(string TagName); string GetPubElValRepByNumber(guint16 group, guint16 element); - TagElValueHT & GetPubElVal(void) { return PubElVals.GetTagHt(); }; + TagElValueHT & GetPubElVal(void) { return PubElValSet.GetTagHt(); }; void PrintPubElVal(ostream & os = cout); - void PrintPubDict(ostream & os = cout); + void PrintPubDict (ostream & os = cout); // TODO Swig string* GetShaTagNames(); string GetShaElValByName(string TagName); @@ -163,9 +164,10 @@ public: int SetShaElValByName(string content, string ShadowTagName); int SetShaElValByNumber(string content, guint16 group, guint16 element); - int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element); + int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element); + int ReplaceOrCreateByNumber(guint16 Group, guint16 Elem, string Value); - gdcmElValSet GetPubElVals() { return(PubElVals); } + gdcmElValSet GetPubElValSet() { return(PubElValSet); } }; #endif