Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GDCMSTRINGFILTER_H
00016 #define GDCMSTRINGFILTER_H
00017
00018 #include "gdcmDataElement.h"
00019 #include "gdcmDicts.h"
00020 #include "gdcmFile.h"
00021
00022 namespace gdcm
00023 {
00024
00030 class GDCM_EXPORT StringFilter
00031 {
00032 public:
00033 StringFilter();
00034 ~StringFilter();
00035
00037 void UseDictAlways(bool ) {}
00038
00040 void SetDicts(const Dicts &dicts);
00041
00043 std::string ToString(const Tag& t) const;
00044
00045
00046
00051 std::pair<std::string, std::string> ToStringPair(const Tag& t) const;
00052
00054 std::string FromString(const Tag&t, const char * value, VL const & vl);
00055
00056
00057 std::string FromString(const Tag&t, const char * value, size_t len);
00058
00059
00060
00062 void SetFile(const File& f) { F = f; }
00063 File &GetFile() { return *F; }
00064 const File &GetFile() const { return *F; }
00065
00066 protected:
00067 std::pair<std::string, std::string> ToStringPair(const Tag& t, DataSet const &ds) const;
00068
00069 private:
00070 SmartPointer<File> F;
00071 };
00072
00073 }
00074
00075 #endif //GDCMSTRINGFILTER_H