X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeader.h;h=3051124132dea94e2acc68cbc3728386e3bbd39b;hb=9b3db5f141ec2b11eadefaa2ea2a3a20058b37f9;hp=feefcee8a0edac3d8b12053eeccaddf83ec4a8d1;hpb=2c273fe07b6658479d83c26052ae0d6d41aca195;p=gdcm.git diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index feefcee8..30511241 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -51,7 +51,7 @@ public: // Some heuristic based accessors, end user intended // (to be move to gdcmHeaderHelper?) - int GetXSize(void); + int GetXSize(void); int GetYSize(void); int GetZSize(void); int GetBitsStored(void); @@ -79,21 +79,48 @@ public: // TODO Swig int SetShaDict(std::string filename); // TODO Swig int SetPubDict(std::string filename); + +// System access +/** + * \ingroup gdcmHeader + * \brief the Header Entry Group Number of the 'Pixel Group' + * is not allways 0x7fe0 + * @return GrPixel + */ + guint16 GetGrPixel(void) {return GrPixel;} +/** + * \ingroup gdcmHeader + * \brief the Header Entry Element Number of the 'Pixel Element' + * is not allways 0x0010 + * @return NumPixel + */ + guint16 GetNumPixel(void) {return NumPixel;} // Entry - inline virtual std::string GetEntryByName (std::string tagName) - { return(gdcmParser::GetEntryByName(tagName)); } - inline virtual std::string GetEntryVRByName (std::string tagName) - { return(gdcmParser::GetEntryVRByName(tagName)); } + inline virtual std::string GetEntryByNumber (guint16 group, guint16 element) { return(gdcmParser::GetEntryByNumber(group,element)); } + inline virtual std::string GetEntryVRByNumber(guint16 group, guint16 element) { return(gdcmParser::GetEntryVRByNumber(group,element)); } - - inline virtual bool SetEntryByName(std::string content,std::string tagName) - { return(gdcmParser::SetEntryByName(content,tagName)); } + + inline virtual int GetEntryLengthByNumber(guint16 group, guint16 element) + { return(gdcmParser::GetEntryLengthByNumber(group,element)); } + + inline virtual std::string GetEntryByName (std::string tagName) + { return(gdcmParser::GetEntryByName(tagName)); } + + inline virtual std::string GetEntryVRByName (std::string tagName) + { return(gdcmParser::GetEntryVRByName(tagName)); } + inline virtual bool SetEntryByNumber(std::string content,guint16 group, guint16 element) { return(gdcmParser::SetEntryByNumber(content,group,element)); } + + inline virtual bool SetEntryByName(std::string content,std::string tagName) + { return(gdcmParser::SetEntryByName(content,tagName)); } + + inline virtual bool SetEntryLengthByNumber(guint32 l,guint16 group, guint16 element) + { return(gdcmParser::SetEntryLengthByNumber(l,group,element)); } inline virtual void UpdateShaEntries(void) { gdcmParser::UpdateShaEntries(); } @@ -101,11 +128,14 @@ public: // Read (used in gdcmFile) void SetImageDataSize(size_t ExpectedSize); + bool operator<(gdcmHeader &header); + protected: int write(std::ostream&); int anonymize(std::ostream&); // FIXME : anonymize should be a friend ? - + bool anonymizeHeader(void); private: + }; //-----------------------------------------------------------------------------