plastimatch
Loading...
Searching...
No Matches
metadata.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _metadata_h_
5#define _metadata_h_
6
7#include "plmbase_config.h"
8#include <map>
9#include <string>
10#include <vector>
11#if PLM_DCM_USE_DCMTK
12#include "dcmtk_config.h"
13#include "dcmtk/dcmdata/dctagkey.h"
14#endif
15
16#include "smart_pointer.h"
17
24{
25public:
27 Metadata ();
28 ~Metadata ();
29
30public:
31 /* GCS: Note use of unsigned short instead of uint16_t, because of
32 broken stdint implementation in gdcm 1.X. */
33 std::string
34 make_key (unsigned short key1, unsigned short key2) const;
35 const std::string&
36 get_metadata (const std::string& key) const;
37 const std::string&
38 get_metadata (unsigned short key1, unsigned short key2) const;
39 void
40 set_metadata (const std::string& key, const std::string& val);
41 void set_metadata (unsigned short key1, unsigned short key2,
42 const std::string& val);
43#if PLM_DCM_USE_DCMTK
44 const std::string& get_metadata (const DcmTagKey& key) const;
45 void set_metadata (const DcmTagKey& key, const std::string& val);
46#endif
47
50 void set_metadata (const std::vector<std::string>& metadata);
51
54 void set_parent (const Metadata::Pointer& parent) {
55 m_parent = parent;
56 }
57
59 void remove_metadata (unsigned short key1, unsigned short key2);
60
61 void create_anonymous ();
62 void print_metadata () const;
63
64public:
65 Metadata::Pointer m_parent;
66 std::map<std::string, std::string> m_data;
67
68public:
69
70};
71
72#endif
The Metadata class encapsulate DICOM metadata for a single series. It is implemented as a map from st...
Definition metadata.h:24
SMART_POINTER_SUPPORT(Metadata)
std::map< std::string, std::string > m_data
Definition metadata.h:66
Metadata::Pointer m_parent
Definition metadata.h:65
void set_parent(const Metadata::Pointer &parent)
Attach a parent to this metadata set. The parent metadata is used when there is no match in the child...
Definition metadata.h:54
Definition pointset.h:15
#define PLMBASE_API
Definition plmbase_config.h:19