I am trying to follow this website to add SlicerRT Extension to Slicer
I have a couple questions here.
What does the following sentence mean?
" * When configuring the project set the Slicer_DIR to the Slicer version that you have built (e.g., c:/d/S4D/Slicer-build)"
Where is ‘SlicerRT.sln’? I just cannot find it from the repo?
“* Open SlicerRT.sln, select the Debug/Release configuration that matches the configuration that used for Slicer build, and build ALL_BUILD”
Thanks a lot for your help. I was able to generate SlicerRT.sln in the folder ‘B’ by
‘PS D:\OA\SlicerRT\B> cmake -G “Visual Studio 17 2022” -DSlicer_DIR:PATH=D:\OA\Slicer\D\Slicer-build D:\OA\SlicerRT\S’
and then loaded the SlicerRT.sln in Visual Studio to build the binary.
However, after adding the paths as the following
Start Slicer and in the application settings add the following additional module paths (replace Debug by Release if you are testing in Release mode):
\inner-build\lib\Slicer-4.11\cli-modules
\inner-build\lib\Slicer-4.11\qt-scripted-modules
\inner-build\lib\Slicer-4.11\qt-loadable-modules
and restarted Slicer, I had the following in the terminal
DLL load failed while importing vtkSlicerDicomRtImportExportModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.DLL load failed while importing vtkSlicerDicomSroImportExportModuleLogicPython: The specified module could not be found.DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerDrrImageComputationModuleLogicPython: The specified module could not be found.
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
Failed to load vtkSlicerExternalBeamPlanningModuleLogicPython: No module named vtkSlicerBeamsModuleLogicPython
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing vtkSlicerRoomsEyeViewModuleLogicPython: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerBeamsModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerExternalBeamPlanningModuleWidgetsPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
DLL load failed while importing qSlicerPlmProtonDoseEngineDoseEnginesPythonQt: The specified module could not be found.
When loading module “BatchStructureSetConversion” , the dependency “DicomRtImportExport” failed to be loaded.
When loading module “DvhComparison” , the dependency “DoseVolumeHistogram” failed to be loaded.
When loading module “IGRTWorkflow_SelfTest” , the dependency “DicomRtImportExport” failed to be loaded.
Switch to module: “Welcome”
The problem seems qt/python related. Any idea how to fix?
First of all, make sure the module paths are valid (I doubt you built 4.11).
The DLL loading errors are due to not all paths being explored for loading dependencies, i.e. missing paths. One workaround you can do is to copy the DLLs from ...\SlicerRT_R\bin\Release\*.dll to \SlicerRT_R\inner-build\lib\Slicer-5.7\qt-loadable-modules\Release, but this is not a proper solution. It is recommended to use the inner-build\SlicerWithSlicerRT.exe file for starting SlicerRT, which sets up all the paths.
If you need this for debugging, then start VS like this ..\S5D\Slicer-build\Slicer.exe --VisualStudio --launcher-no-splash --launcher-additional-settings ./SlicerRT_D/inner-build/AdditionalLauncherSettings.ini c:\d\_Extensions\SlicerRT_D\inner-build\SlicerRT.sln
Now I can start SlicerRT by running ‘inner-build\SlicerWithSlicerRT.exe’.
But when I try ‘./Slicer.exe --VisualStudio --launcher-no-splash --launcher-additional-settings D:\OA\SlicerRT\B/inner-build/AdditionalLauncherSettings.ini D:\OA\SlicerRT\B\inner-build\SlicerRT.sln’ in VS and run debug (ALL_BUILD is set as Startup Project), I got a pop up said ‘Unable to start program ‘.\SlicerRT\inner-build\x64\Debug\All_BUILD’, access is denied’ (sorry I do know how to post images here). Any idea?
You need to specify the executable for your startup project (which you need to change to basically any other project). Please see in the developer documentation.