From 8cda0a83795d1ef638418a78646b9477d3e43bd5 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Mon, 16 Dec 2024 21:22:02 +0100 Subject: [PATCH 01/16] Preprocessor and BackProjector module directories --- CMakeLists.txt | 144 ++++++------------------------------------------- 1 file changed, 17 insertions(+), 127 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b827d1b41..00a863440 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,14 +59,20 @@ if (WIN32) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/BackProjectors) elseif (LINUX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/BackProjectors) elseif (APPLE) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/BackProjectors) include_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) endif() @@ -234,130 +240,14 @@ add_subdirectory(frameworks/tomography/pyMuhRec) add_subdirectory(core/algorithms/pyimgalg) add_subdirectory(core/algorithms/pyadvancedfilters) -# if(DYNAMIC_LIB) - # install( - # EXPORT ${EXPORT_NAME} - # DESTINATION "lib/cmake/kipl" - # NAMESPACE kipl:: - # ) - - # include(CMakePackageConfigHelpers) - # configure_package_config_file( - # ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in - # "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - # INSTALL_DESTINATION lib/cmake/kipl - # ) - # write_basic_package_version_file( - # "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" - # VERSION "${CMAKE_PROJECT_VERSION}" - # COMPATIBILITY SameMinorVersion # switch to SameMajorVersion after 1.0 - # # release - # ) - # install( - # FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - # "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" - # DESTINATION lib/cmake/kipl - # ) - # if (LINUX) - # print('Linux') - # install(FILES - # ../lib/libkipl.so.1.0.0 - # ../lib/libModuleConfig.so.1.0.0 - # ../lib/libReconFramework.so.1.0.0 - # ../lib/libStdBackProjectors.so.1.0.0 - # ../lib/libFDKBackProjectors.so.1.0.0 - # ../lib/libImagingAlgorithms.so.1.0.0 - # ../lib/libReaderConfig.so.1.0.0 - # ../lib/libNeXus.so.1.0.0 - # ../lib/libhdf5_cpp.so.11 - # ../lib/libNeXusCPP.so.1.0.0 - # ../lib/libhdf5_hl.so.10 - # ../lib/libhdf5.so.10 - # ../lib/libsz.so.2 - - # DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) - - # execute_process( - # COMMAND for f in `ls *.so.1.0.0`; do ln -s $f `basename $f .so.1.0.0`.so.1; done - # WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib" - # ) - # endif() - # if (APPLE) - # install(FILES - # # ../ExternalDependencies/macos/${CMAKE_HOST_SYSTEM_PROCESSOR}/lib/libNeXus.1.0.0.dylib - # # ../ExternalDependencies/macos/${CMAKE_HOST_SYSTEM_PROCESSOR}/lib/libNeXusCPP.1.0.0.dylib - # # /opt/homebrew/lib/libhdf5.dylib - # # /opt/homebrew/lib/libhdf5_cpp.dylib - - # # external/mac/lib/libNeXus.1.0.0.dylib - # # external/mac/lib//libhdf5_cpp.11.dylib - # # external/mac/lib//libNeXusCPP.1.0.0.dylib - # # external/mac/lib//libhdf5_hl.10.dylib - # # external/mac/lib//libhdf5.10.dylib - # # external/mac/lib//libsz.2.dylib - - # DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) - - # execute_process( - # COMMAND for f in `ls *.1.0.0.*`; do ln -s $f `basename $f .1.0.0.dylib`.1.dylib; done - # WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib" - # ) - # endif() - - - - -# endif(DYNAMIC_LIB) -# if (WIN32) -# message("${OpenBLAS_LIBRARIES}") -# install(FILES -# external/lib64/nexus/NeXus.dll -# external/lib64/nexus/NeXusCPP.dll -# external/lib64/hdf5/hdf5_hl.dll -# external/lib64/hdf5/hdf5.dll -# external/lib64/hdf5/hdf5_cpp.dll -# external/lib64/hdf5/zlib.dll -# external/lib64/hdf5/szip.dll -# external/lib64/libtiff.dll -# external/lib64/libjpeg-62.dll -# external/lib64/zlib1.dll -# external/lib64/libfftw3-3.dll -# external/lib64/libfftw3f-3.dll - - -# # ${OpenBLAS_LIBRARIES} -# # external/lib64/libblas.dll -# # external/lib64/liblapack.dll -# # external/lib64/liblapacke.dll -# # external/lib64/libquadmath-0.dll -# # external/lib64/libgfortran_64-3.dll -# # external/lib64/libwinpthread-1.dll -# # external/lib64/libgcc_s_seh-1.dll -# # external/lib64/libgcc_s_seh_64-1.dll -# # ../ExternalDependencies/windows/bin/libopenblas.dll - -# ../ExternalDependencies/windows/bin/libxml2.dll -# ../ExternalDependencies/windows/bin/cfitsio.dll -# ../ExternalDependencies/windows/bin/libopenblas.dll - -# DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) -# endif() -# message(${CMAKE_CURRENT_SOURCE_DIR}) - -## define test -#add_test( -# NAME -# testBindAverageImage -# COMMAND -# ${CMAKE_COMMAND} -E env IMAGALG_MODULE_PATH=$ -# ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/UnitTests/python/testBindAverageImage.py -# ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/UnitTests/python/testBindAverageImage.py -#) -# -#add_test( -# NAME -# testBindPolynomialCorrection -# COMMAND -# ${CMAKE_COMMAND} -E env IMAGALG_MODULE_PATH=$ -# ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/UnitTests/python/testBindPolynomialCorrection.py -#) +set_target_properties(InspectorModules StdPreprocModules + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${PREPROCESSOR_MODULES_DIRECTORY} + RUNTIME_OUTPUT_DIRECTORY ${PREPROCESSOR_MODULES_DIRECTORY} +) + +set_target_properties(FDKBackProjectors StdBackProjectors + PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${PROJECTOR_MODULES_DIRECTORY} + RUNTIME_OUTPUT_DIRECTORY ${PROJECTOR_MODULES_DIRECTORY} +) \ No newline at end of file From 6b8df36bea373c398a90044b95bdab1cc3d8831e Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Tue, 31 Dec 2024 08:48:40 +0100 Subject: [PATCH 02/16] add m_sPreprocessorsPath and m_sBackProjectorsPath to mainwindow --- GUI/qt/QtModuleConfigure/AddModuleDialog.cpp | 12 ++++- applications/muhrec/src/muhrecmainwindow.cpp | 57 +++++++++----------- applications/muhrec/src/muhrecmainwindow.h | 2 + 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp index 9e05ec4ce..238284b88 100644 --- a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp +++ b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp @@ -77,6 +77,10 @@ int AddModuleDialog::exec() QString appPath = QCoreApplication::applicationDirPath(); std::ostringstream msg; + #ifdef Q_OS_WIN + appPath+="/Preprocessors"; + #endif + msg<<"appPath "<applicationDirPath().toStdString()), + m_sPreprocessorsPath(""), + m_sBackProjectorsPath(""), m_sHomePath(QDir::homePath().toStdString()), m_sConfigFilename("noname.xml"), m_sPreviewMask(""), @@ -93,46 +95,41 @@ MuhRecMainWindow::MuhRecMainWindow(QApplication *app, QWidget *parent) : dir.mkdir(QString::fromStdString(m_sConfigPath)); } - msg.str(""); - msg<<"ApplicationPath = "<ConfiguratorBackProj->Configure("muhrecbp",defaultmodules,m_sApplicationPath); -#ifdef Q_OS_WIN - defaultmodules=m_sApplicationPath+"\\StdPreprocModules.dll"; -#else - #ifdef Q_OS_MAC - defaultmodules = m_sApplicationPath+"../Frameworks/libStdPreprocModules.dylib"; - #else - //defaultmodules = m_sApplicationPath+"../Frameworks/libStdPreprocModules.so"; - defaultmodules = m_sApplicationPath+"../lib/libstdPreprocModules.so"; - #endif -#endif + kipl::strings::filenames::CheckPathSlashes(m_sPreprocessorsPath,true); + kipl::strings::filenames::CheckPathSlashes(m_sBackProjectorsPath,true); + msg.str(""); + msg<<"ApplicationPath = "<moduleconfigurator->configure("muhrec",m_sApplicationPath,&m_ModuleConfigurator); - ui->moduleconfigurator->SetDefaultModuleSource(defaultmodules); + ui->moduleconfigurator->SetDefaultModuleSource(defaultpreprocessors); ui->moduleconfigurator->SetApplicationObject(this); - - m_oldROI = {0,0,1,1}; QSignalBlocker a(ui->spinSlicesFirst); @@ -643,10 +640,6 @@ void MuhRecMainWindow::LoadDefaults(bool checkCurrent) std::string defaultsname=m_sHomePath+".imagingtools/CurrentRecon.xml"; kipl::strings::filenames::CheckPathSlashes(defaultsname,false); - - std::string sModulePath=m_sApplicationPath; - kipl::strings::filenames::CheckPathSlashes(sModulePath,true); - msg.str(""); msg<<"default name is "< Date: Tue, 31 Dec 2024 09:21:45 +0100 Subject: [PATCH 03/16] update BackProjector configurebox --- GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp | 4 +++- GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp b/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp index d29aa8e55..6fe0eef35 100644 --- a/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp +++ b/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp @@ -194,9 +194,11 @@ void SingleModuleSettingsDialog::on_ButtonBrowse_Clicked() { logger(kipl::logging::Logger::LogMessage,"browse"); + QString appPath = QCoreApplication::applicationDirPath(); QString fileName; + #ifdef Q_OS_WIN - QString appPath = QCoreApplication::applicationDirPath()+"\\"; + appPath+="/Preprocessors"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dll)")); #else QString appPath = QCoreApplication::applicationDirPath()+"/../Frameworks/"; diff --git a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp index e3ee49d7a..4f2852579 100644 --- a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp +++ b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp @@ -255,12 +255,13 @@ void SingleModuleSettingsDialog::on_pushButton_Browse_clicked() { logger.message("Browse"); + QString appPath = QCoreApplication::applicationDirPath(); QString fileName; #ifdef Q_OS_WIN - QString appPath = QCoreApplication::applicationDirPath()+"\\"; + appPath += "/BackProjectors"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dll)")); #else - QString appPath = QCoreApplication::applicationDirPath()+"/../Frameworks/"; + appPath +="/../Frameworks/"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dylib | *.so)")); #endif logger.message(appPath.toStdString()); From 0d1d94920d6279194824b496b943dd1c6fbe74a8 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 2 Jan 2025 10:39:36 +0100 Subject: [PATCH 04/16] Update Linux and MacOS paths --- GUI/qt/QtModuleConfigure/AddModuleDialog.cpp | 37 +++++++++++-------- .../singlemoduleconfiguratorwidget.cpp | 12 ++++-- .../singlemodulesettingsdialog.cpp | 11 ++++-- applications/muhrec/src/muhrecmainwindow.cpp | 31 ++++++++-------- 4 files changed, 52 insertions(+), 39 deletions(-) diff --git a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp index 238284b88..94cd75982 100644 --- a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp +++ b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp @@ -77,8 +77,12 @@ int AddModuleDialog::exec() QString appPath = QCoreApplication::applicationDirPath(); std::ostringstream msg; - #ifdef Q_OS_WIN + #if defined(Q_OS_WIN) appPath+="/Preprocessors"; + #elif defined(Q_OS_MAC) + appPath+="/../Preprocessors"; + #elif defined(Q_OS_LINUX) + appPath+="/../Preprocessors"; #endif msg<<"appPath "< Date: Thu, 2 Jan 2025 11:56:03 +0100 Subject: [PATCH 05/16] Remove python 3.7 and 3.8, add 3.13. Update to uploaded ZIP folders. --- .github/workflows/Build-multi-OS.yml | 58 +++++++++++++++++++++------- .github/workflows/Build-wheels.yml | 2 +- conanfile.py | 17 +++----- 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index b90885af1..b3f3d0718 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -168,22 +168,50 @@ jobs: name: ${{runner.os}}-${{runner.arch}}-test-results path: ${{ matrix.build_root }}/Testing - - name: Compress artifact - shell: bash - working-directory: ${{ matrix.build_root }} - run: | - if [ "${RUNNER_OS}" == "Windows" ]; then - 7z a ../MuhRec-${{runner.os}}-${{runner.arch}}.zip "bin/Release/*" -xr!t*.exe -xr!muhreccli.exe -xr!verticalslicer.exe - elif [ "${RUNNER_OS}" == "Linux" ]; then - zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip bin/* lib/* -x "bin/t*" -x "bin/verticalslicer" - elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "X64" ]; then - zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" - elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "ARM64" ]; then - zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" -x "lib/*.h" - fi + # - name: Compress artifact + # shell: bash + # working-directory: ${{ matrix.build_root }} + # run: | + # if [ "${RUNNER_OS}" == "Windows" ]; then + # 7z a ../MuhRec-${{runner.os}}-${{runner.arch}}.zip "bin/Release/*" -xr!t*.exe -xr!muhreccli.exe -xr!verticalslicer.exe + # elif [ "${RUNNER_OS}" == "Linux" ]; then + # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip bin/* lib/* -x "bin/t*" -x "bin/verticalslicer" + # elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "X64" ]; then + # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" + # elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "ARM64" ]; then + # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" -x "lib/*.h" + # fi + + - name: Save build artifact Windows + if: ${{ runner.os == 'Windows' }} + uses: actions/upload-artifact@master + with: + name: MuhRec-${{runner.os}}-${{runner.arch}} + path: | + ${{ matrix.build_root }}/bin/Release/* + !${{ matrix.build_root }}/bin/Release/t*.exe - - name: Save build artifact + - name: Save build artifact Linux + if: ${{ runner.os == 'Linux' }} + uses: actions/upload-artifact@master + with: + name: MuhRec-${{runner.os}}-${{runner.arch}} + path: | + ${{ matrix.build_root }}/bin/* + !${{ matrix.build_root }}/bin/t* + ${{ matrix.build_root }}/Preprocessors/* + ${{ matrix.build_root }}/BackProjectors/* + ${{ matrix.build_root }}/lib/* + + - name: Save build artifact MacOS + if: ${{ runner.os == 'macOS' }} uses: actions/upload-artifact@master with: name: MuhRec-${{runner.os}}-${{runner.arch}} - path: "${{ github.workspace }}/MuhRec*.zip" + path: | + ${{ matrix.build_root }}/*.app/* + ${{ matrix.build_root }}/Preprocessors/* + ${{ matrix.build_root }}/BackProjectors/* + ${{ matrix.build_root }}/lib/* + !${{ matrix.build_root }}/lib/*.dylib + !${{ matrix.build_root }}/lib/*.h \ No newline at end of file diff --git a/.github/workflows/Build-wheels.yml b/.github/workflows/Build-wheels.yml index f7476481f..b5d372d1d 100644 --- a/.github/workflows/Build-wheels.yml +++ b/.github/workflows/Build-wheels.yml @@ -32,7 +32,7 @@ jobs: # 4. 9: - shutil.copytree( - os.path.join(self.source_folder,"applications","muhrec","Resources"), - dst, - dirs_exist_ok=True, - ) - else: - shutil.copytree( - os.path.join(self.source_folder,"applications","muhrec","Resources"), - dst - ) + shutil.copytree( + os.path.join(self.source_folder,"applications","muhrec","Resources"), + dst, + dirs_exist_ok=True, + ) def build(self): cmake = CMake(self) From 090a26e40a5ba260c986c174f2b75da01f5ebf79 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Thu, 2 Jan 2025 15:48:05 +0100 Subject: [PATCH 06/16] Update test in workflow --- .github/workflows/Build-multi-OS.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index b3f3d0718..11505424f 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -156,9 +156,26 @@ jobs: - name: Test id: tests working-directory: ${{ matrix.build_root }} + shell: bash #Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). #See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --build-config ${{ matrix.build_type }} + # The seperation of module files into seperate folders breaks the ctest test discovery, copy temprarily to the root folder for testing + run: | + if [ "${RUNNER_OS}" == "Windows" ]; then + cp ./Preprocessors/* ./BackProjectors/* ./ + else + cp ./Preprocessors/* ./BackProjectors/* ./lib/ + fi + + ctest --build-config ${{ matrix.build_type }} + + if [ "${RUNNER_OS}" == "Windows" ]; then + rm *Modules.dll *Projectors.dll + elif [ "${RUNNER_OS}" == "Linux" ]; then + rm lib/*Modules.so lib/*Projectors.so + elif [ "${RUNNER_OS}" == "macOS" ]; then + rm lib/*Modules.dylib lib/*Projectors.dylib + fi continue-on-error: true - name: Archive test results From 66691218a5bcce2bb2f75ba2f31c8277c42f85eb Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Fri, 3 Jan 2025 14:41:03 +0100 Subject: [PATCH 07/16] Move Preproccesor and BackProjector folders into PlugIn folder and fix windows test --- .github/workflows/Build-multi-OS.yml | 23 ++++---- CMakeLists.txt | 14 ++--- GUI/qt/QtModuleConfigure/AddModuleDialog.cpp | 54 +++++++++---------- GUI/qt/QtModuleConfigure/AddModuleDialog.h | 1 + .../singlemodulesettingsdialog.cpp | 6 +-- applications/muhrec/src/muhrecmainwindow.cpp | 12 ++--- conanfile.py | 18 +++++-- 7 files changed, 65 insertions(+), 63 deletions(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index 11505424f..05cd38df5 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -162,15 +162,17 @@ jobs: # The seperation of module files into seperate folders breaks the ctest test discovery, copy temprarily to the root folder for testing run: | if [ "${RUNNER_OS}" == "Windows" ]; then - cp ./Preprocessors/* ./BackProjectors/* ./ - else - cp ./Preprocessors/* ./BackProjectors/* ./lib/ + cp ./bin/Release/PlugIns/Preprocessors/* ./bin/Release/PlugIns/BackProjectors/* ./bin/Release/ + elif [ "${RUNNER_OS}" == "Linux" ]; then + cp ./PlugIns/Preprocessors/* ./PlugIns/BackProjectors/* ./lib/ + elif [ "${RUNNER_OS}" == "macOS" ]; then + cp ./lib/PlugIns/Preprocessors/* ./lib/PlugIns/BackProjectors/* ./lib/ fi ctest --build-config ${{ matrix.build_type }} if [ "${RUNNER_OS}" == "Windows" ]; then - rm *Modules.dll *Projectors.dll + rm ./bin/Release/*Modules.dll ./bin/Release/*Projectors.dll elif [ "${RUNNER_OS}" == "Linux" ]; then rm lib/*Modules.so lib/*Projectors.so elif [ "${RUNNER_OS}" == "macOS" ]; then @@ -207,6 +209,7 @@ jobs: path: | ${{ matrix.build_root }}/bin/Release/* !${{ matrix.build_root }}/bin/Release/t*.exe + !${{ matrix.build_root }}/bin/Release/*.pyd - name: Save build artifact Linux if: ${{ runner.os == 'Linux' }} @@ -216,9 +219,10 @@ jobs: path: | ${{ matrix.build_root }}/bin/* !${{ matrix.build_root }}/bin/t* - ${{ matrix.build_root }}/Preprocessors/* - ${{ matrix.build_root }}/BackProjectors/* + ${{ matrix.build_root }}/PlugIns/* ${{ matrix.build_root }}/lib/* + !${{ matrix.build_root }}/lib/*cpython* + ${{ matrix.build_root }}/resources/* - name: Save build artifact MacOS if: ${{ runner.os == 'macOS' }} @@ -226,9 +230,4 @@ jobs: with: name: MuhRec-${{runner.os}}-${{runner.arch}} path: | - ${{ matrix.build_root }}/*.app/* - ${{ matrix.build_root }}/Preprocessors/* - ${{ matrix.build_root }}/BackProjectors/* - ${{ matrix.build_root }}/lib/* - !${{ matrix.build_root }}/lib/*.dylib - !${{ matrix.build_root }}/lib/*.h \ No newline at end of file + ${{ matrix.build_root }}/*.app/* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 00a863440..c518bd006 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,22 +57,22 @@ endif() if (WIN32) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/Release) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release) - set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/Preprocessors) - set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/BackProjectors) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/PlugIns/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Release/PlugIns/BackProjectors) elseif (LINUX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) - set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/Preprocessors) - set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/BackProjectors) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/PlugIns/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/PlugIns/BackProjectors) elseif (APPLE) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) - set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/Preprocessors) - set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/BackProjectors) + set(PREPROCESSOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/lib/Preprocessors) + set(PROJECTOR_MODULES_DIRECTORY ${CMAKE_BINARY_DIR}/lib/BackProjectors) include_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) endif() diff --git a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp index 94cd75982..a44d9b9db 100644 --- a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp +++ b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp @@ -34,6 +34,7 @@ AddModuleDialog::AddModuleDialog(QWidget * parent) : m_Button_Cancel("Cancel"), m_sApplication("muhrec"), m_sApplicationPath(""), + m_sPreprocessorsPath(""), m_ModuleConfig("") { setWindowTitle(tr("Add a module")); @@ -60,6 +61,20 @@ AddModuleDialog::AddModuleDialog(QWidget * parent) : connect(&m_Button_OK,SIGNAL(clicked()),this,SLOT(accept())); connect(&m_Button_Cancel,SIGNAL(clicked()),this,SLOT(reject())); connect(&m_Button_Browse,SIGNAL(clicked()),this,SLOT(on_change_objectfile())); + + m_sApplicationPath = QCoreApplication::applicationDirPath().toStdString(); + kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); + +#if defined(Q_OS_WIN) + m_sPreprocessorsPath = m_sApplicationPath+"PlugIns\\Preprocessors\\"; +#elif defined(Q_OS_MAC) + m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; +#elif defined(Q_OS_LINUX) + m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; +#endif + + kipl::strings::filenames::CheckPathSlashes(m_sPreprocessorsPath,true); + } int AddModuleDialog::configure(std::string application, std::string defaultsource, std::string application_path) @@ -74,18 +89,9 @@ int AddModuleDialog::configure(std::string application, std::string defaultsourc int AddModuleDialog::exec() { - QString appPath = QCoreApplication::applicationDirPath(); std::ostringstream msg; - #if defined(Q_OS_WIN) - appPath+="/Preprocessors"; - #elif defined(Q_OS_MAC) - appPath+="/../Preprocessors"; - #elif defined(Q_OS_LINUX) - appPath+="/../Preprocessors"; - #endif - - msg<<"appPath "< > modulelist; std::string m_sApplication; std::string m_sApplicationPath; + std::string m_sPreprocessorsPath; std::string m_sDefaultModuleSource; ModuleConfig m_ModuleConfig; }; diff --git a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp index 85da944ad..319ca378d 100644 --- a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp +++ b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp @@ -258,13 +258,13 @@ void SingleModuleSettingsDialog::on_pushButton_Browse_clicked() QString appPath = QCoreApplication::applicationDirPath(); QString fileName; #if defined(Q_OS_WIN) - appPath += "/BackProjectors"; + appPath += "/PlugIns/BackProjectors"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dll)")); #elif defined(Q_OS_MAC) - appPath +="/../BackProjectors/"; + appPath +="/../PlugIns/BackProjectors/"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dylib)")); #elif defined(Q_OS_LINUX) - appPath +="/../BackProjectors/"; + appPath +="/../PlugIns/BackProjectors/"; fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.so)")); #endif logger.message(appPath.toStdString()); diff --git a/applications/muhrec/src/muhrecmainwindow.cpp b/applications/muhrec/src/muhrecmainwindow.cpp index 5582be4dd..27a951e1f 100644 --- a/applications/muhrec/src/muhrecmainwindow.cpp +++ b/applications/muhrec/src/muhrecmainwindow.cpp @@ -101,18 +101,18 @@ MuhRecMainWindow::MuhRecMainWindow(QApplication *app, QWidget *parent) : std::string defaultpreprocessors; std::string defaultprojectors; #if defined(Q_OS_WIN) - m_sPreprocessorsPath = m_sApplicationPath+"Preprocessors\\"; - m_sBackProjectorsPath = m_sApplicationPath+"BackProjectors\\"; + m_sPreprocessorsPath = m_sApplicationPath+"PlugIns\\Preprocessors\\"; + m_sBackProjectorsPath = m_sApplicationPath+"PlugIns\\BackProjectors\\"; defaultpreprocessors=m_sPreprocessorsPath+"StdPreprocModules.dll"; defaultprojectors=m_sBackProjectorsPath+"StdBackProjectors.dll"; #elif defined(Q_OS_MAC) - m_sPreprocessorsPath = m_sApplicationPath+"../Preprocessors/"; - m_sBackProjectorsPath = m_sApplicationPath+"../BackProjectors/"; + m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; + m_sBackProjectorsPath = m_sApplicationPath+"../PlugIns/BackProjectors/"; defaultpreprocessors=m_sPreprocessorsPath+"StdPreprocModules.dylib"; defaultprojectors=m_sBackProjectorsPath+"StdBackProjectors.dylib"; #elif defined(Q_OS_LINUX) - m_sPreprocessorsPath = m_sApplicationPath+"../Preprocessors/"; - m_sBackProjectorsPath = m_sApplicationPath+"../BackProjectors/"; + m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; + m_sBackProjectorsPath = m_sApplicationPath+"../PlugIns/BackProjectors/"; defaultpreprocessors=m_sPreprocessorsPath+"StdPreprocModules.so"; defaultprojectors=m_sBackProjectorsPath+"StdBackProjectors.so"; #endif diff --git a/conanfile.py b/conanfile.py index e3f2fab24..abe75e6c0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -68,14 +68,14 @@ def generate(self): if self.settings.os == "Linux": for library in Qt_linux_library_list: copy(self, "lib"+library+".so*", os.path.join(qtpath, "lib"), self.lib_folder) - copy(self, "libqxcb.so", os.path.join(qtpath, "plugins", "platforms"), os.path.join(bin_folder, "platforms")) + copy(self, "libqxcb.so", os.path.join(qtpath, "plugins", "platforms"), os.path.join(bin_folder, "platforms")) if self.settings.os == "Windows": dst = os.path.join(bin_folder,"resources") elif self.settings.os == "Linux": - dst = os.path.join(bin_folder,"../","resources") + dst = os.path.join(bin_folder,"..","resources") else: - dst = os.path.join(self.framework_folder_MuhRec,"../",'Resources') + dst = os.path.join(self.framework_folder_MuhRec,"..",'Resources') if self.settings.arch == "armv8": sse2neon_dir = StringIO() self.run("brew --prefix sse2neon", stdout=sse2neon_dir) @@ -92,5 +92,13 @@ def build(self): cmake.configure() cmake.build() if self.settings.os == "Macos": - copy(self, "*.dylib", self.lib_folder, self.framework_folder_MuhRec, excludes='*cpython*') - copy(self, "*.dylib", self.lib_folder, self.framework_folder_imageviewer, excludes='*cpython*') + # Copy to both MuhRec and ImageViewer app bundles + for framework_folder in [self.framework_folder_MuhRec, self.framework_folder_imageviewer]: + copy(self, "*.dylib", self.lib_folder, framework_folder, excludes=['*cpython*', 'BackProjectors', 'Preprocessors']) + # Copy plugin dylibs to the PlugIns folder in the app bundles + for plugin_type in ["Preprocessors", "BackProjectors"]: + shutil.copytree( + os.path.join(self.lib_folder, plugin_type), + os.path.join(framework_folder, "..", "PlugIns", plugin_type), + dirs_exist_ok=True, + ) From 7459db301ff77f2203171427a68e046127071ade Mon Sep 17 00:00:00 2001 From: MuhRec VM Date: Fri, 3 Jan 2025 16:00:19 +0100 Subject: [PATCH 08/16] Fix module names MacOS/Linux --- .github/workflows/Build-multi-OS.yml | 4 ++-- applications/muhrec/src/muhrecmainwindow.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index 05cd38df5..d8e2d9b07 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -166,7 +166,7 @@ jobs: elif [ "${RUNNER_OS}" == "Linux" ]; then cp ./PlugIns/Preprocessors/* ./PlugIns/BackProjectors/* ./lib/ elif [ "${RUNNER_OS}" == "macOS" ]; then - cp ./lib/PlugIns/Preprocessors/* ./lib/PlugIns/BackProjectors/* ./lib/ + cp ./lib/Preprocessors/* ./lib/BackProjectors/* ./lib/ fi ctest --build-config ${{ matrix.build_type }} @@ -176,7 +176,7 @@ jobs: elif [ "${RUNNER_OS}" == "Linux" ]; then rm lib/*Modules.so lib/*Projectors.so elif [ "${RUNNER_OS}" == "macOS" ]; then - rm lib/*Modules.dylib lib/*Projectors.dylib + rm -r lib/*Modules.dylib lib/*Projectors.dylib lib/sse2neon fi continue-on-error: true diff --git a/applications/muhrec/src/muhrecmainwindow.cpp b/applications/muhrec/src/muhrecmainwindow.cpp index 27a951e1f..12b05399f 100644 --- a/applications/muhrec/src/muhrecmainwindow.cpp +++ b/applications/muhrec/src/muhrecmainwindow.cpp @@ -108,13 +108,13 @@ MuhRecMainWindow::MuhRecMainWindow(QApplication *app, QWidget *parent) : #elif defined(Q_OS_MAC) m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; m_sBackProjectorsPath = m_sApplicationPath+"../PlugIns/BackProjectors/"; - defaultpreprocessors=m_sPreprocessorsPath+"StdPreprocModules.dylib"; - defaultprojectors=m_sBackProjectorsPath+"StdBackProjectors.dylib"; + defaultpreprocessors=m_sPreprocessorsPath+"libStdPreprocModules.dylib"; + defaultprojectors=m_sBackProjectorsPath+"libStdBackProjectors.dylib"; #elif defined(Q_OS_LINUX) m_sPreprocessorsPath = m_sApplicationPath+"../PlugIns/Preprocessors/"; m_sBackProjectorsPath = m_sApplicationPath+"../PlugIns/BackProjectors/"; - defaultpreprocessors=m_sPreprocessorsPath+"StdPreprocModules.so"; - defaultprojectors=m_sBackProjectorsPath+"StdBackProjectors.so"; + defaultpreprocessors=m_sPreprocessorsPath+"libStdPreprocModules.so"; + defaultprojectors=m_sBackProjectorsPath+"libStdBackProjectors.so"; #endif kipl::strings::filenames::CheckPathSlashes(m_sPreprocessorsPath,true); From 0a453a443a8440f329d55a6ab334c5d9344bbed2 Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Wed, 8 Jan 2025 14:41:53 +0100 Subject: [PATCH 09/16] ubuntu-latest is now ubuntu 24.04 on GitHub. Keep using Ubuntu 22.04 --- .github/workflows/Build-multi-OS.yml | 16 +--------------- .github/workflows/Build-wheels.yml | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index d8e2d9b07..f9ed9b295 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -38,7 +38,7 @@ jobs: cl: 17 build_type: Release build_root: build-imagingsuite - - os: ubuntu-latest + - os: ubuntu-22.04 c_compiler: gcc cpp_compiler: g++ gcc: 11 @@ -187,20 +187,6 @@ jobs: name: ${{runner.os}}-${{runner.arch}}-test-results path: ${{ matrix.build_root }}/Testing - # - name: Compress artifact - # shell: bash - # working-directory: ${{ matrix.build_root }} - # run: | - # if [ "${RUNNER_OS}" == "Windows" ]; then - # 7z a ../MuhRec-${{runner.os}}-${{runner.arch}}.zip "bin/Release/*" -xr!t*.exe -xr!muhreccli.exe -xr!verticalslicer.exe - # elif [ "${RUNNER_OS}" == "Linux" ]; then - # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip bin/* lib/* -x "bin/t*" -x "bin/verticalslicer" - # elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "X64" ]; then - # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" - # elif [ "${RUNNER_OS}" == "macOS" -a "${RUNNER_ARCH}" == "ARM64" ]; then - # zip -r ../../MuhRec-${{runner.os}}-${{runner.arch}}.zip lib/* *.app/* -x "lib/*.dylib" -x "lib/*.h" - # fi - - name: Save build artifact Windows if: ${{ runner.os == 'Windows' }} uses: actions/upload-artifact@master diff --git a/.github/workflows/Build-wheels.yml b/.github/workflows/Build-wheels.yml index b5d372d1d..474454687 100644 --- a/.github/workflows/Build-wheels.yml +++ b/.github/workflows/Build-wheels.yml @@ -33,7 +33,7 @@ jobs: # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the list. matrix: # Qt requires py7zr==0.20.x which requires python 3.7^ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - os: [windows-2022, ubuntu-latest, macos-13, macos-14] + os: [windows-2022, ubuntu-22.04, macos-13, macos-14] include: - os: windows-2022 c_compiler: cl @@ -41,7 +41,7 @@ jobs: cl: 17 build_type: Release build_root: build-imagingsuite - - os: ubuntu-latest + - os: ubuntu-22.04 c_compiler: gcc cpp_compiler: g++ gcc: 11 From ae418ecd2f86f0bd82c6729aea31199fecd064de Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Wed, 8 Jan 2025 15:37:57 +0100 Subject: [PATCH 10/16] update wheel workflow to new folder structure --- .github/workflows/Build-wheels.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build-wheels.yml b/.github/workflows/Build-wheels.yml index 474454687..91794c211 100644 --- a/.github/workflows/Build-wheels.yml +++ b/.github/workflows/Build-wheels.yml @@ -177,14 +177,14 @@ jobs: run: | if [ "${RUNNER_OS}" == "Windows" ]; then cd bin/Release - cp *.dll ../../../imagingsuite/package/pymuhrec + cp *.dll PlugIns/BackProjectors/*.dll PlugIns/Preprocessors/*.dll ../../../imagingsuite/package/pymuhrec cp *.pyd ../../../imagingsuite/package/pymuhrec elif [ "${RUNNER_OS}" == "Linux" ]; then - cd Release/lib - cp * ../../../imagingsuite/package/pymuhrec + cd Release + cp lib/* PlugIns/BackProjectors/*.so PlugIns/Preprocessors/*.so ../../imagingsuite/package/pymuhrec elif [ "${RUNNER_OS}" == "macOS" ]; then cd Release/lib - cp *.dylib ../../../imagingsuite/package/pymuhrec + cp *.dylib BackProjectors/*.dylib Preprocessors/*.dylib ../../../imagingsuite/package/pymuhrec cp *.so ../../../imagingsuite/package/pymuhrec fi From 5faf234bd21c71be696a34a11edbbab8a458edac Mon Sep 17 00:00:00 2001 From: Christian Vedel Date: Wed, 8 Jan 2025 16:33:32 +0100 Subject: [PATCH 11/16] Update change to runpaths --- .github/workflows/Build-multi-OS.yml | 7 +++++-- .github/workflows/Build-wheels.yml | 13 +++++++------ .gitignore | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Build-multi-OS.yml b/.github/workflows/Build-multi-OS.yml index f9ed9b295..afd683861 100644 --- a/.github/workflows/Build-multi-OS.yml +++ b/.github/workflows/Build-multi-OS.yml @@ -149,9 +149,12 @@ jobs: - name: Ammend shared libraries runpaths if: ${{ runner.os == 'Linux' }} - working-directory: build-imagingsuite/Release/lib + working-directory: build-imagingsuite/Release shell: bash - run: patchelf --set-rpath '$ORIGIN' *.so* + run: | + patchelf --set-rpath '$ORIGIN' lib/*.so* + patchelf --set-rpath '$ORIGIN:$ORIGIN/../../lib' PlugIns/BackProjectors/*.so* + patchelf --set-rpath '$ORIGIN:$ORIGIN/../../lib' PlugIns/Preprocessors/*.so* - name: Test id: tests diff --git a/.github/workflows/Build-wheels.yml b/.github/workflows/Build-wheels.yml index 91794c211..d40b9fa43 100644 --- a/.github/workflows/Build-wheels.yml +++ b/.github/workflows/Build-wheels.yml @@ -165,12 +165,6 @@ jobs: ${QTPATH}/bin/macdeployqt imageviewer.app fi - - name: Ammend shared libraries runpaths - if: ${{ runner.os == 'Linux' }} - working-directory: build-imagingsuite/Release/lib - shell: bash - run: patchelf --set-rpath '$ORIGIN' *.so* - - name: Copy bindings and shared libraries to package folder shell: bash working-directory: build-imagingsuite @@ -188,6 +182,13 @@ jobs: cp *.so ../../../imagingsuite/package/pymuhrec fi + - name: Ammend shared libraries runpaths + if: ${{ runner.os == 'Linux' }} + working-directory: imagingsuite/package/pymuhrec + shell: bash + run: | + patchelf --set-rpath '$ORIGIN' *.so* + - name: Build wheels shell: bash working-directory: imagingsuite/package diff --git a/.gitignore b/.gitignore index 8d8b8a663..e6cf4c59f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ cmake_install.cmake *.synctex.gz .vscode* package/pymuhrec/*.dll -package/pymuhrec/*.so +package/pymuhrec/*.so* package/pymuhrec/*.dylib package/pymuhrec/*.pyd package/pymuhrec.egg-info From b4e92b7f990193838d9a665f1856358cbed30cce Mon Sep 17 00:00:00 2001 From: Anders Kaestner Date: Fri, 10 Jan 2025 11:32:34 +0100 Subject: [PATCH 12/16] Updated configuration workflow for new plugin path --- GUI/qt/QtModuleConfigure/AddModuleDialog.cpp | 7 +- GUI/qt/QtModuleConfigure/AddModuleDialog.h | 5 +- .../modulechainconfiguratorwidget.cpp | 9 +- .../modulechainconfiguratorwidget.h | 3 +- .../singlemoduleconfiguratorwidget.cpp | 713 +++++++++--------- .../singlemoduleconfiguratorwidget.h | 103 +-- .../singlemodulesettingsdialog.cpp | 6 +- .../singlemodulesettingsdialog.h | 2 + applications/muhrec/src/muhrecmainwindow.cpp | 4 +- .../ModuleConfig/include/ModuleConfig.h | 5 +- .../include/modulelibnamemanger.h | 13 +- .../modules/ModuleConfig/src/ModuleConfig.cpp | 8 +- .../ModuleConfig/src/modulelibnamemanger.cpp | 23 +- .../tModuleConfig/tst_configbasetest.cpp | 23 +- .../ReconFramework/src/ReconConfig.cpp | 8 +- 15 files changed, 485 insertions(+), 447 deletions(-) diff --git a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp index a44d9b9db..8e403d184 100644 --- a/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp +++ b/GUI/qt/QtModuleConfigure/AddModuleDialog.cpp @@ -35,7 +35,7 @@ AddModuleDialog::AddModuleDialog(QWidget * parent) : m_sApplication("muhrec"), m_sApplicationPath(""), m_sPreprocessorsPath(""), - m_ModuleConfig("") + m_ModuleConfig("","") { setWindowTitle(tr("Add a module")); setLayout(&m_Dlg_layout); @@ -77,7 +77,10 @@ AddModuleDialog::AddModuleDialog(QWidget * parent) : } -int AddModuleDialog::configure(std::string application, std::string defaultsource, std::string application_path) +int AddModuleDialog::configure( const std::string &application, + const std::string &defaultsource, + const std::string &application_path, + const std::string &sCategory) { m_sApplication = application; m_sApplicationPath = application_path; diff --git a/GUI/qt/QtModuleConfigure/AddModuleDialog.h b/GUI/qt/QtModuleConfigure/AddModuleDialog.h index d6bad7d3b..3ccbdc829 100644 --- a/GUI/qt/QtModuleConfigure/AddModuleDialog.h +++ b/GUI/qt/QtModuleConfigure/AddModuleDialog.h @@ -30,7 +30,10 @@ class AddModuleDialog : public QDialog explicit AddModuleDialog(QWidget *parent = nullptr); virtual ~AddModuleDialog() {} - int configure(std::string application, std::string defaultsource="", std::string application_path=""); + int configure(const std::string &application, + const std::string &defaultsource, + const std::string &application_path, + const std::string &sCategory); virtual int exec(); ModuleConfig GetModuleConfig() {return m_ModuleConfig;} diff --git a/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.cpp b/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.cpp index 29a357f19..5b8bbd0e8 100644 --- a/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.cpp +++ b/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.cpp @@ -21,6 +21,7 @@ ModuleChainConfiguratorWidget::ModuleChainConfiguratorWidget(QWidget *parent) : m_pCurrentModule(nullptr), m_sApplication("muhrec"), m_sApplicationPath(""), + m_sCategory(""), m_pApplication(nullptr), m_pConfigurator(nullptr) { @@ -42,10 +43,14 @@ ModuleChainConfiguratorWidget::ModuleChainConfiguratorWidget(QWidget *parent) : show(); } -void ModuleChainConfiguratorWidget::configure(std::string application, std::string applicationpath, ModuleConfigurator *pConfigurator) +void ModuleChainConfiguratorWidget::configure(const std::string &application, + const std::string &applicationpath, + const std::string &category, + ModuleConfigurator *pConfigurator) { m_sApplication = application; m_sApplicationPath = applicationpath; + m_sCategory = category; m_pConfigurator = pConfigurator; } @@ -65,7 +70,7 @@ void ModuleChainConfiguratorWidget::on_Button_ModuleAdd() AddModuleDialog dlg(this); - dlg.configure(m_sApplication,m_sDefaultModuleSource,m_sApplicationPath); + dlg.configure(m_sApplication,m_sDefaultModuleSource,m_sApplicationPath,m_sCategory); if (dlg.exec()==QDialog::Accepted) { auto mcfg=dlg.GetModuleConfig(); diff --git a/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.h b/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.h index 090d32e51..19a2e29cd 100644 --- a/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.h +++ b/GUI/qt/QtModuleConfigure/modulechainconfiguratorwidget.h @@ -30,7 +30,7 @@ class QTMODULECONFIGURESHARED_EXPORT ModuleChainConfiguratorWidget : public QWid kipl::logging::Logger logger; public: explicit ModuleChainConfiguratorWidget(QWidget *parent = nullptr); - void configure(std::string application, std::string applicationpath="", ModuleConfigurator *pConfigurator=nullptr); + void configure(const std::string &application, const std::string &applicationpath="", const std::string &category="", ModuleConfigurator *pConfigurator=nullptr); void SetApplicationObject(ApplicationBase * app ); void SetDefaultModuleSource(std::string file); std::vector GetModules(); @@ -76,6 +76,7 @@ public slots: std::string m_sApplication; std::string m_sApplicationPath; + std::string m_sCategory; std::string m_sDefaultModuleSource; ApplicationBase * m_pApplication ; ModuleConfigurator * m_pConfigurator; diff --git a/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp b/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp index dfc5cbc7f..9331bc309 100644 --- a/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp +++ b/GUI/qt/QtModuleConfigure/singlemoduleconfiguratorwidget.cpp @@ -30,7 +30,7 @@ typedef void * HINSTANCE; SingleModuleConfiguratorWidget::SingleModuleConfiguratorWidget(QWidget *parent) : QFrame(parent), logger("SingleModuleConfiguratorWidget"), - m_ModuleConfig("") + m_ModuleConfig("","") { this->setFrameStyle(6); this->setLayout(&m_LayoutMain); @@ -50,16 +50,21 @@ SingleModuleConfiguratorWidget::SingleModuleConfiguratorWidget(QWidget *parent) } -void SingleModuleConfiguratorWidget::Configure(std::string sApplicationName, std::string sDefaultModuleSource, std::string sApplicationPath) +void SingleModuleConfiguratorWidget::Configure( const std::string &sApplicationName, + const std::string &sDefaultModuleSource, + const std::string &sApplicationPath, + const std::string &sCategory) { + m_sApplication = sApplicationName; m_sApplicationPath = sApplicationPath; + m_sCategory = sCategory; m_sDefaultModuleSource = sDefaultModuleSource; m_ModuleConfig.m_sSharedObject = sDefaultModuleSource; - m_ModuleConfig.setAppPath(sApplicationPath); + m_ModuleConfig.setAppPath(sApplicationPath,m_sCategory); } -void SingleModuleConfiguratorWidget::setDescriptionLabel(QString lbl) +void SingleModuleConfiguratorWidget::setDescriptionLabel(const QString &lbl) { m_LabelDescription.setText(lbl); } @@ -94,7 +99,7 @@ void SingleModuleConfiguratorWidget::SetDescription(QString name) void SingleModuleConfiguratorWidget::on_ButtonConfigure_Clicked() { - SingleModuleSettingsDialog dlg(m_sApplication, m_sApplicationPath,m_sDefaultModuleSource,this); + SingleModuleSettingsDialog dlg(m_sApplication, m_sApplicationPath, m_sCategory,m_sDefaultModuleSource,this); int res=dlg.exec(m_ModuleConfig); @@ -105,351 +110,353 @@ void SingleModuleConfiguratorWidget::on_ButtonConfigure_Clicked() } } -namespace oldGUI { -SingleModuleSettingsDialog::SingleModuleSettingsDialog(const std::string &sApplicationName, - const std::string &sApplicationPath, - const std::string &sDefaultModuleSource, - QWidget *parent) : - QDialog(parent), - logger("SingleModuleSettingsDialog"), - m_sApplication(sApplicationName), - m_sApplicationPath(sApplicationPath), - m_sDefaultModuleSource(sDefaultModuleSource), - m_ModuleConfig("") -{ - BuildDialog(); - connect(&m_ButtonBrowse,SIGNAL(clicked()),this,SLOT(on_ButtonBrowse_Clicked())); - connect(&m_Buttons,SIGNAL(clicked(QAbstractButton*)),this,SLOT(on_ButtonBox_Clicked(QAbstractButton*))); - connect(&m_ComboModules,SIGNAL(currentIndexChanged(QString)),this,SLOT(on_ComboBox_Changed(QString))); - show(); - -} - -int SingleModuleSettingsDialog::exec(ModuleConfig &config) -{ - std::ostringstream msg; - m_ModuleConfig=config; - m_ModuleConfig.setAppPath(QCoreApplication::applicationDirPath().toStdString()); - - QDir dir; - if (dir.exists(QString::fromStdString(m_ModuleConfig.m_sSharedObject))) - { - UpdateModuleCombobox(QString::fromStdString(m_ModuleConfig.m_sSharedObject),false); - msg<<"Index for "<property("ActionRole").toInt(); - QString s_Value=button->text(); - msg<<"Got NoButton: "<text().toStdString(); - - logger(kipl::logging::Logger::LogMessage,msg.str()); - - if (s_Value.toLower()=="add") - { - logger(kipl::logging::Logger::LogMessage,"Add parameter"); - } - - if (s_Value.toLower()=="delete") - { - logger(kipl::logging::Logger::LogMessage,"Delete parameter"); - } - break; - } - - case QDialogButtonBox::Apply: break; - case QDialogButtonBox::Reset: break; - case QDialogButtonBox::Save: break; - case QDialogButtonBox::SaveAll: break; - case QDialogButtonBox::Open: break; - case QDialogButtonBox::Close: break; - case QDialogButtonBox::Discard: break; - case QDialogButtonBox::Ignore: break; - case QDialogButtonBox::No: break; - case QDialogButtonBox::YesToAll: break; - case QDialogButtonBox::NoToAll: break; - case QDialogButtonBox::Yes: break; - case QDialogButtonBox::Retry: break; - case QDialogButtonBox::Abort: break; - case QDialogButtonBox::Help: break; - case QDialogButtonBox::RestoreDefaults: break; - } - -} - -void SingleModuleSettingsDialog::on_ButtonBrowse_Clicked() -{ - logger(kipl::logging::Logger::LogMessage,"browse"); - - QString appPath = QCoreApplication::applicationDirPath(); - QString fileName; - - #if defined(Q_OS_WIN) - appPath+="/Preprocessors"; - fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dll)")); - #elif defined(Q_OS_MAC) - appPath+="/../Preprocessors"; - fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dylib)")); - #elif defined(Q_OS_LINUX) - appPath+="/../Preprocessors"; - fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.so)")); - #endif - - logger(kipl::logging::Logger::LogMessage,appPath.toStdString()); - - if ( fileName.isNull() ) - { - logger(kipl::logging::Logger::LogError,"File selection was cancelled"); - return; - } - - if ( fileName.isEmpty() ) - { - logger(kipl::logging::Logger::LogError,"No file selected"); - return; - } - - logger(kipl::logging::Logger::LogMessage,fileName.toStdString()); - - if (fileName.toStdString() == m_ModuleConfig.m_sSharedObject ) - { - logger(kipl::logging::Logger::LogMessage,"The same library file was selected."); - return; - } - - if (UpdateModuleCombobox(fileName)==0) - m_ModuleConfig.m_sSharedObject=fileName.toStdString(); -} - -void SingleModuleSettingsDialog::BuildDialog() -{ - this->setLayout(&m_LayoutMain); - this->setWindowTitle("Select and configure module"); - m_LayoutMain.addLayout(&m_LayoutModule); - m_LayoutModule.addWidget(&m_LabelModuleName); - m_LabelModuleName.setText(tr("Module")); - m_LabelModuleName.setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred); - m_LayoutModule.addWidget(&m_ComboModules); - m_LayoutModule.addWidget(&m_ButtonBrowse); - m_ButtonBrowse.setText(tr("Browse")); - m_ButtonBrowse.setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred); - m_LayoutMain.addWidget(&m_ParameterListView); - m_ParameterListView.setColumnCount(2); - m_ParameterListView.setHeaderLabels(QStringList()< > SingleModuleSettingsDialog::GetModuleList(std::string filename) -{ - std::ostringstream msg; - HINSTANCE hinstLib; -#ifdef _MSC_VER - std::wstring so(filename.begin(),filename.end()); - - hinstLib = LoadLibraryW(so.c_str()); -#else - hinstLib = dlopen(filename.c_str(), RTLD_LAZY); -#endif - - if (hinstLib != nullptr) - { - MODULELIST fnGetModuleList; -#ifdef _MSC_VER - fnGetModuleList = reinterpret_cast(GetProcAddress(hinstLib, "GetModuleList")); -#else - fnGetModuleList = reinterpret_cast(dlsym(hinstLib, "GetModuleList")); -#endif - msg.str(""); - msg<<"Got functions from "< SingleModuleSettingsDialog::GetParameterList() -{ - std::map parlist; - - for( int i = 0; i < m_ParameterListView.topLevelItemCount(); ++i ) - { - QTreeWidgetItem *item = m_ParameterListView.topLevelItem( i ); - parlist[item->text(0).toStdString()]=item->text(1).toStdString(); - } - - return parlist; -} - -void SingleModuleSettingsDialog::UpdateCurrentModuleParameters() -{ - m_ParameterListView.clear(); - QTreeWidgetItem *parent = m_ParameterListView.invisibleRootItem(); - QTreeWidgetItem *item = nullptr; - - std::ostringstream msg; - msg<<"Updating parameter list for "<width()/2); - if (!m_ModuleConfig.m_sModule.empty()) - { -// std::map::iterator parameters; - - for (const auto & parameters : m_ModuleConfig.parameters) - { - item=new QTreeWidgetItem(parent); - item->setFlags(item->flags() | Qt::ItemIsEditable); - item->setText(0,QString::fromStdString(parameters.first)); - item->setText(1,QString::fromStdString(parameters.second)); - msg.str(""); - msg<property("ActionRole").toInt(); +// QString s_Value=button->text(); +// msg<<"Got NoButton: "<text().toStdString(); + +// logger(kipl::logging::Logger::LogMessage,msg.str()); + +// if (s_Value.toLower()=="add") +// { +// logger(kipl::logging::Logger::LogMessage,"Add parameter"); +// } + +// if (s_Value.toLower()=="delete") +// { +// logger(kipl::logging::Logger::LogMessage,"Delete parameter"); +// } +// break; +// } + +// case QDialogButtonBox::Apply: break; +// case QDialogButtonBox::Reset: break; +// case QDialogButtonBox::Save: break; +// case QDialogButtonBox::SaveAll: break; +// case QDialogButtonBox::Open: break; +// case QDialogButtonBox::Close: break; +// case QDialogButtonBox::Discard: break; +// case QDialogButtonBox::Ignore: break; +// case QDialogButtonBox::No: break; +// case QDialogButtonBox::YesToAll: break; +// case QDialogButtonBox::NoToAll: break; +// case QDialogButtonBox::Yes: break; +// case QDialogButtonBox::Retry: break; +// case QDialogButtonBox::Abort: break; +// case QDialogButtonBox::Help: break; +// case QDialogButtonBox::RestoreDefaults: break; +// } + +// } + +// void SingleModuleSettingsDialog::on_ButtonBrowse_Clicked() +// { +// logger(kipl::logging::Logger::LogMessage,"browse"); + +// QString appPath = QCoreApplication::applicationDirPath(); +// QString fileName; + +// #if defined(Q_OS_WIN) +// appPath+="/Preprocessors"; +// fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dll)")); +// #elif defined(Q_OS_MAC) +// appPath+="/../Preprocessors"; +// fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.dylib)")); +// #elif defined(Q_OS_LINUX) +// appPath+="/../Preprocessors"; +// fileName = QFileDialog::getOpenFileName(this,tr("Open module library"),appPath,tr("libs (*.so)")); +// #endif + +// logger(kipl::logging::Logger::LogMessage,appPath.toStdString()); + +// if ( fileName.isNull() ) +// { +// logger(kipl::logging::Logger::LogError,"File selection was cancelled"); +// return; +// } + +// if ( fileName.isEmpty() ) +// { +// logger(kipl::logging::Logger::LogError,"No file selected"); +// return; +// } + +// logger(kipl::logging::Logger::LogMessage,fileName.toStdString()); + +// if (fileName.toStdString() == m_ModuleConfig.m_sSharedObject ) +// { +// logger(kipl::logging::Logger::LogMessage,"The same library file was selected."); +// return; +// } + +// if (UpdateModuleCombobox(fileName)==0) +// m_ModuleConfig.m_sSharedObject=fileName.toStdString(); +// } + +// void SingleModuleSettingsDialog::BuildDialog() +// { +// this->setLayout(&m_LayoutMain); +// this->setWindowTitle("Select and configure module"); +// m_LayoutMain.addLayout(&m_LayoutModule); +// m_LayoutModule.addWidget(&m_LabelModuleName); +// m_LabelModuleName.setText(tr("Module")); +// m_LabelModuleName.setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred); +// m_LayoutModule.addWidget(&m_ComboModules); +// m_LayoutModule.addWidget(&m_ButtonBrowse); +// m_ButtonBrowse.setText(tr("Browse")); +// m_ButtonBrowse.setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred); +// m_LayoutMain.addWidget(&m_ParameterListView); +// m_ParameterListView.setColumnCount(2); +// m_ParameterListView.setHeaderLabels(QStringList()< > SingleModuleSettingsDialog::GetModuleList(std::string filename) +// { +// std::ostringstream msg; +// HINSTANCE hinstLib; +// #ifdef _MSC_VER +// std::wstring so(filename.begin(),filename.end()); + +// hinstLib = LoadLibraryW(so.c_str()); +// #else +// hinstLib = dlopen(filename.c_str(), RTLD_LAZY); +// #endif + +// if (hinstLib != nullptr) +// { +// MODULELIST fnGetModuleList; +// #ifdef _MSC_VER +// fnGetModuleList = reinterpret_cast(GetProcAddress(hinstLib, "GetModuleList")); +// #else +// fnGetModuleList = reinterpret_cast(dlsym(hinstLib, "GetModuleList")); +// #endif +// msg.str(""); +// msg<<"Got functions from "< SingleModuleSettingsDialog::GetParameterList() +// { +// std::map parlist; + +// for( int i = 0; i < m_ParameterListView.topLevelItemCount(); ++i ) +// { +// QTreeWidgetItem *item = m_ParameterListView.topLevelItem( i ); +// parlist[item->text(0).toStdString()]=item->text(1).toStdString(); +// } + +// return parlist; +// } + +// void SingleModuleSettingsDialog::UpdateCurrentModuleParameters() +// { +// m_ParameterListView.clear(); +// QTreeWidgetItem *parent = m_ParameterListView.invisibleRootItem(); +// QTreeWidgetItem *item = nullptr; + +// std::ostringstream msg; +// msg<<"Updating parameter list for "<width()/2); +// if (!m_ModuleConfig.m_sModule.empty()) +// { +// // std::map::iterator parameters; + +// for (const auto & parameters : m_ModuleConfig.parameters) +// { +// item=new QTreeWidgetItem(parent); +// item->setFlags(item->flags() | Qt::ItemIsEditable); +// item->setText(0,QString::fromStdString(parameters.first)); +// item->setText(1,QString::fromStdString(parameters.second)); +// msg.str(""); +// msg< > GetModuleList(std::string filename); - std::map GetParameterList(); - void UpdateCurrentModuleParameters(); - - - std::string m_sApplication; - std::string m_sApplicationPath; - std::string m_sDefaultModuleSource; - QVBoxLayout m_LayoutMain; - QHBoxLayout m_LayoutModule; - QLabel m_LabelModuleName; - QComboBox m_ComboModules; - QPushButton m_ButtonBrowse; - - QTreeWidget m_ParameterListView; - QDialogButtonBox m_Buttons; - QPushButton m_ButtonOK; - QPushButton m_ButtonCancel; - QPushButton m_ButtonAdd; - QPushButton m_ButtonDelete; - - ModuleConfig m_ModuleConfig; - std::map > m_ModuleList; - - -}; -} +// namespace oldGUI { +// class QTMODULECONFIGURESHARED_EXPORT SingleModuleSettingsDialog : QDialog +// { +// Q_OBJECT +// kipl::logging::Logger logger; +// public: +// explicit SingleModuleSettingsDialog(const std::string &sApplicationName, const std::string &sApplicationPath, const std::string &sCategory, const std::string & sDefaultModuleSource ,QWidget *parent); + +// virtual int exec(ModuleConfig &config); +// ModuleConfig getModule(); + +// public slots: +// virtual void on_ButtonBrowse_Clicked(); +// virtual void on_ButtonBox_Clicked(QAbstractButton *button); +// virtual void on_ComboBox_Changed(QString value); + +// private: +// virtual int exec(); +// void BuildDialog(); +// int UpdateModuleCombobox(QString fname, bool bSetFirstIndex=true); +// std::map > GetModuleList(std::string filename); +// std::map GetParameterList(); +// void UpdateCurrentModuleParameters(); + + +// std::string m_sApplication; +// std::string m_sApplicationPath; +// std::string m_sCategory; +// std::string m_sDefaultModuleSource; +// QVBoxLayout m_LayoutMain; +// QHBoxLayout m_LayoutModule; +// QLabel m_LabelModuleName; +// QComboBox m_ComboModules; +// QPushButton m_ButtonBrowse; + +// QTreeWidget m_ParameterListView; +// QDialogButtonBox m_Buttons; +// QPushButton m_ButtonOK; +// QPushButton m_ButtonCancel; +// QPushButton m_ButtonAdd; +// QPushButton m_ButtonDelete; + +// ModuleConfig m_ModuleConfig; +// std::map > m_ModuleList; + + +// }; +// } #endif // SINGLEMODULECONFIGURATORWIDGET_H diff --git a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp index 03856816d..0bb3f95ff 100644 --- a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp +++ b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.cpp @@ -24,6 +24,7 @@ typedef void * HINSTANCE; SingleModuleSettingsDialog::SingleModuleSettingsDialog(const std::string &sApplicationName, const std::string &sApplicationPath, + const std::string &sCategory, const std::string & sDefaultModuleSource, QWidget *parent) : QDialog(parent), @@ -31,8 +32,9 @@ SingleModuleSettingsDialog::SingleModuleSettingsDialog(const std::string &sAppli ui(new Ui::SingleModuleSettingsDialog), m_sApplication(sApplicationName), m_sApplicationPath(sApplicationPath), + m_sCategory(sCategory), m_sDefaultModuleSource(sDefaultModuleSource), - m_ModuleConfig("") + m_ModuleConfig("","") { ui->setupUi(this); } @@ -46,7 +48,7 @@ int SingleModuleSettingsDialog::exec(ModuleConfig &config) { std::ostringstream msg; m_ModuleConfig=config; - m_ModuleConfig.setAppPath(QCoreApplication::applicationDirPath().toStdString()); + m_ModuleConfig.setAppPath(QCoreApplication::applicationDirPath().toStdString(),m_sCategory); QDir dir; if (dir.exists(QString::fromStdString(m_ModuleConfig.m_sSharedObject))) diff --git a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.h b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.h index 187dd1d90..f2bc4e847 100644 --- a/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.h +++ b/GUI/qt/QtModuleConfigure/singlemodulesettingsdialog.h @@ -24,6 +24,7 @@ class QTMODULECONFIGURESHARED_EXPORT SingleModuleSettingsDialog : public QDialog public: explicit SingleModuleSettingsDialog(const std::string &sApplicationName, const std::string &sApplicationPath, + const std::string &sCategory, const std::string & sDefaultModuleSource, QWidget *parent = nullptr); @@ -51,6 +52,7 @@ private slots: std::string m_sApplication; std::string m_sApplicationPath; + std::string m_sCategory; std::string m_sDefaultModuleSource; ModuleConfig m_ModuleConfig; diff --git a/applications/muhrec/src/muhrecmainwindow.cpp b/applications/muhrec/src/muhrecmainwindow.cpp index 6a4ca18e6..b06758e72 100644 --- a/applications/muhrec/src/muhrecmainwindow.cpp +++ b/applications/muhrec/src/muhrecmainwindow.cpp @@ -128,8 +128,8 @@ MuhRecMainWindow::MuhRecMainWindow(QApplication *app, QWidget *parent) : <<"ConfigPath = "<ConfiguratorBackProj->Configure("muhrecbp",defaultprojectors,m_sApplicationPath); - ui->moduleconfigurator->configure("muhrec",m_sApplicationPath,&m_ModuleConfigurator); + ui->ConfiguratorBackProj->Configure("muhrecbp", defaultprojectors, "BackProjectors",m_sApplicationPath); + ui->moduleconfigurator->configure("muhrec", m_sApplicationPath, "Preprocessors", &m_ModuleConfigurator); ui->moduleconfigurator->SetDefaultModuleSource(defaultpreprocessors); ui->moduleconfigurator->SetApplicationObject(this); diff --git a/core/modules/ModuleConfig/include/ModuleConfig.h b/core/modules/ModuleConfig/include/ModuleConfig.h index e524b63f3..d52a0b2a2 100644 --- a/core/modules/ModuleConfig/include/ModuleConfig.h +++ b/core/modules/ModuleConfig/include/ModuleConfig.h @@ -23,7 +23,7 @@ class MODULECONFIGSHARED_EXPORT ModuleConfig kipl::logging::Logger logger; ///< Logging for the Module config objects public: - ModuleConfig(const std::string &modulePath); ///< Default constructor + ModuleConfig(const std::string &modulePath, const std::string &sCategory); ///< Default constructor std::string m_sSharedObject; ///< File name of the shared object file containing the module std::string m_sModule; ///< Name of the module bool m_bActive; @@ -40,12 +40,13 @@ class MODULECONFIGSHARED_EXPORT ModuleConfig /// Dumps the module parameters on the console. std::string PrintParameters(); - void setAppPath(const std::string &path); + void setAppPath(const std::string &path, const std::string &category); std::string modulePath(); std::string moduleSummary(); protected: ModuleLibNameManger m_NameManager; + std::string m_CategoryName; }; diff --git a/core/modules/ModuleConfig/include/modulelibnamemanger.h b/core/modules/ModuleConfig/include/modulelibnamemanger.h index c5a2e0e56..32983a68c 100644 --- a/core/modules/ModuleConfig/include/modulelibnamemanger.h +++ b/core/modules/ModuleConfig/include/modulelibnamemanger.h @@ -10,17 +10,17 @@ class MODULECONFIGSHARED_EXPORT ModuleLibNameManger { kipl::logging::Logger logger; public: - ModuleLibNameManger(const std::string &path); - std::string generateLibName(const std::string &name, const kipl::base::eOperatingSystem &os); - std::string generateLibName(const std::string &name); + ModuleLibNameManger(const std::string &path, const std::string &category); + std::string generateLibName(const std::string &namem, const kipl::base::eOperatingSystem &os); + std::string generateLibName( const std::string &name); std::string stripLibName(const std::string &libPath, const kipl::base::eOperatingSystem &os); std::string stripLibName(const std::string &libPath); - void setAppPath(const std::string &path); + void setAppPath(const std::string &path, const std::string &category); private: std::string generateWindowsLibName(const std::string &name); - std::string generateMacOSLibName(const std::string &name); - std::string generateLinuxLibName(const std::string &name); + std::string generateMacOSLibName( const std::string &name); + std::string generateLinuxLibName( const std::string &name); std::string stripWindowsLibName(const std::string &path); std::string stripMacOSLibName(const std::string &path); @@ -29,6 +29,7 @@ class MODULECONFIGSHARED_EXPORT ModuleLibNameManger bool libInAppPath(const std::string & path, const std::string &appPath); std::string m_sApplicationPath; + std::string m_sCategoryName; }; diff --git a/core/modules/ModuleConfig/src/ModuleConfig.cpp b/core/modules/ModuleConfig/src/ModuleConfig.cpp index 6b82bbb95..7fac95a93 100644 --- a/core/modules/ModuleConfig/src/ModuleConfig.cpp +++ b/core/modules/ModuleConfig/src/ModuleConfig.cpp @@ -12,13 +12,13 @@ #include -ModuleConfig::ModuleConfig(const std::string &appPath) : +ModuleConfig::ModuleConfig(const std::string &sAppPath, const std::string &sCategory) : logger("ModuleConfig"), m_sSharedObject("NoObjectFile"), m_sModule("Empty"), m_bActive(true), m_bThreading(false), - m_NameManager(appPath) + m_NameManager(sAppPath, sCategory) { } @@ -136,9 +136,9 @@ std::string ModuleConfig::PrintParameters() return s.str(); } -void ModuleConfig::setAppPath(const std::string &path) +void ModuleConfig::setAppPath(const std::string &path, const std::string &category) { - m_NameManager.setAppPath(path); + m_NameManager.setAppPath(path,category); } std::string ModuleConfig::modulePath() diff --git a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp index 052636c62..3c79ceac1 100644 --- a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp +++ b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp @@ -4,14 +4,16 @@ #include #include -ModuleLibNameManger::ModuleLibNameManger(const std::string &path) : +ModuleLibNameManger::ModuleLibNameManger(const std::string &path, const std::string &category) : logger("ModuleLibNameManger"), - m_sApplicationPath(path) + m_sApplicationPath(path), + m_sCategoryName(category) { -// kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); + kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); + kipl::strings::filenames::CheckPathSlashes(m_sCategoryName,true); } -std::string ModuleLibNameManger::generateLibName(const std::string &name, const kipl::base::eOperatingSystem &os) +std::string ModuleLibNameManger::generateLibName(const std::string &name,const kipl::base::eOperatingSystem &os) { if (name.find_first_of("/\\")!=std::string::npos) return name; @@ -55,17 +57,20 @@ std::string ModuleLibNameManger::stripLibName(const std::string &libPath) return stripLibName(libPath,kipl::base::getOperatingSystem()); } -void ModuleLibNameManger::setAppPath(const std::string &path) +void ModuleLibNameManger::setAppPath(const std::string &path, const std::string &category) { m_sApplicationPath = path; kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); -} + + m_sCategoryName = category; + kipl::strings::filenames::CheckPathSlashes(m_sCategoryName,true); +} std::string ModuleLibNameManger::generateWindowsLibName(const std::string &name) { std::string fullName=m_sApplicationPath; - fullName = fullName+name+".dll"; + fullName = fullName+"Plugins\\"+m_sCategoryName+name+".dll"; return fullName; } @@ -74,7 +79,7 @@ std::string ModuleLibNameManger::generateMacOSLibName(const std::string &name) { std::string fullName=m_sApplicationPath.substr(0,m_sApplicationPath.size() - 6 - (*m_sApplicationPath.rbegin()=='/' ? 1 : 0)); - fullName = fullName+"/Frameworks/lib"+name+".dylib"; + fullName = fullName+"/Plugins/"+m_sCategoryName+"/lib"+name+".dylib"; return fullName; } @@ -83,7 +88,7 @@ std::string ModuleLibNameManger::generateLinuxLibName(const std::string &name) { std::string fullName=m_sApplicationPath.substr(0,m_sApplicationPath.size() - 3 - (*m_sApplicationPath.rbegin()=='/' ? 1 : 0)); - fullName = fullName+"lib/lib"+name+".so"; + fullName = fullName+"/Plugins/"+m_sCategoryName+"/lib"+name+".so"; return fullName; } diff --git a/core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp b/core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp index a359257b4..03c6a4824 100644 --- a/core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp +++ b/core/modules/UnitTests/tModuleConfig/tst_configbasetest.cpp @@ -196,11 +196,12 @@ void ConfigBaseTest::testGetCommandLinePars() void ConfigBaseTest::testLibNameManagerMac() { - std::string appPath = "/Users/kaestner/git/deployed/MuhRec.app/Contents/MacOS/"; - std::string modulePath = "/Users/kaestner/git/deployed/MuhRec.app/Contents/Frameworks/libStdBackProjectors.dylib"; - std::string modulePath2 = "/Users/kaestner/git/deployed/MuhRec.app/Contents/MacOS/../Frameworks/libStdBackProjectors.dylib"; + std::string appPath = "/Users/kaestner/git/deployed/MuhRec.app/Contents/MacOS/"; + std::string category = "BackProjectors"; + std::string modulePath = "/Users/kaestner/git/deployed/MuhRec.app/Contents/Plugins/Backprojectors/libStdBackProjectors.dylib"; + std::string modulePath2 = "/Users/kaestner/git/deployed/MuhRec.app/Contents/MacOS/../Plugins/BackProjectors/libStdBackProjectors.dylib"; - ModuleLibNameManger mlnm(appPath); + ModuleLibNameManger mlnm(appPath,category); std::string name=mlnm.stripLibName(modulePath,kipl::base::OSMacOS); @@ -226,11 +227,12 @@ void ConfigBaseTest::testLibNameManagerMac() void ConfigBaseTest::testLibNameManagerLinux() { - std::string appPath = "../build-imagingsuite/Release/bin"; - std::string modulePath = "../build-imagingsuite/Release/lib/libStdBackProjectors.so"; + std::string appPath = "../build-imagingsuite/Release/bin"; + std::string category = "BackProjectors"; + std::string modulePath = "../build-imagingsuite/Release/lib/libStdBackProjectors.so"; std::string modulePath3 = "../build-imagingsuite/Release/lib/libStdBackProjectors.so"; - ModuleLibNameManger mlnm(appPath); + ModuleLibNameManger mlnm(appPath,category); // qDebug() << mlnm.stripLibName(modulePath3,kipl::base::OSLinux).c_str() <<", "<< std::string("StdBackProjectors").c_str(); @@ -248,18 +250,19 @@ void ConfigBaseTest::testLibNameManagerLinux() void ConfigBaseTest::testLibNameManagerWindows() { std::string appPath = "C:\\Users\\kaestner\\git\\deployed\\muhrec\\"; - std::string modulePath = "C:\\Users\\kaestner\\git\\deployed\\muhrec\\StdPreprocModules.dll"; + std::string category = "PreprocModules"; + std::string modulePath = "C:\\Users\\kaestner\\git\\deployed\\muhrec\\Plugins\\PreprocModules\\StdPreprocModules.dll"; // kipl::strings::filenames::CheckPathSlashes(appPath,true); // kipl::strings::filenames::CheckPathSlashes(modulePath,false); - ModuleLibNameManger mlnm(appPath); + ModuleLibNameManger mlnm(appPath,category); QCOMPARE(mlnm.stripLibName(modulePath,kipl::base::OSWindows),"StdPreprocModules"); QCOMPARE(mlnm.generateLibName("StdPreprocModules",kipl::base::OSWindows),modulePath); - std::string modulePath2 = "C:\\Users\\kaestner\\muhrec\\StdPreprocModules.dll"; + std::string modulePath2 = "C:\\Users\\kaestner\\muhrec\\Plugins\\PreprocModules\\StdPreprocModules.dll"; QCOMPARE(mlnm.stripLibName(modulePath2,kipl::base::OSWindows),modulePath2); diff --git a/frameworks/tomography/Framework/ReconFramework/src/ReconConfig.cpp b/frameworks/tomography/Framework/ReconFramework/src/ReconConfig.cpp index c0a951953..5db1bce02 100644 --- a/frameworks/tomography/Framework/ReconFramework/src/ReconConfig.cpp +++ b/frameworks/tomography/Framework/ReconFramework/src/ReconConfig.cpp @@ -20,7 +20,7 @@ ReconConfig::ReconConfig(const std::string &appPath) : ConfigBase("ReconConfig",appPath), - backprojector(appPath) + backprojector(appPath,"Backprojectors") { } @@ -101,7 +101,7 @@ std::string ReconConfig::WriteXML() std::list::iterator it; for (auto & module : modules) { - module.setAppPath(m_sApplicationPath); + module.setAppPath(m_sApplicationPath,"Preprocessors"); str<\n"; @@ -514,7 +514,7 @@ void ReconConfig::ParseProcessChain(xmlTextReaderPtr reader) sValue="Empty"; sName=reinterpret_cast(name); if (sName=="module") { - ModuleConfig module(m_sApplicationPath); + ModuleConfig module(m_sApplicationPath, "Preprocessors"); module.ParseModule(reader); modules.push_back(module); } @@ -526,7 +526,7 @@ void ReconConfig::ParseProcessChain(xmlTextReaderPtr reader) } if (sName=="backprojector") { logger(kipl::logging::Logger::LogVerbose,"Parsing backproj"); - backprojector.setAppPath(m_sApplicationPath); + backprojector.setAppPath(m_sApplicationPath,"BackProjectors"); backprojector.ParseModule(reader); } From 6ce4f28562f746ca0407b123d9b61fe7d189b3c1 Mon Sep 17 00:00:00 2001 From: Anders Kaestner Date: Fri, 10 Jan 2025 12:41:34 +0100 Subject: [PATCH 13/16] Removed Framework reference --- core/modules/ModuleConfig/src/modulelibnamemanger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp index 3c79ceac1..273dc7729 100644 --- a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp +++ b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp @@ -109,8 +109,8 @@ std::string ModuleLibNameManger::stripWindowsLibName(const std::string &path) std::string ModuleLibNameManger::stripMacOSLibName(const std::string &path) { std::ostringstream msg; - if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-7)+"/Frameworks") && - !libInAppPath(path,m_sApplicationPath+"../Frameworks") ) + if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-7)+"/Plugins/"+m_sCategoryName) && + !libInAppPath(path,m_sApplicationPath+"../Plugins/"+m_sCategoryName) ) { msg << path.c_str()<<" is not in lib path"; logger.verbose(msg.str()); From e5dee56cd71baa97eb579df0679d722cff2b097d Mon Sep 17 00:00:00 2001 From: Anders Kaestner Date: Fri, 10 Jan 2025 14:16:01 +0100 Subject: [PATCH 14/16] tModuleConfig works on macos x86_64 --- .../ModuleConfig/src/modulelibnamemanger.cpp | 35 ++++++++----------- .../tModuleConfig/tst_configbasetest.cpp | 18 +++++----- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp index 273dc7729..b235a1d15 100644 --- a/core/modules/ModuleConfig/src/modulelibnamemanger.cpp +++ b/core/modules/ModuleConfig/src/modulelibnamemanger.cpp @@ -9,8 +9,8 @@ ModuleLibNameManger::ModuleLibNameManger(const std::string &path, const std::str m_sApplicationPath(path), m_sCategoryName(category) { - kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); - kipl::strings::filenames::CheckPathSlashes(m_sCategoryName,true); + // kipl::strings::filenames::CheckPathSlashes(m_sApplicationPath,true); + // kipl::strings::filenames::CheckPathSlashes(m_sCategoryName,true); } std::string ModuleLibNameManger::generateLibName(const std::string &name,const kipl::base::eOperatingSystem &os) @@ -70,7 +70,7 @@ std::string ModuleLibNameManger::generateWindowsLibName(const std::string &name) { std::string fullName=m_sApplicationPath; - fullName = fullName+"Plugins\\"+m_sCategoryName+name+".dll"; + fullName = fullName+"PlugIns\\"+m_sCategoryName+"\\"+name+".dll"; return fullName; } @@ -79,7 +79,7 @@ std::string ModuleLibNameManger::generateMacOSLibName(const std::string &name) { std::string fullName=m_sApplicationPath.substr(0,m_sApplicationPath.size() - 6 - (*m_sApplicationPath.rbegin()=='/' ? 1 : 0)); - fullName = fullName+"/Plugins/"+m_sCategoryName+"/lib"+name+".dylib"; + fullName = fullName+"/PlugIns/"+m_sCategoryName+"/lib"+name+".dylib"; return fullName; } @@ -88,15 +88,16 @@ std::string ModuleLibNameManger::generateLinuxLibName(const std::string &name) { std::string fullName=m_sApplicationPath.substr(0,m_sApplicationPath.size() - 3 - (*m_sApplicationPath.rbegin()=='/' ? 1 : 0)); - fullName = fullName+"/Plugins/"+m_sCategoryName+"/lib"+name+".so"; + fullName = fullName+"PlugIns/"+m_sCategoryName+"/lib"+name+".so"; return fullName; } std::string ModuleLibNameManger::stripWindowsLibName(const std::string &path) { - if (!libInAppPath(path,m_sApplicationPath)) + if (!libInAppPath(path,m_sApplicationPath+"PlugIns\\"+m_sCategoryName)) { + logger.message(path+" is not in the plugin path"); return path; } std::string libName; @@ -108,12 +109,10 @@ std::string ModuleLibNameManger::stripWindowsLibName(const std::string &path) std::string ModuleLibNameManger::stripMacOSLibName(const std::string &path) { - std::ostringstream msg; - if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-7)+"/Plugins/"+m_sCategoryName) && - !libInAppPath(path,m_sApplicationPath+"../Plugins/"+m_sCategoryName) ) + if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-7)+"/PlugIns/"+m_sCategoryName) && + !libInAppPath(path,m_sApplicationPath+"../PlugIns/"+m_sCategoryName) ) { - msg << path.c_str()<<" is not in lib path"; - logger.verbose(msg.str()); + logger.message(path+" is not in the plugin path"); return path; } @@ -128,14 +127,10 @@ std::string ModuleLibNameManger::stripMacOSLibName(const std::string &path) std::string ModuleLibNameManger::stripLinuxLibName(const std::string &path) { - std::ostringstream msg; - - - if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-4)+"/lib") && - !libInAppPath(path,m_sApplicationPath+"../lib/") ) + if (!libInAppPath(path,m_sApplicationPath.substr(0,m_sApplicationPath.size()-4)+"/PlugIns/"+m_sCategoryName) && + !libInAppPath(path,m_sApplicationPath+"../PlugIns/"+m_sCategoryName) ) { - msg << path.c_str()<<" is not in lib path"; - logger.verbose(msg.str()); + logger.message(path+" is not in the plugin path"); return path; } @@ -151,13 +146,13 @@ bool ModuleLibNameManger::libInAppPath(const std::string &path, const std::strin { if (path.size() Date: Fri, 10 Jan 2025 14:31:11 +0100 Subject: [PATCH 15/16] Starting to understand module test crashes --- .../UnitTests/tFDKBackProjectors/CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/frameworks/tomography/UnitTests/tFDKBackProjectors/CMakeLists.txt b/frameworks/tomography/UnitTests/tFDKBackProjectors/CMakeLists.txt index 706b8f84b..e4c15ff11 100644 --- a/frameworks/tomography/UnitTests/tFDKBackProjectors/CMakeLists.txt +++ b/frameworks/tomography/UnitTests/tFDKBackProjectors/CMakeLists.txt @@ -24,21 +24,6 @@ include_directories( ../../../../core/kipl/kipl/include/ ../../../../core/algorithms/ImagingAlgorithms/include ) -# if (APPLE) -# include_directories( -# ../../../../../ExternalDependencies/macos/include -# ) -# endif() - -# if (WIN32) -# include_directories( -# ../../../../../ExternalDependencies/windows/include -# ../../../../../ExternalDependencies/windows/include/nexus -# ../../../../../ExternalDependencies/windows/include/cfitsio -# ../../../../../ExternalDependencies/windows/include/libxml2 -# ../../../../external/include/ -# ) -# endif() set(SRC_FILES tst_FDKBackprojectors.cpp) From 35601557ed47124df702c5d0a6d5ebed3dd7e1c0 Mon Sep 17 00:00:00 2001 From: Kaestner Anders Date: Fri, 10 Jan 2025 16:15:00 +0100 Subject: [PATCH 16/16] Fixed apppath update on windows Please enter the commit message for your changes. Lines starting --- applications/muhrec/src/muhrecmainwindow.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/applications/muhrec/src/muhrecmainwindow.cpp b/applications/muhrec/src/muhrecmainwindow.cpp index b06758e72..2bbc43e08 100644 --- a/applications/muhrec/src/muhrecmainwindow.cpp +++ b/applications/muhrec/src/muhrecmainwindow.cpp @@ -709,18 +709,13 @@ void MuhRecMainWindow::LoadDefaults(bool checkCurrent) logger(logger.LogMessage,"Updating path of preprocessing modules"); for (auto &module : m_Config.modules) { - pos=module.m_sSharedObject.find(sSearchStr); - - if (pos!=std::string::npos) - module.m_sSharedObject.replace(pos,sSearchStr.length(),m_sPreprocessorsPath); + module.setAppPath(m_sApplicationPath,"Preprocessors"); logger.message(module.m_sSharedObject); } logger(logger.LogMessage,"Updating path of back projector"); - pos=m_Config.backprojector.m_sSharedObject.find(sSearchStr); - if (pos!=std::string::npos) - m_Config.backprojector.m_sSharedObject.replace(pos,sSearchStr.size(),m_sBackProjectorsPath); + m_Config.backprojector.setAppPath(m_sApplicationPath,"BackProjectors"); logger.message(m_Config.backprojector.m_sSharedObject);