Skip to content
Commits on Source (5)
repo: 3959d33612ccaadc0d4d707227fbed09ac35e5fe
node: 010d5e6edabed784325c43ce81ec140a6a9ccf84
branch: Orthanc-1.5.5
node: 56d7f3d50c89c6c66c9932621a1ae05403e34ee1
branch: Orthanc-1.5.6
latesttag: dcmtk-3.6.1
latesttagdistance: 806
changessincelatesttag: 923
latesttagdistance: 817
changessincelatesttag: 934
......@@ -323,6 +323,8 @@ namespace Orthanc
Json::Value DicomWebJsonVisitor::FormatDouble(double value)
{
try
{
long long a = boost::math::llround<double>(value);
......@@ -337,6 +339,13 @@ namespace Orthanc
return Json::Value(value);
}
}
catch (boost::math::rounding_error&)
{
// Can occur if "long long" is too small to receive this value
// (e.g. infinity)
return Json::Value(value);
}
}
#if ORTHANC_ENABLE_PUGIXML == 1
......
......@@ -128,10 +128,30 @@ namespace Orthanc
MimeType contentType)
{
CheckStatus();
if (convertJsonToXml_ &&
contentType == MimeType_Json)
{
Json::Value json;
Json::Reader reader;
if (reader.parse(reinterpret_cast<const char*>(buffer),
reinterpret_cast<const char*>(buffer) + length, json))
{
AnswerJson(json);
}
else
{
throw OrthancException(ErrorCode_BadFileFormat,
"The REST API tries and answers with an invalid JSON file");
}
}
else
{
output_.SetContentType(contentType);
output_.Answer(buffer, length);
alreadySent_ = true;
}
}
void RestApiOutput::Redirect(const std::string& path)
{
......
......@@ -2,6 +2,25 @@ Pending changes in the mainline
===============================
Version 1.5.6 (2019-03-01)
==========================
Orthanc Explorer
----------------
* If performing a Query/Retrieve operation, the default value for the
tags is set to an empty string instead of '*', which allows to match
even if the tag is not present. This allows malformed DICOM files to
be matched, even though they lack required tags such as "PatientSex"
Maintenance
-----------
* Enlarge the support of JSON-to-XML conversion in the REST API
* Fix missing DB transactions in some write operations
* Fix performance issue in DICOM protocol by disabling Nagle's algorithm
Version 1.5.5 (2019-02-25)
==========================
......
......@@ -84,11 +84,11 @@ $('#qr-submit').live('click', function() {
query = {
'Level' : 'Study',
'Query' : {
'AccessionNumber' : '*',
'PatientBirthDate' : '*',
'PatientID' : '*',
'PatientName' : '*',
'PatientSex' : '*',
'AccessionNumber' : '',
'PatientBirthDate' : '',
'PatientID' : '',
'PatientName' : '',
'PatientSex' : '',
'StudyDate' : $('#qr-date').val(),
'StudyDescription' : '*'
}
......
......@@ -1935,13 +1935,19 @@ namespace Orthanc
void ServerIndex::DeleteChanges()
{
boost::mutex::scoped_lock lock(mutex_);
Transaction transaction(*this);
db_.ClearChanges();
transaction.Commit(0);
}
void ServerIndex::DeleteExportedResources()
{
boost::mutex::scoped_lock lock(mutex_);
Transaction transaction(*this);
db_.ClearExportedResources();
transaction.Commit(0);
}
......@@ -2235,7 +2241,10 @@ namespace Orthanc
const std::string& value)
{
boost::mutex::scoped_lock lock(mutex_);
Transaction transaction(*this);
db_.SetGlobalProperty(property, value);
transaction.Commit(0);
}
......
......@@ -55,8 +55,8 @@ if (BOOST_STATIC)
set(BOOST_NAME boost_1_69_0)
set(BOOST_VERSION 1.69.0)
set(BOOST_BCP_SUFFIX bcpdigest-1.5.5)
set(BOOST_MD5 "a5d027d6668b69ccee707c4ceaf2496e")
set(BOOST_BCP_SUFFIX bcpdigest-1.5.6)
set(BOOST_MD5 "579bccc0ea4d1a261c1d0c5e27446c3d")
set(BOOST_URL "http://orthanc.osimis.io/ThirdPartyDownloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
......
......@@ -24,7 +24,7 @@ set -u
## - Orthanc >= 1.5.5: Boost 1.69.0
BOOST_VERSION=1_69_0
ORTHANC_VERSION=1.5.5
ORTHANC_VERSION=1.5.6
rm -rf /tmp/boost_${BOOST_VERSION}
rm -rf /tmp/bcp/boost_${BOOST_VERSION}
......@@ -35,7 +35,7 @@ tar xfz ./boost_${BOOST_VERSION}.tar.gz
echo "Generating the subset..."
mkdir -p /tmp/bcp/boost_${BOOST_VERSION}
bcp --boost=/tmp/boost_${BOOST_VERSION} thread system locale date_time filesystem math/special_functions algorithm uuid atomic iostreams program_options numeric/ublas geometry polygon signals2 /tmp/bcp/boost_${BOOST_VERSION}
bcp --boost=/tmp/boost_${BOOST_VERSION} thread system locale date_time filesystem math/special_functions algorithm uuid atomic iostreams program_options numeric/ublas geometry polygon signals2 chrono /tmp/bcp/boost_${BOOST_VERSION}
echo "Removing documentation..."
rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/locale/doc/html
......
......@@ -88,6 +88,7 @@ if (STATIC_BUILD OR NOT USE_SYSTEM_DCMTK)
-DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}
)
if (NOT ENABLE_DCMTK_LOG)
# Disable logging internal to DCMTK
# https://groups.google.com/d/msg/orthanc-users/v2SzzAmY948/VxT1QVGiBAAJ
......
......@@ -179,3 +179,16 @@ endif()
#set_source_files_properties(${DCMTK_SOURCES}
# PROPERTIES COMPILE_DEFINITIONS
# "PACKAGE_VERSION=\"${DCMTK_PACKAGE_VERSION}\";PACKAGE_VERSION_NUMBER=\"${DCMTK_VERSION_NUMBER}\"")
# Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
# default since this does not seem to be appropriate (anymore) for
# most modern operating systems. In order to change this default, the
# environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
# for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
# be defined to change this setting at compilation time (see
# macros.txt for details).
# https://forum.dcmtk.org/viewtopic.php?t=4632
add_definitions(
-DDISABLE_NAGLE_ALGORITHM=1
)
......@@ -169,3 +169,16 @@ list(REMOVE_ITEM DCMTK_SOURCES
${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc
${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc
)
# Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
# default since this does not seem to be appropriate (anymore) for
# most modern operating systems. In order to change this default, the
# environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
# for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
# be defined to change this setting at compilation time (see
# macros.txt for details).
# https://forum.dcmtk.org/viewtopic.php?t=4632
add_definitions(
-DDISABLE_NAGLE_ALGORITHM=1
)
......@@ -3,7 +3,7 @@
#####################################################################
# Version of the build, should always be "mainline" except in release branches
set(ORTHANC_VERSION "1.5.5")
set(ORTHANC_VERSION "1.5.6")
# Version of the database schema. History:
# * Orthanc 0.1.0 -> Orthanc 0.3.0 = no versioning
......
......@@ -101,6 +101,8 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR
set(ORTHANC_FRAMEWORK_MD5 "bf2f5ed1adb8b0fc5f10d278e68e1dfe")
elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.4")
set(ORTHANC_FRAMEWORK_MD5 "404baef5d4c43e7c5d9410edda8ef5a5")
elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.5")
set(ORTHANC_FRAMEWORK_MD5 "cfc437e0687ae4bd725fd93dc1f08bc4")
endif()
endif()
endif()
......
......@@ -1521,6 +1521,18 @@ static std::string DecodeFromSpecification(const std::string& s)
// Compatibility wrapper
static pugi::xpath_node SelectNode(const pugi::xml_document& doc,
const char* xpath)
{
#if PUGIXML_VERSION <= 140
return doc.select_single_node(xpath); // Deprecated in pugixml 1.5
#else
return doc.select_node(xpath);
#endif
}
TEST(Toolbox, EncodingsKorean)
{
// http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_I.2.html
......@@ -1569,37 +1581,36 @@ TEST(Toolbox, EncodingsKorean)
pugi::xml_document doc;
doc.load_buffer(xml.c_str(), xml.size());
pugi::xpath_node node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value");
pugi::xpath_node node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value");
ASSERT_STREQ("ISO_IR 192", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]");
ASSERT_STREQ("CS", node.node().attribute("vr").value());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]");
ASSERT_STREQ("PN", node.node().attribute("vr").value());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName");
ASSERT_STREQ("Hong", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName");
ASSERT_STREQ("Gildong", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName");
ASSERT_EQ(utf8.substr(13, 3), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName");
ASSERT_EQ(utf8.substr(17, 6), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName");
ASSERT_EQ(utf8.substr(24, 3), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName");
ASSERT_EQ(utf8.substr(28), node.node().text().as_string());
#endif
}
TEST(Toolbox, EncodingsJapaneseKanji)
{
// http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part05/sect_H.3.html
......@@ -1650,31 +1661,31 @@ TEST(Toolbox, EncodingsJapaneseKanji)
pugi::xml_document doc;
doc.load_buffer(xml.c_str(), xml.size());
pugi::xpath_node node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value");
pugi::xpath_node node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]/Value");
ASSERT_STREQ("ISO_IR 192", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00080005\"]");
ASSERT_STREQ("CS", node.node().attribute("vr").value());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]");
ASSERT_STREQ("PN", node.node().attribute("vr").value());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/FamilyName");
ASSERT_STREQ("Yamada", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Alphabetic/GivenName");
ASSERT_STREQ("Tarou", node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/FamilyName");
ASSERT_EQ(utf8.substr(13, 6), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Ideographic/GivenName");
ASSERT_EQ(utf8.substr(20, 6), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/FamilyName");
ASSERT_EQ(utf8.substr(27, 9), node.node().text().as_string());
node = doc.select_node("//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName");
node = SelectNode(doc, "//NativeDicomModel/DicomAttribute[@tag=\"00100010\"]/PersonName/Phonetic/GivenName");
ASSERT_EQ(utf8.substr(37), node.node().text().as_string());
#endif
}
......
orthanc (1.5.6+dfsg-1) unstable; urgency=medium
* New upstream version
-- Sebastien Jodogne <s.jodogne@gmail.com> Sat, 02 Mar 2019 09:15:35 +0100
orthanc (1.5.5+dfsg-1) unstable; urgency=medium
* New upstream version
......
......@@ -25,7 +25,7 @@ Build-Depends: cmake,
uuid-dev,
zlib1g-dev,
yui-compressor
Standards-Version: 4.3.0.2
Standards-Version: 4.3.0.3
Vcs-Browser: https://salsa.debian.org/med-team/orthanc
Vcs-Git: https://salsa.debian.org/med-team/orthanc.git
Homepage: http://www.orthanc-server.com/
......
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH ORTHANC "1" "February 2019" "Orthanc 1.5.5" "User Commands"
.TH ORTHANC "1" "March 2019" "Orthanc 1.5.6" "User Commands"
.SH NAME
Orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research
.SH SYNOPSIS
......
.TH ORTHANC "8" "February 2019" "Orthanc 1.5.5" "System Administration tools and Deamons"
.TH ORTHANC "8" "March 2019" "Orthanc 1.5.6" "System Administration tools and Deamons"
.SH NAME
Orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research
.SH SYNOPSIS
......