Hi,
I have compiled CLI module with slicer to use it within slicer. (all succeeded no failure)
The module input is vtk volume geometry (contains points, elements, stresses) then it calculates the average stresses on the surface to get a vtp surface geometry (output).
When I used the module in slicer I got this error that slicer failed to read input surface. it seems the module couldn’t find vtk directory although it is included in cmake.txt.
Kindly note the log file, cmake module and cmake extension.
Can someone help me solve this issue, please?
Many thanks,
Farah
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Session start time .......: 2020-09-22 16:22:57
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Slicer version ...........: 4.11.0-0000-00-00 (revision 3037 / 0) win-amd64 - not installed release
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Operating system .........: Windows / Personal / (Build 18362, Code Page 65001) - 64-bit
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Memory ...................: 8058 MB physical, 14584 MB virtual
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - CPU ......................: GenuineIntel , 8 cores, 8 logical processors
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Qt configuration .........: version 5.15.0, with SSL, requested OpenGL 3.2 (compatibility profile)
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Developer mode enabled ...: yes
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Prefer executable CLI ....: yes
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Application path .........: D:/S4R/Slicer-build/bin/Release
[DEBUG][Qt] 22.09.2020 16:22:57 [] (unknown:0) - Additional module paths ..: D:/AAA_build/lib/Slicer-4.11/qt-scripted-modules, D:/AAA_build/lib/Slicer-4.11/qt-loadable-modules/Debug, D:/AAA_build/lib/Slicer-4.11/cli-modules/Debug, D:/AAA_build/lib/Slicer-4.11/qt-loadable-modules/Release, D:/AAA_build/lib/Slicer-4.11/cli-modules/Release, D:/AAA_build/lib/Slicer-4.11/qt-loadable-modules/MinSizeRel, D:/AAA_build/lib/Slicer-4.11/cli-modules/MinSizeRel, D:/AAA_build/lib/Slicer-4.11/qt-loadable-modules/RelWithDebInfo, D:/AAA_build/lib/Slicer-4.11/cli-modules/RelWithDebInfo
[DEBUG][Python] 22.09.2020 16:22:58 [Python] (D:\S4R\python-install\Lib\site-packages\pydicom\datadict.py:432) - Reversing DICOM dictionary so can look up tag from a keyword...
[DEBUG][Python] 22.09.2020 16:22:59 [Python] (D:\S4R\Slicer-build\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations
[DEBUG][Python] 22.09.2020 16:23:00 [Python] (D:\S4R\Slicer-build\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 22.09.2020 16:23:00 [Python] (D:\S4R\Slicer-build\lib\Slicer-4.11\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 22.09.2020 16:23:00 [] (unknown:0) - Switch to module: "Welcome"
[WARNING][Qt] 22.09.2020 16:23:13 [] (unknown:0) - Empty filename passed to function
[INFO][VTK] 22.09.2020 16:23:24 [vtkMRMLModelStorageNode (0000027E69D360D0)] (D:\S4\Libs\MRML\Core\vtkMRMLModelStorageNode.cxx:380) - ReadDataInternal (vtkMRMLModelStorageNode1): File C:/Users/farah/Desktop/stress.vtk does not contain coordinate system information. Assuming LPS.
[DEBUG][Qt] 22.09.2020 16:23:24 [] (unknown:0) - "Model" Reader has successfully read the file "C:/Users/farah/Desktop/stress.vtk" "[0.23s]"
[DEBUG][Qt] 22.09.2020 16:23:26 [] (unknown:0) - Switch to module: "AAA_AverageStress"
[DEBUG][Qt] 22.09.2020 16:23:37 [] (unknown:0) - Found CommandLine Module, target is D:/AAA_build/lib/Slicer-4.11/cli-modules/Release/AAA_AverageStress.exe
[DEBUG][Qt] 22.09.2020 16:23:37 [] (unknown:0) - ModuleType: CommandLineModule
[DEBUG][Qt] 22.09.2020 16:23:37 [] (unknown:0) - AAA_AverageStress command line:
D:/AAA_build/lib/Slicer-4.11/cli-modules/Release/AAA_AverageStress.exe --numSegments 4 C:/Users/farah/AppData/Local/Temp/Slicer/JHBC_vtkMRMLModelNodeE.vtp C:/Users/farah/AppData/Local/Temp/Slicer/JHBC_vtkMRMLModelNodeF.vtp
[DEBUG][Qt] 22.09.2020 16:23:37 [] (unknown:0) - AAA_AverageStress standard output:
vtkDebugLeaks has found no leaks.
[ERROR][VTK] 22.09.2020 16:23:37 [vtkSlicerCLIModuleLogic (0000027E677C03B0)] (D:\S4\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:2017) - AAA_AverageStress standard error:
ERROR: Failed to read input surface from C:/Users/farah/AppData/Local/Temp/Slicer/JHBC_vtkMRMLModelNodeE.vtp
[ERROR][VTK] 22.09.2020 16:23:37 [vtkSlicerCLIModuleLogic (0000027E677C03B0)] (D:\S4\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:2048) - AAA_AverageStress completed with errors
[INFO][VTK] 22.09.2020 16:23:37 [vtkMRMLScene (0000027E6FDAFA40)] (D:\S4\Libs\MRML\Core\vtkMRMLScene.cxx:316) - vtkMRMLScene::Clear
#-----------------------------------------------------------------------------
set(MODULE_NAME AAA_AverageStress)
#-----------------------------------------------------------------------------
#
# SlicerExecutionModel
#
#-----------------------------------------------------------------------------
set(MODULE_INCLUDE_DIRECTORIES
${vtkITK_INCLUDE_DIRS}
)
set(MODULE_SRCS
)
set(MODULE_TARGET_LIBRARIES
${VTK_LIBRARIES}
)
#-----------------------------------------------------------------------------
SEMMacroBuildCLI(
NAME ${MODULE_NAME}
TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
INCLUDE_DIRECTORIES ${MODULE_INCLUDE_DIRECTORIES}
ADDITIONAL_SRCS ${MODULE_SRCS}
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
cmake_minimum_required(VERSION 2.8.9)
project(AAA_AverageStress)
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "http://www.example.com/Slicer/Extensions/AAA_AverageStress")
set(EXTENSION_CATEGORY "AAA")
set(EXTENSION_CONTRIBUTORS "Grand Joldes (The University of Western Australia, ISML)")
set(EXTENSION_DESCRIPTION "This is an example of a simple extension")
set(EXTENSION_ICONURL "http://www.example.com/Slicer/Extensions/AAA_AverageStress.png")
set(EXTENSION_SCREENSHOTURLS "http://www.example.com/Slicer/Extensions/AAA_AverageStress/Screenshots/1.png")
#-----------------------------------------------------------------------------
# Extension dependencies
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
#-----------------------------------------------------------------------------
# Extension modules
add_subdirectory(AAA_AverageStress)
## NEXT_MODULE
#-----------------------------------------------------------------------------
include(${Slicer_EXTENSION_CPACK})