Mercurial > hg > orthanc-stone
changeset 1546:94750ef63ad5
support of Orthanc framework shared library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Aug 2020 17:09:59 +0200 |
parents | aee0f5f9cf71 |
children | bf195fc0797e |
files | OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake OrthancStone/Sources/Loaders/DicomResourcesLoader.cpp OrthancStone/Sources/Toolbox/DicomStructureSet.h OrthancStone/UnitTestsSources/CMakeLists.txt |
diffstat | 4 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake Tue Aug 11 15:07:30 2020 +0200 +++ b/OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake Tue Aug 11 17:09:59 2020 +0200 @@ -23,9 +23,16 @@ ##################################################################### if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") + # DCMTK and curl are necessarily enabled if using Orthanc framework: + # "DownloadOrthancFramework.cmake" must be aware of this fact + set(ENABLE_DCMTK ON) + set(ENABLE_WEB_CLIENT ON) + include(${CMAKE_CURRENT_LIST_DIR}/../Orthanc/CMake/DownloadOrthancFramework.cmake) link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) + set(ENABLE_LOCALE ON) + else() if (ENABLE_DCMTK) set(ENABLE_LOCALE ON)
--- a/OrthancStone/Sources/Loaders/DicomResourcesLoader.cpp Tue Aug 11 15:07:30 2020 +0200 +++ b/OrthancStone/Sources/Loaders/DicomResourcesLoader.cpp Tue Aug 11 17:09:59 2020 +0200 @@ -534,7 +534,13 @@ ignoreTagLength.insert(Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR); // Needed for RT-DOSE Orthanc::DicomMap summary; + +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 3) message.GetDicom().ExtractDicomSummary(summary, ORTHANC_STONE_MAX_TAG_LENGTH, ignoreTagLength); +#else + message.GetDicom().ExtractDicomSummary(summary, ignoreTagLength); +#endif + handler.GetTarget()->AddResource(summary); handler.BroadcastSuccess();
--- a/OrthancStone/Sources/Toolbox/DicomStructureSet.h Tue Aug 11 15:07:30 2020 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.h Tue Aug 11 17:09:59 2020 +0200 @@ -164,13 +164,13 @@ const CoordinateSystem3D& slice) const; public: - DicomStructureSet(const FullOrthancDataset& instance) + explicit DicomStructureSet(const FullOrthancDataset& instance) { Setup(instance); } #if ORTHANC_ENABLE_DCMTK == 1 - DicomStructureSet(Orthanc::ParsedDicomFile& instance); + explicit DicomStructureSet(Orthanc::ParsedDicomFile& instance); #endif size_t GetStructuresCount() const
--- a/OrthancStone/UnitTestsSources/CMakeLists.txt Tue Aug 11 15:07:30 2020 +0200 +++ b/OrthancStone/UnitTestsSources/CMakeLists.txt Tue Aug 11 17:09:59 2020 +0200 @@ -17,7 +17,6 @@ set(ENABLE_GOOGLE_TEST ON) endif() -set(ENABLE_DCMTK OFF) set(ENABLE_OPENGL OFF) include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)