Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomFormat/DicomMap.h @ 4296:3b70a2e6a06c
moving inline methods to source files for ABI compatibility
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 15:52:28 +0100 |
parents | bf7b9edf6b81 |
children | 3af1d763763a |
comparison
equal
deleted
inserted
replaced
4295:90f91b78d708 | 4296:3b70a2e6a06c |
---|---|
51 | 51 |
52 static void GetMainDicomTagsInternal(std::set<DicomTag>& result, | 52 static void GetMainDicomTagsInternal(std::set<DicomTag>& result, |
53 ResourceType level); | 53 ResourceType level); |
54 | 54 |
55 public: | 55 public: |
56 DicomMap() | 56 ~DicomMap(); |
57 { | |
58 } | |
59 | 57 |
60 ~DicomMap() | 58 size_t GetSize() const; |
61 { | |
62 Clear(); | |
63 } | |
64 | |
65 size_t GetSize() const | |
66 { | |
67 return content_.size(); | |
68 } | |
69 | 59 |
70 DicomMap* Clone() const; | 60 DicomMap* Clone() const; |
71 | 61 |
72 void Assign(const DicomMap& other); | 62 void Assign(const DicomMap& other); |
73 | 63 |
74 void Clear(); | 64 void Clear(); |
75 | 65 |
76 void SetNullValue(uint16_t group, | 66 void SetNullValue(uint16_t group, |
77 uint16_t element) | 67 uint16_t element); |
78 { | |
79 SetValueInternal(group, element, new DicomValue); | |
80 } | |
81 | 68 |
82 void SetNullValue(const DicomTag& tag) | 69 void SetNullValue(const DicomTag& tag); |
83 { | |
84 SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue); | |
85 } | |
86 | 70 |
87 void SetValue(uint16_t group, | 71 void SetValue(uint16_t group, |
88 uint16_t element, | 72 uint16_t element, |
89 const DicomValue& value) | 73 const DicomValue& value); |
90 { | |
91 SetValueInternal(group, element, value.Clone()); | |
92 } | |
93 | 74 |
94 void SetValue(const DicomTag& tag, | 75 void SetValue(const DicomTag& tag, |
95 const DicomValue& value) | 76 const DicomValue& value); |
96 { | |
97 SetValueInternal(tag.GetGroup(), tag.GetElement(), value.Clone()); | |
98 } | |
99 | 77 |
100 void SetValue(const DicomTag& tag, | 78 void SetValue(const DicomTag& tag, |
101 const std::string& str, | 79 const std::string& str, |
102 bool isBinary) | 80 bool isBinary); |
103 { | |
104 SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue(str, isBinary)); | |
105 } | |
106 | 81 |
107 void SetValue(uint16_t group, | 82 void SetValue(uint16_t group, |
108 uint16_t element, | 83 uint16_t element, |
109 const std::string& str, | 84 const std::string& str, |
110 bool isBinary) | 85 bool isBinary); |
111 { | |
112 SetValueInternal(group, element, new DicomValue(str, isBinary)); | |
113 } | |
114 | 86 |
115 bool HasTag(uint16_t group, uint16_t element) const | 87 bool HasTag(uint16_t group, uint16_t element) const; |
116 { | |
117 return HasTag(DicomTag(group, element)); | |
118 } | |
119 | 88 |
120 bool HasTag(const DicomTag& tag) const | 89 bool HasTag(const DicomTag& tag) const; |
121 { | |
122 return content_.find(tag) != content_.end(); | |
123 } | |
124 | 90 |
125 const DicomValue& GetValue(uint16_t group, uint16_t element) const | 91 const DicomValue& GetValue(uint16_t group, uint16_t element) const; |
126 { | |
127 return GetValue(DicomTag(group, element)); | |
128 } | |
129 | 92 |
130 const DicomValue& GetValue(const DicomTag& tag) const; | 93 const DicomValue& GetValue(const DicomTag& tag) const; |
131 | 94 |
132 // DO NOT delete the returned value! | 95 // DO NOT delete the returned value! |
133 const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const | 96 const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const; |
134 { | |
135 return TestAndGetValue(DicomTag(group, element)); | |
136 } | |
137 | 97 |
138 // DO NOT delete the returned value! | 98 // DO NOT delete the returned value! |
139 const DicomValue* TestAndGetValue(const DicomTag& tag) const; | 99 const DicomValue* TestAndGetValue(const DicomTag& tag) const; |
140 | 100 |
141 void Remove(const DicomTag& tag); | 101 void Remove(const DicomTag& tag); |