# HG changeset patch # User Sebastien Jodogne # Date 1443531264 -7200 # Node ID e40fd0d925c54fd2396c9537948a14fef4d7ed86 # Parent 3727a09e7b533b4f231792d9fd84898935c68c22 /tools/create-dicom can create tags with unknown VR diff -r 3727a09e7b53 -r e40fd0d925c5 NEWS --- a/NEWS Mon Sep 28 15:03:35 2015 +0200 +++ b/NEWS Tue Sep 29 14:54:24 2015 +0200 @@ -13,7 +13,8 @@ ----------- * "/system" URI gives information about the plugins used for storage area and DB back-end -* Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers +* Plugin callbacks should now return explicit "OrthancPluginErrorCode" instead of integers +* "/tools/create-dicom" can create tags with unknown VR Version 0.9.4 (2015/09/16) diff -r 3727a09e7b53 -r e40fd0d925c5 OrthancServer/FromDcmtkBridge.cpp --- a/OrthancServer/FromDcmtkBridge.cpp Mon Sep 28 15:03:35 2015 +0200 +++ b/OrthancServer/FromDcmtkBridge.cpp Tue Sep 29 14:54:24 2015 +0200 @@ -618,6 +618,13 @@ } + bool FromDcmtkBridge::IsUnknownTag(const DicomTag& tag) + { + DcmTag tmp(tag.GetGroup(), tag.GetElement()); + return tmp.isUnknownVR(); + } + + void FromDcmtkBridge::Print(FILE* fp, const DicomMap& m) { for (DicomMap::Map::const_iterator diff -r 3727a09e7b53 -r e40fd0d925c5 OrthancServer/FromDcmtkBridge.h --- a/OrthancServer/FromDcmtkBridge.h Mon Sep 28 15:03:35 2015 +0200 +++ b/OrthancServer/FromDcmtkBridge.h Tue Sep 29 14:54:24 2015 +0200 @@ -56,6 +56,8 @@ static bool IsPrivateTag(const DicomTag& tag); + static bool IsUnknownTag(const DicomTag& tag); + static DicomValue* ConvertLeafElement(DcmElement& element, Encoding encoding); diff -r 3727a09e7b53 -r e40fd0d925c5 OrthancServer/ParsedDicomFile.cpp --- a/OrthancServer/ParsedDicomFile.cpp Mon Sep 28 15:03:35 2015 +0200 +++ b/OrthancServer/ParsedDicomFile.cpp Tue Sep 29 14:54:24 2015 +0200 @@ -864,7 +864,8 @@ { OFCondition cond; - if (FromDcmtkBridge::IsPrivateTag(tag)) + if (FromDcmtkBridge::IsPrivateTag(tag) || + FromDcmtkBridge::IsUnknownTag(tag)) { // This is a private tag // http://support.dcmtk.org/redmine/projects/dcmtk/wiki/howto_addprivatedata @@ -915,7 +916,8 @@ } else { - if (FromDcmtkBridge::IsPrivateTag(tag)) + if (FromDcmtkBridge::IsPrivateTag(tag) || + FromDcmtkBridge::IsUnknownTag(tag)) { if (!element->putUint8Array((const Uint8*) value.c_str(), value.size()).good()) { @@ -968,6 +970,7 @@ DcmDataset& dataset = *pimpl_->file_->getDataset(); if (FromDcmtkBridge::IsPrivateTag(tag) || + FromDcmtkBridge::IsUnknownTag(tag) || tag == DICOM_TAG_PIXEL_DATA || tag == DICOM_TAG_ENCAPSULATED_DOCUMENT) {