Skip to content
Commits on Source (4)
repo: 02f7a0400a911dee22d2e761b21b6cab67ede076
node: 21df474deeb16a56724c0bb3758e56f95e3eff9c
branch: OrthancWebViewer-2.4
node: 0a8ed9da08696903df46390e537ffb8e017a1531
branch: OrthancWebViewer-2.5
latesttag: null
latesttagdistance: 196
changessincelatesttag: 200
latesttagdistance: 211
changessincelatesttag: 215
......@@ -5,7 +5,7 @@ Web Viewer plugin for Orthanc
Authors
-------
* Sebastien Jodogne <s.jodogne@gmail.com>
* Sebastien Jodogne <s.jodogne@orthanc-labs.com>
Overall design and lead developer.
......
# Orthanc - A Lightweight, RESTful DICOM Store
# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
# Department, University Hospital of Liege, Belgium
# Copyright (C) 2017-2018 Osimis S.A., Belgium
# Copyright (C) 2017-2019 Osimis S.A., Belgium
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
......@@ -21,13 +21,13 @@ cmake_minimum_required(VERSION 2.8)
project(OrthancWebViewer)
set(ORTHANC_WEBVIEWER_VERSION "2.4")
set(ORTHANC_PLUGIN_VERSION "2.5")
if (ORTHANC_WEBVIEWER_VERSION STREQUAL "mainline")
if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
set(ORTHANC_FRAMEWORK_VERSION "mainline")
set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
else()
set(ORTHANC_FRAMEWORK_VERSION "1.3.2")
set(ORTHANC_FRAMEWORK_VERSION "1.5.5")
set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
endif()
......@@ -88,6 +88,10 @@ else()
)
endif()
add_definitions(
-DORTHANC_ENABLE_LOGGING_PLUGIN=1
)
EmbedResources(
ORTHANC_EXPLORER ${CMAKE_SOURCE_DIR}/Resources/OrthancExplorer.js
JAVASCRIPT_LIBS ${JAVASCRIPT_LIBS_DIR}
......@@ -104,7 +108,7 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
execute_process(
COMMAND
${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
${ORTHANC_WEBVIEWER_VERSION} "OrthancWebViewer" OrthancWebViewer.dll "Web viewer of medical images for Orthanc"
${ORTHANC_PLUGIN_VERSION} "OrthancWebViewer" OrthancWebViewer.dll "Web viewer of medical images for Orthanc"
ERROR_VARIABLE Failure
OUTPUT_FILE ${AUTOGENERATED_DIR}/Version.rc
)
......@@ -152,13 +156,13 @@ endif()
target_link_libraries(OrthancWebViewer ${GDCM_LIBRARIES})
message("Setting the version of the library to ${ORTHANC_WEBVIEWER_VERSION}")
message("Setting the version of the library to ${ORTHANC_PLUGIN_VERSION}")
add_definitions(-DORTHANC_WEBVIEWER_VERSION="${ORTHANC_WEBVIEWER_VERSION}")
add_definitions(-DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}")
set_target_properties(OrthancWebViewer PROPERTIES
VERSION ${ORTHANC_WEBVIEWER_VERSION}
SOVERSION ${ORTHANC_WEBVIEWER_VERSION})
VERSION ${ORTHANC_PLUGIN_VERSION}
SOVERSION ${ORTHANC_PLUGIN_VERSION})
install(
TARGETS OrthancWebViewer
......
......@@ -2,6 +2,13 @@ Pending changes in the mainline
===============================
Version 2.5 (2019-02-27)
========================
* Upgrade to GDCM 2.8.8 for static builds
* Upgraded Orthanc framework
Version 2.4 (2018-04-23)
========================
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......@@ -33,6 +33,8 @@ namespace OrthancPlugins
int bundle_;
std::string item_;
void operator= (const CacheIndex&); // Forbidden
public:
CacheIndex(const CacheIndex& other) :
bundle_(other.bundle_),
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......@@ -323,14 +323,14 @@ namespace OrthancPlugins
switch (accessor.GetFormat())
{
case Orthanc::PixelFormat_RGB24:
converted = accessor;
accessor.GetReadOnlyAccessor(converted);
break;
case Orthanc::PixelFormat_RGB48:
buffer.reset(new Orthanc::ImageBuffer(Orthanc::PixelFormat_RGB24,
accessor.GetWidth(),
accessor.GetHeight(), false));
converted = buffer->GetAccessor();
buffer->GetWriteableAccessor(converted);
ConvertRGB48ToRGB24(converted, accessor);
break;
......@@ -340,12 +340,12 @@ namespace OrthancPlugins
accessor.GetWidth(),
accessor.GetHeight(),
true /* force minimal pitch */));
converted = buffer->GetAccessor();
buffer->GetWriteableAccessor(converted);
Orthanc::ImageProcessing::Convert(converted, accessor);
break;
case Orthanc::PixelFormat_SignedGrayscale16:
converted = accessor;
accessor.GetReadOnlyAccessor(converted);
break;
default:
......@@ -434,7 +434,7 @@ namespace OrthancPlugins
accessor.GetFormat() == Orthanc::PixelFormat_RGB24)
{
result["Orthanc"]["Stretched"] = false;
converted = accessor;
accessor.GetReadOnlyAccessor(converted);
}
else if (accessor.GetFormat() == Orthanc::PixelFormat_RGB48)
{
......@@ -443,7 +443,8 @@ namespace OrthancPlugins
buffer.reset(new Orthanc::ImageBuffer(Orthanc::PixelFormat_RGB24,
accessor.GetWidth(),
accessor.GetHeight(), false));
converted = buffer->GetAccessor();
buffer->GetWriteableAccessor(converted);
ConvertRGB48ToRGB24(converted, accessor);
}
else if (accessor.GetFormat() == Orthanc::PixelFormat_Grayscale16 ||
......@@ -455,7 +456,7 @@ namespace OrthancPlugins
accessor.GetWidth(),
accessor.GetHeight(),
true /* force minimal pitch */));
converted = buffer->GetAccessor();
buffer->GetWriteableAccessor(converted);
int64_t a, b;
Orthanc::ImageProcessing::GetMinMaxIntegerValue(a, b, accessor);
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......@@ -435,7 +435,7 @@ static OrthancPluginErrorCode DecodeImageCallback(OrthancPluginImage** target,
*target = NULL;
std::string s = "Cannot decode image using GDCM: " + std::string(e.What());
OrthancPluginLogError(context_, s.c_str());
OrthancPluginLogWarning(context_, s.c_str());
return OrthancPluginErrorCode_Plugin;
}
catch (std::runtime_error& e)
......@@ -443,7 +443,7 @@ static OrthancPluginErrorCode DecodeImageCallback(OrthancPluginImage** target,
*target = NULL;
std::string s = "Cannot decode image using GDCM: " + std::string(e.what());
OrthancPluginLogError(context_, s.c_str());
OrthancPluginLogWarning(context_, s.c_str());
return OrthancPluginErrorCode_Plugin;
}
}
......@@ -614,10 +614,10 @@ extern "C"
}
if (!scheduler.LookupProperty(webViewerVersion, CacheProperty_WebViewerVersion) ||
webViewerVersion != std::string(ORTHANC_WEBVIEWER_VERSION))
webViewerVersion != std::string(ORTHANC_PLUGIN_VERSION))
{
std::string s = ("The version of the Web viewer plugin has changed from \"" + webViewerVersion + "\" to \"" +
std::string(ORTHANC_WEBVIEWER_VERSION) + "\": The cache of the Web viewer will be cleared");
std::string(ORTHANC_PLUGIN_VERSION) + "\": The cache of the Web viewer will be cleared");
OrthancPluginLogWarning(context_, s.c_str());
clear = true;
}
......@@ -629,7 +629,7 @@ extern "C"
OrthancPluginLogWarning(context_, "Clearing the cache of the Web viewer");
scheduler.Clear();
scheduler.SetProperty(CacheProperty_OrthancVersion, context_->orthancVersion);
scheduler.SetProperty(CacheProperty_WebViewerVersion, ORTHANC_WEBVIEWER_VERSION);
scheduler.SetProperty(CacheProperty_WebViewerVersion, ORTHANC_PLUGIN_VERSION);
}
else
{
......@@ -729,6 +729,6 @@ extern "C"
ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion()
{
return ORTHANC_WEBVIEWER_VERSION;
return ORTHANC_PLUGIN_VERSION;
}
}
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......@@ -383,16 +383,12 @@ namespace OrthancPlugins
}
Orthanc::ImageAccessor ImageReader::GetAccessor() const
void ImageReader::GetAccessor(Orthanc::ImageAccessor& target) const
{
Orthanc::ImageAccessor accessor;
accessor.AssignReadOnly(Convert(OrthancPluginGetImagePixelFormat(context_, image_)),
OrthancPluginGetImageWidth(context_, image_),
OrthancPluginGetImageHeight(context_, image_),
OrthancPluginGetImagePitch(context_, image_),
OrthancPluginGetImageBuffer(context_, image_));
return accessor;
target.AssignReadOnly(Convert(OrthancPluginGetImagePixelFormat(context_, image_)),
OrthancPluginGetImageWidth(context_, image_),
OrthancPluginGetImageHeight(context_, image_),
OrthancPluginGetImagePitch(context_, image_),
OrthancPluginGetImageBuffer(context_, image_));
}
}
......@@ -2,7 +2,7 @@
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2018 Osimis S.A., Belgium
* Copyright (C) 2017-2019 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
......@@ -90,6 +90,6 @@ namespace OrthancPlugins
~ImageReader();
Orthanc::ImageAccessor GetAccessor() const;
void GetAccessor(Orthanc::ImageAccessor& target) const;
};
}