Skip to content

Commit

Permalink
Merge branch 'hotfix-1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Woundorf committed Jul 14, 2020
2 parents 2b98662 + 7fdd079 commit f455c2e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
11 changes: 11 additions & 0 deletions starviewer/releasenotes/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@
</head>
<body>
<h1>Starviewer Changelog</h1>
<div class="minorRelease">
<div class="version">
<span class="versionNumber">Starviewer 1.0.1</span>
<span class="versionDate">(Publicat el 14 de juliol de 2020)</span>
</div>
<div class="fixed">
<ul>
<li>Es resol un problema pel qual no es calculava el SUV en algunes images de PET d'un centre específic. <span class="ticket">2146</span></li>
</ul>
</div>
</div>
<div class="majorRelease">
<div class="version">
<span class="versionNumber">Starviewer 1.0.0</span>
Expand Down
6 changes: 6 additions & 0 deletions starviewer/src/core/dicomtagreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
19 changes: 18 additions & 1 deletion starviewer/src/core/dicomvalueattribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <QVariant>
#include <QDate>
#include <QVector>

namespace udg {

Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion starviewer/src/core/dicomvalueattribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions starviewer/src/core/starviewerapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f455c2e

Please sign in to comment.