Mercurial > hg > orthanc-stone
changeset 1039:3a35d8397559
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 07 Oct 2019 22:37:24 +0200 |
parents | 692291406f6a (current diff) 4e713ef78a5a (diff) |
children | 14c0a29cd9ec 08cdcadfab14 |
files | |
diffstat | 8 files changed, 60 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Oct 07 22:11:46 2019 +0200 +++ b/.hgtags Mon Oct 07 22:37:24 2019 +0200 @@ -31,3 +31,5 @@ efe1c44628a1fc6386a936ad0e42f79a4ba61e6b toa2019092003 53cc787bd7bce69639a6003ee20c8a2b304030e4 toa2019092301 ac88989817e3b4249ebab6a824466bbb62f70452 toa2019093001 +7b89e88bb66ebd3cd89d414d1010310c7d4cfbac toa2019100701 +e160159b19057e967f3c8a397f23121fba969bcc toa2019100702
--- a/Framework/Loaders/DicomStructureSetLoader.cpp Mon Oct 07 22:11:46 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Mon Oct 07 22:37:24 2019 +0200 @@ -169,10 +169,19 @@ loader.content_.reset(new DicomStructureSet(dicom)); size_t structureCount = loader.content_->GetStructuresCount(); loader.structureVisibility_.resize(structureCount); + bool everythingVisible = false; + if ((loader.initiallyVisibleStructures_.size() == 1) + && (loader.initiallyVisibleStructures_[0].size() == 1) + && (loader.initiallyVisibleStructures_[0][0] == '*')) + { + everythingVisible = true; + } + for (size_t i = 0; i < structureCount; ++i) { - // if nothing is specified in the ctor, this means we want everything visible - if (loader.initiallyVisibleStructures_.size() == 0) + // if a single "*" string is supplied, this means we want everything + // to be visible... + if(everythingVisible) { loader.structureVisibility_.at(i) = true; }
--- a/Framework/Loaders/DicomStructureSetLoader.h Mon Oct 07 22:11:46 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.h Mon Oct 07 22:37:24 2019 +0200 @@ -52,11 +52,11 @@ bool structuresReady_; /** - At load time, these strings is used to initialize the - structureVisibility_ vector. + At load time, these strings are used to initialize the structureVisibility_ + vector. - As a special case, if initiallyVisibleStructures_ is empty, ALL structures - will be made visible. + As a special case, if initiallyVisibleStructures_ contains a single string + that is '*', ALL structures will be made visible. */ std::vector<std::string> initiallyVisibleStructures_;
--- a/Framework/Scene2DViewport/MeasureCommands.cpp Mon Oct 07 22:11:46 2019 +0200 +++ b/Framework/Scene2DViewport/MeasureCommands.cpp Mon Oct 07 22:37:24 2019 +0200 @@ -71,8 +71,8 @@ DeleteMeasureCommand::DeleteMeasureCommand(boost::shared_ptr<MeasureTool> measureTool, boost::weak_ptr<ViewportController> controllerW) : MeasureCommand(controllerW) + , mementoOriginal_(measureTool->GetMemento()) , measureTool_(measureTool) - , mementoOriginal_(measureTool->GetMemento()) , mementoModified_(measureTool->GetMemento()) { GetMeasureTool()->Disable();
--- a/Framework/StoneException.h Mon Oct 07 22:11:46 2019 +0200 +++ b/Framework/StoneException.h Mon Oct 07 22:37:24 2019 +0200 @@ -58,6 +58,8 @@ { } + virtual ~StoneException() {} + ErrorCode GetErrorCode() const { return errorCode_; @@ -111,6 +113,7 @@ { protected: int applicationErrorCode_; + mutable std::string errorMessage_; public: explicit StoneApplicationException(int applicationErrorCode) : @@ -126,7 +129,10 @@ virtual const char* What() const { - return boost::lexical_cast<std::string>(applicationErrorCode_).c_str(); + if (errorMessage_.size() == 0) + errorMessage_ = boost::lexical_cast<std::string>(applicationErrorCode_); + + return errorMessage_.c_str(); } }; }
--- a/Framework/Toolbox/DicomInstanceParameters.cpp Mon Oct 07 22:11:46 2019 +0200 +++ b/Framework/Toolbox/DicomInstanceParameters.cpp Mon Oct 07 22:37:24 2019 +0200 @@ -339,11 +339,11 @@ Orthanc::ImageProcessing::Convert(*converted, pixelData); // Correct rescale slope/intercept if need be - data_.ApplyRescale(*converted, (pixelData.GetFormat() == Orthanc::PixelFormat_Grayscale32)); + //data_.ApplyRescale(*converted, (pixelData.GetFormat() == Orthanc::PixelFormat_Grayscale32)); + data_.ApplyRescale(*converted, false); return converted.release(); } - TextureBaseSceneLayer* DicomInstanceParameters::CreateTexture
--- a/Resources/CMake/OrthancStoneConfiguration.cmake Mon Oct 07 22:11:46 2019 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Mon Oct 07 22:37:24 2019 +0200 @@ -106,7 +106,7 @@ if (ENABLE_SDL AND ENABLE_QT) - message("SDL and QT may not be defined together") + message("SDL and QT cannot not be enabled together") elseif(ENABLE_SDL) message("SDL is enabled") include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) @@ -267,10 +267,13 @@ endif() if (ENABLE_SDL OR ENABLE_QT) - list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationRunner.cpp - ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationContext.cpp - ) + if (ENABLE_STONE_DEPRECATED) + list(APPEND APPLICATIONS_SOURCES + ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationRunner.cpp + ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationContext.cpp + ) + endif() + if (ENABLE_SDL) list(APPEND APPLICATIONS_SOURCES ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlCairoSurface.cpp
--- a/Resources/CMake/QtConfiguration.cmake Mon Oct 07 22:11:46 2019 +0200 +++ b/Resources/CMake/QtConfiguration.cmake Mon Oct 07 22:37:24 2019 +0200 @@ -31,6 +31,12 @@ Qt5::Core ) + if (ENABLE_OPENGL) + link_libraries( + Qt5::QtOpenGL + ) + endif() + # Create aliases for the CMake commands macro(ORTHANC_QT_WRAP_UI) QT5_WRAP_UI(${ARGN}) @@ -39,7 +45,7 @@ macro(ORTHANC_QT_WRAP_CPP) QT5_WRAP_CPP(${ARGN}) endmacro() - + else() message("Qt5 has not been found, trying with Qt4") find_package(Qt4 REQUIRED QtGui) @@ -47,6 +53,12 @@ Qt4::QtGui ) + if (ENABLE_OPENGL) + link_libraries( + Qt4::QtOpenGL + ) + endif() + # Create aliases for the CMake commands macro(ORTHANC_QT_WRAP_UI) QT4_WRAP_UI(${ARGN}) @@ -58,17 +70,26 @@ endif() + list(APPEND QT_SOURCES ${ORTHANC_STONE_ROOT}/Applications/Qt/QCairoWidget.cpp - ${ORTHANC_STONE_ROOT}/Applications/Qt/QtStoneApplicationRunner.cpp - ${ORTHANC_STONE_ROOT}/Applications/Qt/QStoneMainWindow.cpp ) ORTHANC_QT_WRAP_CPP(QT_SOURCES ${ORTHANC_STONE_ROOT}/Applications/Qt/QCairoWidget.h - ${ORTHANC_STONE_ROOT}/Applications/Qt/QStoneMainWindow.h ) +if (ENABLE_STONE_DEPRECATED) + list(APPEND QT_SOURCES + ${ORTHANC_STONE_ROOT}/Applications/Qt/QtStoneApplicationRunner.cpp + ${ORTHANC_STONE_ROOT}/Applications/Qt/QStoneMainWindow.cpp + ) + + ORTHANC_QT_WRAP_CPP(QT_SOURCES + ${ORTHANC_STONE_ROOT}/Applications/Qt/QStoneMainWindow.h + ) +endif() + # NB: Including CMAKE_CURRENT_BINARY_DIR is mandatory, as the CMake # macros for Qt will put their result in that directory, which cannot