comparison OrthancServer/FromDcmtkBridge.cpp @ 1307:f796207e3df1

Fix replacement and insertion of private DICOM tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Feb 2015 10:26:17 +0100
parents 6e7e5ed91c2d
children 1c8dfedefefe
comparison
equal deleted inserted replaced
1306:8cd5784a6d80 1307:f796207e3df1
184 } 184 }
185 185
186 186
187 bool FromDcmtkBridge::IsPrivateTag(DcmTag& tag) 187 bool FromDcmtkBridge::IsPrivateTag(DcmTag& tag)
188 { 188 {
189 #if 1
190 DcmTagKey tmp(tag.getGTag(), tag.getETag());
191 return tmp.isPrivate();
192 #else
193 // Implementation for Orthanc versions <= 0.8.5
189 return (tag.getPrivateCreator() != NULL || 194 return (tag.getPrivateCreator() != NULL ||
190 !strcmp("PrivateCreator", tag.getTagName())); // TODO - This may change with future versions of DCMTK 195 !strcmp("PrivateCreator", tag.getTagName())); // TODO - This may change with future versions of DCMTK
196 #endif
191 } 197 }
192 198
193 199
194 bool FromDcmtkBridge::IsPrivateTag(const DicomTag& tag) 200 bool FromDcmtkBridge::IsPrivateTag(const DicomTag& tag)
195 { 201 {
202 #if 1
203 DcmTagKey tmp(tag.GetGroup(), tag.GetElement());
204 return tmp.isPrivate();
205 #else
206 // Implementation for Orthanc versions <= 0.8.5
196 DcmTag tmp(tag.GetGroup(), tag.GetElement()); 207 DcmTag tmp(tag.GetGroup(), tag.GetElement());
197 return IsPrivateTag(tmp); 208 return IsPrivateTag(tmp);
209 #endif
198 } 210 }
199 211
200 212
201 DicomValue* FromDcmtkBridge::ConvertLeafElement(DcmElement& element, 213 DicomValue* FromDcmtkBridge::ConvertLeafElement(DcmElement& element,
202 Encoding encoding) 214 Encoding encoding)