Commit 70ec3748 authored by Ben Boeckel's avatar Ben Boeckel

Examples/ImageProcessing: update to the new module system

parent d2ce944d
......@@ -35,6 +35,7 @@ else ()
add_example(GUI/Qt/ImageViewer)
add_example(GUI/Qt/SimpleView)
add_example(IO/Cxx)
add_example(ImageProcessing/Cxx)
endif ()
if (FALSE)
......@@ -48,7 +49,6 @@ else()
else()
if (vtkTestingCore_LOADED)
if (NOT VTK_RENDERING_BACKEND STREQUAL "None")
add_subdirectory(ImageProcessing/Cxx)
add_subdirectory(Medical/Cxx)
add_subdirectory(Modelling/Cxx)
add_subdirectory(MultiBlock/Cxx)
......
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(ImageProcessing)
find_package(VTK
OPTIONAL_COMPONENTS
TestingCore
TestingRendering)
find_package(VTK
COMPONENTS
CommonSystem
IOImage
ImagingFourier
ImagingGeneral
ImagingSources
ImagingStatistics
ImagingStencil
InteractionStyle
RenderingCore)
if (NOT VTK_FOUND)
message("Skipping example: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif ()
PROJECT(ImageProcessing)
find_package(VTK REQUIRED)
vtk_module_config(VTK
vtkCommonCore
vtkFiltersCore
vtkFiltersModeling
vtkFiltersSources
vtkIOImage
vtkImagingCore
vtkImagingGeneral
vtkImagingStatistics
vtkImagingStencil
vtkInteractionStyle
vtkRenderingOpenGL2
vtkRenderingCore
vtkTestingCore
vtkTestingRendering
)
include(${VTK_USE_FILE})
add_executable(ImageSlicing MACOSX_BUNDLE
ImageSlicing.cxx)
target_link_libraries(ImageSlicing
PRIVATE
${VTK_LIBRARIES})
add_executable(ImageSlicing MACOSX_BUNDLE ImageSlicing.cxx)
target_link_libraries(ImageSlicing ${VTK_LIBRARIES})
add_executable(ImageBenchmark
ImageBenchmark.cxx)
target_link_libraries(ImageBenchmark
PRIVATE
${VTK_LIBRARIES})
add_executable(ImageBenchmark ImageBenchmark.cxx)
target_link_libraries(ImageBenchmark ${VTK_LIBRARIES})
add_executable(ImageBenchmarkDriver
ImageBenchmarkDriver.cxx)
target_link_libraries(ImageBenchmarkDriver
PRIVATE
${VTK_LIBRARIES})
add_executable(ImageBenchmarkDriver ImageBenchmarkDriver.cxx)
target_link_libraries(ImageBenchmarkDriver ${VTK_LIBRARIES})
vtk_module_autoinit(
TARGETS ImageSlicing
ImageBenchmark
ImageBenchmarkDriver
MODULES ${VTK_LIBRARIES})
if(BUILD_TESTING)
if(vtkTestingRendering_LOADED)
if (BUILD_TESTING)
if (TARGET VTK::TestingRendering)
######## Regression Testing ########
set(vtk-example ImageProcessingExamples)
set(_vtk_test_module ImageProcessingExamples)
vtk_module_test_data(
Data/headsq/quarter/,REGEX:.*)
set(TestImageSlicing_ARGS ${_vtk_build_TEST_DATA_DIRECTORY}/Data/headsq/quarter)
set(TestImageBenchmark_ARGS
"--threads" "2" "--filter" "resize:kernelsize=4")
vtk_add_test_cxx(${vtk-example}CxxTests tests
vtk_add_test_cxx(ImageProcessingExamplesCxxTests tests
TestImageBenchmark.cxx,NO_VALID,NO_DATA,NO_OUTPUT
TestImageSlicing.cxx
)
vtk_test_cxx_executable(${vtk-example}CxxTests tests
vtk_test_cxx_executable(ImageProcessingExamplesCxxTests tests
RENDERING_FACTORY
)
endif()
endif()
endif ()
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment