slicer / vtkaddon Goto Github PK
View Code? Open in Web Editor NEWGeneral-purpose features that may be integrated into VTK library in the future.
License: Other
General-purpose features that may be integrated into VTK library in the future.
License: Other
Building Slicer 731be146e8a82b9a8090257e28 with VTK 9 enabled reports the following error:
/path/to/VTK/Rendering/OpenGL2/vtkOpenGL.h:25:2: warning: #warning "vtkOpenGL.h is deprecated. vtk_glew.h should be used if you require OpenGL headers." [-Wcpp]
#warning "vtkOpenGL.h is deprecated. vtk_glew.h should be used if you require OpenGL headers."
^
For exact version of VTK, see https://github.com/Slicer/Slicer/blob/731be146e8a82b9a8090257e28eeb42f80989452/SuperBuild/External_VTK.cmake#L179-L182
We experienced huge slowdowns of application builds due to vtkWrapHierarchy kept rebuilding hierarchy files. For example, Slicer build took 10 minutes when nothing changed.
It turned out that this was because VTK was updated after the application was built (which is very common on developer computers). This update updated the vtkWrapHierarchy.exe file's timestamp, which is a dependency of hierarchy file generation build step. Therefore it triggers rebuilding of hierarchy file. However, the content of the hierarchy file was not changed and therefore its timestamp remained the same (older than timestamp of vtkWrapHierarchy.exe). This means that next time the hierarchy got updated again.
One solution could be vtkWrapHierarchy.cmake should be updated to touch some timestamp file each time vtkWrapHierarchy.exe was executed and use that to determine if the target is up-to-date (rather than use the timestamp of the hierarchy file).
Another solution could be to force writing of hierarchy files (update their timestamp) even if the file has not changed. Currently, vtkWrapHierarchy only updates the output hierarchy file if its content has changed.
Workaround to speed up builds after a VTK update: delete all the *Hierarchy.txt
files (for example, in c:\D\S4R\Slicer-build).
vtkImageLabelDilate3D.cxx added in #44 introduces a compilation error on Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.6.4 ; MSVC version 14.36.32532
Compilation fails with with error:
vtkAddon\vtkImageLabelDilate3D.cxx(67): error C2039: 'map': is not a member of 'std'
vtkComputeModeOfArray references std::map<T, int> but does not include the header which results in the compilation error.
Reverting to the previous commit compiles as expected. Adding #include <map>
to the includes also allows compilation to continue
Hi,
Context: PlusLib install with conan
Platform: Ubuntu 18.04
CMake version: 3.21.1
When installing vtkAddon, there was a missing target file in the cmake install tree.
Moreover ${CMAKE_CURRENT_SOURCE_DIR}
should be preferred to ${CMAKE_SOURCE_DIR}
as the project could be installed as a subproject and ${CMAKE_SOURCE_DIR}
will point to the top level script directory.
PR #24 fixes these issues.
Best Regards,
I am not able to configure the build using cmake when trying to do so using vtk 8.
is there any specific version of vtk that is needed for the build?
See #27 (comment)
When building against VTK with external HDF5:
VTK_MODULE_ENABLE_VTK_hdf5:STRING=YES
VTK_MODULE_USE_EXTERNAL_VTK_hdf5:BOOL=ON
the following CMake error is raised:
CMake Error at /home/aure/src/vtk/build/lib64/cmake/vtk-9.0/patches/99/FindHDF5.cmake:222 (try_compile):
Unknown extension ".c" for file
/home/aure/src/vtkAddon/build/CMakeFiles/hdf5/cmake_hdf5_test.c
try_compile() works only for enabled languages. Currently these are:
CXX
See project() command to enable other languages.
Call Stack (most recent call first):
/home/aure/src/vtk/build/lib64/cmake/vtk-9.0/patches/99/FindHDF5.cmake:556 (_HDF5_test_regular_compiler_C)
/home/aure/src/vtk/build/lib64/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:303 (find_package)
/home/aure/src/vtk/build/lib64/cmake/vtk-9.0/vtk-config.cmake:138 (include)
/home/aure/src/vtk/build/vtk-config.cmake:1 (include)
CMakeLists.txt:24 (find_package)
PR #6 improved the build-system to properly install artifacts
The configured vtkAddonInstallConfig.cmake.in
should be improved so that it does NOT contain absolute paths:
vtkAddon/vtkAddonInstallConfig.cmake.in
Lines 1 to 4 in 965cb2e
The following resources may be helpful to learn how to move forward:
Some CMake projects:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.