Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
ElementsDictionary.h
Go to the documentation of this file.
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
34
ElementsDictionaryKey
();
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
87
ElementsDictionaryEntry
(
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
Tag.h
odil::ElementsDictionaryKey::Type
Type
Type of the key.
Definition
ElementsDictionary.h:27
odil::ElementsDictionaryKey::set
void set(std::string const &value)
Set the type to String.
odil::ElementsDictionaryKey::ElementsDictionaryKey
ElementsDictionaryKey()
Create a key with type equal to None.
odil::ElementsDictionaryKey::ElementsDictionaryKey
ElementsDictionaryKey(Tag const &value)
Create a key with type equal to Tag.
odil::ElementsDictionaryKey::get_string
std::string const & get_string() const
Return the string value or raise an exception if type is not String.
odil::ElementsDictionaryKey::set
void set(Tag const value)
Set the type to Tag.
odil::ElementsDictionaryKey::get_tag
Tag const & get_tag() const
Return the tag value or raise an exception if type is not Tag.
odil::ElementsDictionaryKey::operator==
bool operator==(ElementsDictionaryKey const &other) const
Comparator.
odil::ElementsDictionaryKey::operator<
bool operator<(ElementsDictionaryKey const &other) const
Comparator.
odil::ElementsDictionaryKey::ElementsDictionaryKey
ElementsDictionaryKey(std::string const &value)
Create a key with type equal to String.
odil::ElementsDictionaryKey::get_type
Type const & get_type() const
Return the type.
odil::Tag
A DICOM element tag.
Definition
Tag.h:26
odil
Definition
Association.h:25
odil::ElementsDictionary
std::map< ElementsDictionaryKey, ElementsDictionaryEntry > ElementsDictionary
Definition
ElementsDictionary.h:93
odil::find
ElementsDictionary::const_iterator find(ElementsDictionary const &dictionary, Tag const &tag)
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
odil::ElementsDictionaryEntry::vm
std::string vm
Multiplicity.
Definition
ElementsDictionary.h:84
odil::ElementsDictionaryEntry::keyword
std::string keyword
Brief name.
Definition
ElementsDictionary.h:78
odil::ElementsDictionaryEntry::ElementsDictionaryEntry
ElementsDictionaryEntry(std::string const &name="", std::string const &keyword="", std::string const &vr="", std::string const &vm="")
Constructor.
odil::ElementsDictionaryEntry::vr
std::string vr
Type.
Definition
ElementsDictionary.h:81
odil::ElementsDictionaryEntry::name
std::string name
Full name.
Definition
ElementsDictionary.h:75
src
odil
ElementsDictionary.h
Generated by
1.17.0