GDCM  2.2.0
gdcmStringFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMSTRINGFILTER_H
15 #define GDCMSTRINGFILTER_H
16 
17 #include "gdcmDataElement.h"
18 #include "gdcmDicts.h"
19 #include "gdcmFile.h"
20 
21 namespace gdcm
22 {
23 
30 {
31 public:
32  StringFilter();
33  ~StringFilter();
34 
36  void UseDictAlways(bool ) {}
37 
39  void SetDicts(const Dicts &dicts);
40 
42  std::string ToString(const Tag& t) const;
43 
44  //std::string ToMime64(const Tag& t) const;
45 
50  std::pair<std::string, std::string> ToStringPair(const Tag& t) const;
51 
53  std::string FromString(const Tag&t, const char * value, VL const & vl);
54 
55  // Use this one
56  std::string FromString(const Tag&t, const char * value, size_t len);
57 
58  //typedef std::map<Tag, gdcm::ConstCharWrapper> StringSet;
59 
61  void SetFile(const File& f) { F = f; }
62  File &GetFile() { return *F; }
63  const File &GetFile() const { return *F; }
64 
68  bool ExecuteQuery(std::string const &query, std::string & value) const;
69 
70 protected:
71  std::pair<std::string, std::string> ToStringPair(const Tag& t, DataSet const &ds) const;
72  bool ExecuteQuery(std::string const &query, DataSet const &ds, std::string & value) const;
73 
74 private:
76 };
77 
78 } // end namespace gdcm
79 
80 #endif //GDCMSTRINGFILTER_H

Generated on Wed Jun 13 2012 20:40:37 for GDCM by doxygen 1.8.1
SourceForge.net Logo