-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: VTK Superbuild Update #193
Conversation
I had problems with VTKGlue for a long time, and it is broken in my nightly build. |
Perhaps @mathstuf could provide some advice? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should provide COMPONENTS
to your find_package(VTK)
calls. Note that without components and use of ${VTK_LIBRARIES}
, you are linking to all of VTK, not just what you need.
These examples only compile with ITK 4.13 and below as they incorporate the ITKLevelSetV4Visualization module. This modules was moved in ITK 5.0.
Presently, all of the examples that utilize QuickView are disabled if QuickView is not enabled. However, these examples strictly use QuickView for visualization purposes and don't contribute to the core functionality of the program. These changes primarily change 2 types of CMakeList.txt files: the ones for a module and those for a specific example. For modules, it will remove if(ENABLE_QUICKVIEW) to simply just enable the example. If some of the examples strictly used VTK and not QuickView, I replaced it with if(VTK_DIR). For examples, it will first check if QuickView is enabled. If so, that will find the VTK package and only utilize the components we need which primarily is: vtkRenderingCore and vtkRenderingGL2PSOpenGL2. If the VTK version is less than 8.9, then the VTK_USE_FILE is included. Finally, it links the VTK_LIBRARIES, and intiates the VTK module if the VTK version is atleast 8.9.
Many of the examples that utilize VTK were not configured correctly or needed to be updated to accomodate VTK 9.1.0. This primarily included, finding the VTK package and only using the components that specific example needed. If the VTK version is less than 8.9, then the VTK_USE_FILE is included. Finally, the VTK_LIBRARIES are linked and if the VTK version is atleast 8.9, then the module is inialized using VTK's vtk_module_autoinit().
@thewtex @dzenanz After some time, I was able to make significant changes to accommodate examples that utilize VTK/QuickView in some form. In addition to my initial comments in this PR, I was able to successfully configure all of the examples that use VTK and/or QuickView. For examples that strictly utilize VTK, I was able to configure their respective For examples that strictly use QuickView, but nothing else, I noticed they weren't being built unless Finally, many of the examples needed to have their test input updated to properly pass. In addition, their documentation was updated to contain the new input/output. A few of the examples and their respective tests contained errors
|
After fixing the CMakeList.txt scipts for examples that use VTK library in some form, many of the examples needed there test input and documentation updated. This primarily added an input image for an examples test, and updated it's respective documentation.txt with the input and output. A few of the examples and/or their respective tests contained errors that were marked with a TODO, for a future PR. These included: 1) Baseline comparisons, that cannot work due to the output not ever being stored. In a future PR, the examples should be modified to save their output, so we can test against it. + VTKImageToITKImageBaseline + InPlaceFilterOfImageBaseline + GeometricPropertiesOfRegionBaseline 2) The DemonstrateThresholdAlgorithm example has it's KittlerIllingworth filter commented out with a TODO. This was the only filter to not work, and will be documented in a future issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mseng10 fantastic work! 👍
Description
This PR will be the first step in getting the Superbuild's libraries updated to their respective latest versions. In order to avoid a heavy PR, this will strictly contain ITK and VTK changes.
Versions Changed
abd38d5a0040b9a8fbb0ad3127089dbb72a93342
(same as GitHub Actions)9.0.1
LevelSetV4Visualization
The examples located in
src/Bridge/VtkGlue
that utilize the (deprecated in ITKv5.0
)ITKLevelSetV4Visualization
module, now require the ITK version to be less than5.0
.VTK Configuration
Several of the examples needed to have their
CMakeLists.txt
reconfigured. In addition, a few of them did not even have VTK utilized in their respectiveCMakeLists.txt
, despite utilizing VTK in theircxx
script.After reconfiguring, I am able to get a clean build, but it has resulted in 63 failing tests. However, many of these can be attributed to a single error when using the
VtkGlue
module:I saw a mention of this issue in InsightSoftwareConsortium/ITK#739. I am unsure of the exact steps to fix this, but I will continue to investigate. If anyone has knowledge of this error, please reach out.
Note: The PR will remain a draft until the Superbuild builds cleanly and passes all tests for VTK
9.0.1
.