MeVisLab Toolbox Reference
DCMTree_Dict.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef DCM_TREE_DICT_H
14#define DCM_TREE_DICT_H
15
16#include "DCMTree_Lib.h"
17#include "DCMTree_TagInfo.h"
18#include "DCMTree_Defines.h"
19
20#ifdef _MSC_VER
21 #pragma warning (push)
22 #pragma warning (disable : 4251 4350)
23#endif
24
25#include <string>
26
44namespace DCMTree_Utils
45{
46 class LoadLibraryDelegate;
47}
48
49namespace DCMTree
50{
51 class Dict;
52 typedef boost::shared_ptr<Dict> DictPtr;
53 typedef boost::shared_ptr<const Dict> Const_DictPtr;
54
56 {
57 public:
58
63
65 virtual ~Dict();
66
71 virtual void postInitialize() const;
72
77 virtual std::string transferSyntaxUID (TransferSyntax transfersyntax) const = 0;
78
83 virtual Vr vr(const TagId &tagid) const;
84
90
95 virtual std::string name (const TagId &tagid) const = 0;
96
101 virtual TagId tagId(const std::string &name) const;
102
108 virtual TagInfo info(const TagId &tagid) const = 0;
109
115 virtual TagInfo info(const std::string &name) const = 0;
116
121 virtual bool hasInfoForTagId(const TagId &tagId) const = 0;
122
127 virtual bool hasInfoForTagName(const std::string &tagName) const = 0;
128
133 inline bool isTagIdKnown (const TagId &tagIdParam) const { return hasInfoForTagId(tagIdParam); }
134 inline bool isTagNameKnown(const std::string &tagName) const { return hasInfoForTagName(tagName); }
136
139 virtual std::vector<std::string> allNormalTagNames() const { return std::vector<std::string>(); }
140
141 protected:
143 static void setSingleton(Const_DictPtr singleton);
144
145 private:
146 static Const_DictPtr _singleton;
147 };
148}
149
150#ifdef _MSC_VER
151 #pragma warning (pop)
152#endif
153
154#endif
155
#define DCMTREE_EXPORT
static void setSingleton(Const_DictPtr singleton)
The concrete singleton is set by the implementing DLL.
virtual void postInitialize() const
Do some init after the implementing DLL was loaded.
bool isTagIdKnown(const TagId &tagIdParam) const
convenience methods which call hasInfoForTagId() or hasInfoForTagName()
virtual std::string transferSyntaxUID(TransferSyntax transfersyntax) const =0
convert the enum to its uid needs to be implemented by child classes
virtual TagId tagId(const std::string &name) const
get the tag id for the given name uses info from child classes
virtual TagInfo info(const std::string &name) const =0
method to be implemented by child-classes to provide information about a tag with the given name may ...
bool isTagNameKnown(const std::string &tagName) const
virtual Vr vr(const TagId &tagid) const
get the DICOM VR of the given tag uses info from child classes
virtual TagValueMultiplicity multiplicity(const TagId &tagid) const
get the multiplicity (min/max) of values of the given tag uses info from child classes
virtual TagInfo info(const TagId &tagid) const =0
method to be implemented by child-classes to provide information about a given tag may throw if an un...
static Const_DictPtr singleton(DCMTree_Utils::LoadLibraryDelegate *delegate=nullptr)
returns the singleton
virtual std::vector< std::string > allNormalTagNames() const
Returns a list of all known normal (non-repeating) tag names, e.g.
virtual ~Dict()
dtor, public for boost's sake
virtual bool hasInfoForTagId(const TagId &tagId) const =0
method to check if a TagInfo exists for the given tag id
virtual std::string name(const TagId &tagid) const =0
get the name of the given tag uses info from child classes
virtual bool hasInfoForTagName(const std::string &tagName) const =0
method to check if a TagInfo exists for the given tag name
Class to wrap a tag-id.
Class to carry meta-information about a specific tag.
the delegate who is responsible for loading the specific DICOM library used in initialization,...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
dictionary class to provide dicom-meta information
class to dump a DCMTree dicom message into a human readable file this class could be used as a starte...
Vr
DICOM VR.
TransferSyntax
DICOM transfer syntaxes.
boost::shared_ptr< const Dict > Const_DictPtr
std::pair< unsigned, unsigned > TagValueMultiplicity
the multiplicity of a tag, first=min second=max
boost::shared_ptr< Dict > DictPtr
shared-pointer to a DCMTree::Dict