GDCM  2.2.6
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
Class to represent a Data Set (which contains Data Elements) A Data Set represents an instance of a r...
Definition: gdcmDataSet.h:55
File & GetFile()
Definition: gdcmStringFilter.h:62
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
Value Length.
Definition: gdcmVL.h:29
StringFilter StringFilter is the class that make gdcm2.x looks more like gdcm1 and transform the bina...
Definition: gdcmStringFilter.h:29
void UseDictAlways(bool)
Definition: gdcmStringFilter.h:36
void SetFile(const File &f)
Set/Get File.
Definition: gdcmStringFilter.h:61
Class for Smart Pointer.
Definition: gdcmObject.h:26
a DICOM File See PS 3.10 File: A File is an ordered string of zero or more bytes, where the first byt...
Definition: gdcmFile.h:33
Class to manipulate the sum of knowledge (all the dict user load)
Definition: gdcmDicts.h:28
const File & GetFile() const
Definition: gdcmStringFilter.h:63
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element). Basically an uint32_t which...
Definition: gdcmTag.h:38

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo