Skip to content

Commit 0db8e1d

Browse files
authored
Merge pull request #193 from mseng10/superbuild
2 parents 9968475 + cddc856 commit 0db8e1d

File tree

107 files changed

+1522
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1522
-305
lines changed

Superbuild/External-VTK.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Get and build vtk
33

44
if(NOT VTK_TAG)
5-
set(VTK_TAG "v8.2.0")
5+
set(VTK_TAG "v9.0.1")
66
endif()
77

88
set(PYTHON_EXECUTABLE "${ITKPYTHON_EXECUTABLE}")

src/Bridge/VtkGlue/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@ add_example(ConvertAnitkImageTovtkImageData)
22
add_example(ConvertAnRGBitkImageTovtkImageData)
33
add_example(ConvertvtkImageDataToAnitkImage)
44
add_example(ConvertRGBvtkImageDataToAnitkImage)
5-
add_example(VisualizeEvolvingDense2DLevelSetAsElevationMap)
6-
add_example(VisualizeEvolvingDense2DLevelSetZeroSet)
75

86
if(ENABLE_QUICKVIEW)
97

108
add_example(VTKImageToITKImage)
11-
compare_to_baseline(EXAMPLE_NAME VTKImageToITKImage
12-
BASELINE_PREFIX OutputBaseline
13-
)
9+
#TODO: Save output ITK image and then use it to compare to baseline
10+
#compare_to_baseline(EXAMPLE_NAME VTKImageToITKImage
11+
# BASELINE_PREFIX OutputBaseline
12+
# )
1413

14+
if(ITK_VERSION_MAJOR LESS 5)
15+
add_example(VisualizeEvolvingDense2DLevelSetAsElevationMap)
16+
add_example(VisualizeEvolvingDense2DLevelSetZeroSet)
1517
add_example(VisualizeStaticDense2DLevelSetAsElevationMap)
1618
add_example(VisualizeStaticDense2DLevelSetZeroSet)
1719
add_example(VisualizeStaticWhitaker2DLevelSetLayers)
1820
add_example(VisualizeStaticShi2DLevelSetLayers)
1921
add_example(VisualizeStaticMalcolm2DLevelSetLayers)
22+
endif()
2023

2124
endif()

src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@ find_package(ITK REQUIRED)
66
include(${ITK_USE_FILE})
77

88
# Since we use vtkImageMagnitude
9-
find_package(VTK REQUIRED COMPONENTS vtkImagingMath)
10-
include(${VTK_USE_FILE})
11-
9+
find_package(VTK REQUIRED
10+
COMPONENTS
11+
ImagingMath
12+
)
13+
if(VTK_VERSION VERSION_LESS "8.90.0")
14+
include(${VTK_USE_FILE})
15+
endif()
1216

1317
add_executable(ConvertvtkImageDataToAnitkImage Code.cxx)
1418
target_link_libraries(ConvertvtkImageDataToAnitkImage
1519
${ITK_LIBRARIES}
1620
${VTK_LIBRARIES}
1721
)
1822

23+
if(NOT VTK_VERSION VERSION_LESS "8.90.0")
24+
vtk_module_autoinit(
25+
TARGETS ConvertvtkImageDataToAnitkImage
26+
MODULES ${VTK_LIBRARIES}
27+
)
28+
endif()
29+
1930
install(TARGETS ConvertvtkImageDataToAnitkImage
2031
DESTINATION bin/ITKExamples/Bridge/VtkGlue
2132
COMPONENT Runtime

src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,27 @@ project(VTKImageToITKImage)
55
find_package(ITK REQUIRED)
66
include(${ITK_USE_FILE})
77

8-
find_package(VTK REQUIRED)
9-
include(${VTK_USE_FILE})
8+
find_package(VTK REQUIRED
9+
COMPONENTS
10+
vtkImagingColor
11+
vtkIOImage
12+
vtkRenderingCore
13+
vtkRenderingGL2PSOpenGL2
14+
)
15+
if(VTK_VERSION VERSION_LESS "8.90.0")
16+
include(${VTK_USE_FILE})
17+
endif()
1018

1119
add_executable(VTKImageToITKImage Code.cxx)
1220
target_link_libraries(VTKImageToITKImage ${ITK_LIBRARIES} ${VTK_LIBRARIES})
1321

22+
if(NOT VTK_VERSION VERSION_LESS "8.90.0")
23+
vtk_module_autoinit(
24+
TARGETS VTKImageToITKImage
25+
MODULES ${VTK_LIBRARIES}
26+
)
27+
endif()
28+
1429
install(TARGETS VTKImageToITKImage
1530
DESTINATION bin/ITKExamples/Bridge/VtkGlue
1631
COMPONENT Runtime
@@ -24,5 +39,5 @@ install(FILES Code.cxx CMakeLists.txt
2439

2540
enable_testing()
2641
add_test(NAME VTKImageToITKImageTest
27-
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/VTKImageToITKImage)
42+
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/VTKImageToITKImage Gourds.png)
2843

src/Bridge/VtkGlue/VTKImageToITKImage/Documentation.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
VTK Image To ITK Image
22
======================
3-
.. warning::
4-
**Fix Problem**
5-
Contains problems not fixed from original wiki.
63
.. index::
74
single: VTKImageToImageFilter
85

@@ -14,11 +11,17 @@ Convert a VTK image to an ITK image.
1411

1512
Results
1613
-------
17-
.. note::
18-
**Help Wanted**
19-
Implementation of Results for sphinx examples containing this message.
20-
Reconfiguration of CMakeList.txt may be necessary.
21-
`Write An Example <https://itk.org/ITKExamples/Documentation/Contribute/WriteANewExample.html`>
14+
.. figure:: Gourds.png
15+
:scale: 50%
16+
:alt: Input image.
17+
18+
Input Image
19+
20+
.. figure:: VTKImageToITKImageQuickview.png
21+
:scale: 50%
22+
:alt: QuickView output.
23+
24+
Output In QuickView
2225

2326
Code
2427
----
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
859fd5a9de82ac8bbdf81c1c75548ce340c36c46396c8f63bbe709fe572af54df3bf69e18ece04e84977db3fee7aafc50ea6d51926cec1891661fb45a1762907
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1b114c209ad010f6710b8c63a2a3ef66dc237d5efc7eb12dcb6a2105535f1c9ee568bd0bd646acd8da78c6468c257e857956a6d5518546461a796452e4c6c689

src/Bridge/VtkGlue/VisualizeStaticDense2DLevelSetAsElevationMap/CMakeLists.txt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@ project( VisualizeStaticDense2DLevelSetAsElevationMap )
55
find_package( ITK REQUIRED )
66
include( ${ITK_USE_FILE} )
77

8-
find_package( VTK REQUIRED )
9-
include( ${VTK_USE_FILE} )
8+
find_package( VTK REQUIRED
9+
COMPONENTS
10+
vtkInteractionImage
11+
vtkRenderingCore
12+
vtkRenderingGL2PSOpenGL2
13+
)
14+
if( VTK_VERSION VERSION_LESS "8.90.0" )
15+
include( ${VTK_USE_FILE} )
16+
endif()
17+
18+
add_executable( VisualizeStaticDense2DLevelSetAsElevationMap Code.cxx )
19+
target_link_libraries( VisualizeStaticDense2DLevelSetAsElevationMap ${ITK_LIBRARIES} ${VTK_LIBRARIES})
1020

11-
add_executable( VisualizeStaticDense2DLevelSetAsElevationMap Code.cxx)
12-
target_link_libraries( VisualizeStaticDense2DLevelSetAsElevationMap ${ITK_LIBRARIES} )
21+
if( NOT VTK_VERSION VERSION_LESS "8.90.0" )
22+
vtk_module_autoinit(
23+
TARGETS VisualizeStaticDense2DLevelSetAsElevationMap
24+
MODULES ${VTK_LIBRARIES}
25+
)
26+
endif()
1327

1428
install( TARGETS VisualizeStaticDense2DLevelSetAsElevationMap
1529
DESTINATION bin/ITKExamples/Bridge/VtkGlue

src/Bridge/VtkGlue/VisualizeStaticDense2DLevelSetZeroSet/CMakeLists.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@ project( VisualizeStaticDense2DLevelSetZeroSet )
55
find_package( ITK REQUIRED )
66
include( ${ITK_USE_FILE} )
77

8-
find_package( VTK REQUIRED )
9-
include( ${VTK_USE_FILE} )
8+
find_package( VTK REQUIRED
9+
COMPONENTS
10+
vtkRenderingCore
11+
vtkRenderingGL2PSOpenGL2
12+
)
13+
if( VTK_VERSION VERSION_LESS "8.90.0" )
14+
include( ${VTK_USE_FILE} )
15+
endif()
16+
17+
add_executable( VisualizeStaticDense2DLevelSetZeroSet Code.cxx )
18+
target_link_libraries( VisualizeStaticDense2DLevelSetZeroSet ${ITK_LIBRARIES} ${VTK_LIBRARIES} )
1019

11-
add_executable( VisualizeStaticDense2DLevelSetZeroSet Code.cxx)
12-
target_link_libraries( VisualizeStaticDense2DLevelSetZeroSet ${ITK_LIBRARIES} )
20+
if( NOT VTK_VERSION VERSION_LESS "8.90.0" )
21+
vtk_module_autoinit(
22+
TARGETS VisualizeStaticDense2DLevelSetZeroSet
23+
MODULES ${VTK_LIBRARIES}
24+
)
25+
endif()
1326

1427
install( TARGETS VisualizeStaticDense2DLevelSetZeroSet
1528
DESTINATION bin/ITKExamples/Bridge/VtkGlue

src/Bridge/VtkGlue/VisualizeStaticMalcolm2DLevelSetLayers/CMakeLists.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@ project( VisualizeStaticMalcolm2DLevelSetLayers )
55
find_package( ITK REQUIRED )
66
include( ${ITK_USE_FILE} )
77

8-
find_package( VTK REQUIRED )
9-
include( ${VTK_USE_FILE} )
8+
find_package( VTK REQUIRED
9+
COMPONENTS
10+
vtkRenderingCore
11+
vtkRenderingGL2PSOpenGL2
12+
)
13+
if( VTK_VERSION VERSION_LESS "8.90.0" )
14+
include( ${VTK_USE_FILE} )
15+
endif()
16+
17+
add_executable( VisualizeStaticMalcolm2DLevelSetLayers Code.cxx )
18+
target_link_libraries( VisualizeStaticMalcolm2DLevelSetLayers ${ITK_LIBRARIES} ${VTK_LIBRARIES} )
1019

11-
add_executable( VisualizeStaticMalcolm2DLevelSetLayers Code.cxx)
12-
target_link_libraries( VisualizeStaticMalcolm2DLevelSetLayers ${ITK_LIBRARIES} )
20+
if( NOT VTK_VERSION VERSION_LESS "8.90.0" )
21+
vtk_module_autoinit(
22+
TARGETS WatchRegistration
23+
MODULES ${VTK_LIBRARIES}
24+
)
25+
endif()
1326

1427
install( TARGETS VisualizeStaticMalcolm2DLevelSetLayers
1528
DESTINATION bin/ITKExamples/Bridge/VtkGlue

0 commit comments

Comments
 (0)