diff --git a/starviewer/releasenotes/changelog.html b/starviewer/releasenotes/changelog.html
index ac073c909..06eaf9636 100644
--- a/starviewer/releasenotes/changelog.html
+++ b/starviewer/releasenotes/changelog.html
@@ -59,6 +59,17 @@
Starviewer 1.0.0
diff --git a/starviewer/src/core/dicomtagreader.cpp b/starviewer/src/core/dicomtagreader.cpp
index 7e22dc5e6..eb7eeacac 100644
--- a/starviewer/src/core/dicomtagreader.cpp
+++ b/starviewer/src/core/dicomtagreader.cpp
@@ -376,6 +376,12 @@ DICOMValueAttribute* DICOMTagReader::convertToDICOMValueAttribute(DcmElement *dc
}
dicomValueAttribute->setValue(string);
+
+ // HACK for wrong VR (#2146)
+ if (dcmtkDICOMElement->getVR() == EVR_UN)
+ {
+ dicomValueAttribute->setValueRepresentation(DICOMValueAttribute::Unknown);
+ }
}
else
{
diff --git a/starviewer/src/core/dicomvalueattribute.cpp b/starviewer/src/core/dicomvalueattribute.cpp
index 24fef1992..71bce75e3 100644
--- a/starviewer/src/core/dicomvalueattribute.cpp
+++ b/starviewer/src/core/dicomvalueattribute.cpp
@@ -18,6 +18,7 @@
#include
#include
+#include
namespace udg {
@@ -119,7 +120,23 @@ double DICOMValueAttribute::getValueAsDouble()
QString DICOMValueAttribute::getValueAsQString()
{
- return m_value.toString();
+ // HACK for wrong VR (#2146)
+ if (m_valueRepresentation == Unknown)
+ {
+ QString hexString = m_value.toString();
+ const auto &hexBytes = hexString.splitRef("\\");
+ QByteArray byteArray;
+ byteArray.reserve(hexBytes.size());
+ foreach (const auto &hexByte, hexBytes)
+ {
+ byteArray.append(hexByte.toInt(nullptr, 16));
+ }
+ return QString::fromLatin1(byteArray); // most likely Latin-1
+ }
+ else
+ {
+ return m_value.toString();
+ }
}
QByteArray DICOMValueAttribute::getValueAsByteArray()
diff --git a/starviewer/src/core/dicomvalueattribute.h b/starviewer/src/core/dicomvalueattribute.h
index a6914fe32..ab71412de 100644
--- a/starviewer/src/core/dicomvalueattribute.h
+++ b/starviewer/src/core/dicomvalueattribute.h
@@ -65,7 +65,6 @@ class DICOMValueAttribute : public DICOMAttribute {
/// Retorna el tipus del valor
ValueRepresentation getValueRepresentation();
-protected:
/// Assigna el tipus del valor
void setValueRepresentation(ValueRepresentation value);
diff --git a/starviewer/src/core/starviewerapplication.h b/starviewer/src/core/starviewerapplication.h
index a3601d892..5c9b9d31f 100644
--- a/starviewer/src/core/starviewerapplication.h
+++ b/starviewer/src/core/starviewerapplication.h
@@ -25,8 +25,8 @@ namespace udg {
#define CE_SUFFIX ""
#endif
-const QString StarviewerVersionString("1.0.0" CE_SUFFIX);
-const QString StarviewerBuildID("2020022100");
+const QString StarviewerVersionString("1.0.1" CE_SUFFIX);
+const QString StarviewerBuildID("2020071400");
#undef CE_SUFFIX