# HG changeset patch # User Sebastien Jodogne # Date 1410190473 -7200 # Node ID ac6bd50a8c83b442ddfbc0f2a08abb32d749d77f # Parent baac89e6cc4b25337e40bd1bb68d7134f6f67ab2 fix issue 16 diff -r baac89e6cc4b -r ac6bd50a8c83 NEWS --- a/NEWS Mon Sep 08 16:21:23 2014 +0200 +++ b/NEWS Mon Sep 08 17:34:33 2014 +0200 @@ -14,6 +14,7 @@ * "/tools/create-dicom" now accepts the "PatientID" DICOM tag (+ updated sample) * Upgrade to Mongoose 3.8 * Fixes for Visual Studio 2013 and Windows 64bit +* Fix issue 16: Handling of "AT" value representations in JSON * Fix issue 17 diff -r baac89e6cc4b -r ac6bd50a8c83 OrthancServer/FromDcmtkBridge.cpp --- a/OrthancServer/FromDcmtkBridge.cpp Mon Sep 08 16:21:23 2014 +0200 +++ b/OrthancServer/FromDcmtkBridge.cpp Mon Sep 08 17:34:33 2014 +0200 @@ -88,6 +88,7 @@ #include #include #include +#include #include @@ -234,9 +235,8 @@ case EVR_OB: // other byte case EVR_OF: // other float case EVR_OW: // other word - case EVR_AT: // attribute tag case EVR_UN: // unknown value representation - return new DicomNullValue(); + return new DicomNullValue; /** * String types, should never happen at this point because of @@ -258,11 +258,11 @@ case EVR_UT: // unlimited text case EVR_PN: // person name case EVR_UI: // unique identifier - return new DicomNullValue(); + return new DicomNullValue; /** - * Numerical types + * Numberic types **/ case EVR_SL: // signed long @@ -271,7 +271,7 @@ if (dynamic_cast(element).getSint32(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; } case EVR_SS: // signed short @@ -280,7 +280,7 @@ if (dynamic_cast(element).getSint16(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; } case EVR_UL: // unsigned long @@ -289,7 +289,7 @@ if (dynamic_cast(element).getUint32(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; } case EVR_US: // unsigned short @@ -298,7 +298,7 @@ if (dynamic_cast(element).getUint16(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; } case EVR_FL: // float single-precision @@ -307,7 +307,7 @@ if (dynamic_cast(element).getFloat32(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; } case EVR_FD: // float double-precision @@ -316,7 +316,21 @@ if (dynamic_cast(element).getFloat64(f).good()) return new DicomString(boost::lexical_cast(f)); else - return new DicomNullValue(); + return new DicomNullValue; + } + + + /** + * Attribute tag. + **/ + + case EVR_AT: + { + OFString s; + if (dynamic_cast(element).getOFString(s, 0).good()) + return new DicomString(s.c_str()); + else + return new DicomNullValue; }