odil
C++11libraryfortheDICOMstandard
ElementsDictionary.h
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _f4b88e07_d515_41be_ad1b_37899ec6451e
10 #define _f4b88e07_d515_41be_ad1b_37899ec6451e
11 
12 #include <map>
13 #include <string>
14 
15 #include "odil/odil.h"
16 #include "odil/Tag.h"
17 
18 namespace odil
19 {
20 
22 class ODIL_API ElementsDictionaryKey
23 {
24 public:
26  enum class Type
27  {
28  Tag,
29  String,
30  None
31  };
32 
35 
37  ElementsDictionaryKey(Tag const & value);
38 
40  ElementsDictionaryKey(std::string const & value);
41 
43  Type const & get_type() const;
44 
46  Tag const & get_tag() const;
47 
49  std::string const & get_string() const;
50 
52  void set(Tag const value);
53 
55  void set(std::string const & value);
56 
58  bool operator<(ElementsDictionaryKey const & other) const;
59 
61  bool operator==(ElementsDictionaryKey const & other) const;
62 
63 private:
64  Type _type;
65  Tag _tag;
66  std::string _string;
67 };
68 
72 struct ODIL_API ElementsDictionaryEntry
73 {
75  std::string name;
76 
78  std::string keyword;
79 
81  std::string vr;
82 
84  std::string vm;
85 
88  std::string const & name="", std::string const & keyword="",
89  std::string const & vr="", std::string const & vm="");
90 };
91 
92 typedef
93  std::map<ElementsDictionaryKey, ElementsDictionaryEntry> ElementsDictionary;
94 
95 ODIL_API
96 ElementsDictionary::const_iterator
97 find(ElementsDictionary const & dictionary, Tag const & tag);
98 
99 }
100 
101 #endif // _f4b88e07_d515_41be_ad1b_37899ec6451e
std::string keyword
Brief name.
Definition: ElementsDictionary.h:78
Definition: Association.cpp:39
A DICOM element tag.
Definition: Tag.h:24
std::string vm
Multiplicity.
Definition: ElementsDictionary.h:84
Type
Type of the key.
Definition: ElementsDictionary.h:26
std::string vr
Type.
Definition: ElementsDictionary.h:81
std::string name
Full name.
Definition: ElementsDictionary.h:75
Key of a dictionary of DICOM elements.
Definition: ElementsDictionary.h:22
Entry in a dictionary of DICOM elements.
Definition: ElementsDictionary.h:72