diff --git a/src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/CMakeLists.txt b/src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/CMakeLists.txt index c1446805b..13f3a1c6d 100644 --- a/src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/CMakeLists.txt +++ b/src/Bridge/VtkGlue/ConvertvtkImageDataToAnitkImage/CMakeLists.txt @@ -6,9 +6,6 @@ find_package(ITK REQUIRED) # Since we use vtkImageMagnitude find_package(VTK REQUIRED COMPONENTS ImagingMath) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -18,12 +15,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ConvertvtkImageDataToAnitkImage - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS ConvertvtkImageDataToAnitkImage + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt b/src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt index e03594b3e..a4ba0d8c9 100644 --- a/src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt +++ b/src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt @@ -5,22 +5,15 @@ project(VTKImageToITKImage) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}ImagingColor - ${_vtk_prefix}IOImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + ImagingColor + IOImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -31,12 +24,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS VTKImageToITKImage - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS VTKImageToITKImage + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/DisplayImage/CMakeLists.txt b/src/Core/Common/DisplayImage/CMakeLists.txt index 44847473d..8b8f9b0d8 100644 --- a/src/Core/Common/DisplayImage/CMakeLists.txt +++ b/src/Core/Common/DisplayImage/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -28,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS DisplayImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS DisplayImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt b/src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt index 357880135..c983ca51f 100644 --- a/src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt +++ b/src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt @@ -6,21 +6,14 @@ find_package(ITK REQUIRED) itk_generate_factory_registration() find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -32,12 +25,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS FindMaxAndMinInImage - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS FindMaxAndMinInImage + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/FindMaxAndMinInImage/Code.cxx b/src/Core/Common/FindMaxAndMinInImage/Code.cxx index b31b88c0c..7322cf8b6 100644 --- a/src/Core/Common/FindMaxAndMinInImage/Code.cxx +++ b/src/Core/Common/FindMaxAndMinInImage/Code.cxx @@ -22,7 +22,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -61,12 +60,8 @@ main(int argc, char * argv[]) originalConnector->SetInput(input); vtkSmartPointer originalActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - originalActor->SetInput(originalConnector->GetOutput()); -#else originalConnector->Update(); originalActor->GetMapper()->SetInputData(originalConnector->GetOutput()); -#endif vtkSmartPointer minimumSphereSource = vtkSmartPointer::New(); ImageType::IndexType minimumLocation = imageCalculatorFilter->GetIndexOfMinimum(); @@ -90,7 +85,6 @@ main(int argc, char * argv[]) maximumActor->SetMapper(maximumMapper); maximumActor->GetProperty()->SetColor(1, 0, 0); - // Visualize vtkSmartPointer renderWindow = vtkSmartPointer::New(); diff --git a/src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt b/src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt index 33ce7277e..aecd21d1a 100644 --- a/src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt +++ b/src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt @@ -6,21 +6,14 @@ find_package(ITK REQUIRED) itk_generate_factory_registration() find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -33,12 +26,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS InPlaceFilterOfImage - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS InPlaceFilterOfImage + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/InPlaceFilterOfImage/Code.cxx b/src/Core/Common/InPlaceFilterOfImage/Code.cxx index 9374817be..7c49af989 100644 --- a/src/Core/Common/InPlaceFilterOfImage/Code.cxx +++ b/src/Core/Common/InPlaceFilterOfImage/Code.cxx @@ -21,8 +21,6 @@ #include -#include "vtkVersion.h" - #include "vtkSmartPointer.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" @@ -56,12 +54,8 @@ main(int argc, char * argv[]) connector->SetInput(image); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); diff --git a/src/Core/Common/IterateLineThroughImage/CMakeLists.txt b/src/Core/Common/IterateLineThroughImage/CMakeLists.txt index 4f9c2bc55..2bb344b0e 100644 --- a/src/Core/Common/IterateLineThroughImage/CMakeLists.txt +++ b/src/Core/Common/IterateLineThroughImage/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -27,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS IterateLineThroughImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS IterateLineThroughImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Common/IterateRegionWithAccessToIndexWithWriteAccess/CMakeLists.txt b/src/Core/Common/IterateRegionWithAccessToIndexWithWriteAccess/CMakeLists.txt index ff85035ab..4a0ca10c7 100644 --- a/src/Core/Common/IterateRegionWithAccessToIndexWithWriteAccess/CMakeLists.txt +++ b/src/Core/Common/IterateRegionWithAccessToIndexWithWriteAccess/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -28,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS IterateRegionWithAccessToIndexWithWriteAccess - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS IterateRegionWithAccessToIndexWithWriteAccess + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Common/IterateRegionWithAccessToIndexWithoutWriteAccess/CMakeLists.txt b/src/Core/Common/IterateRegionWithAccessToIndexWithoutWriteAccess/CMakeLists.txt index 12bc9323b..91fa43139 100644 --- a/src/Core/Common/IterateRegionWithAccessToIndexWithoutWriteAccess/CMakeLists.txt +++ b/src/Core/Common/IterateRegionWithAccessToIndexWithoutWriteAccess/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -27,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS IterateRegionWithAccessToIndexWithoutWriteAccess - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS IterateRegionWithAccessToIndexWithoutWriteAccess + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt b/src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt index 3acbc5e08..00eb87dc9 100644 --- a/src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt +++ b/src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt @@ -6,21 +6,14 @@ find_package(ITK REQUIRED) itk_generate_factory_registration() find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -32,12 +25,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS IterateRegionWithNeighborhood - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS IterateRegionWithNeighborhood + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/IterateRegionWithNeighborhood/Code.cxx b/src/Core/Common/IterateRegionWithNeighborhood/Code.cxx index 814a1fbf3..120fef9c9 100644 --- a/src/Core/Common/IterateRegionWithNeighborhood/Code.cxx +++ b/src/Core/Common/IterateRegionWithNeighborhood/Code.cxx @@ -21,7 +21,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -61,7 +60,6 @@ main(int argc, char * argv[]) itk::NeighborhoodIterator iterator(radius, image, region); - while (!iterator.IsAtEnd()) { // Set the current pixel to white @@ -88,12 +86,8 @@ main(int argc, char * argv[]) connector->SetInput(image); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif vtkSmartPointer renderWindow = vtkSmartPointer::New(); diff --git a/src/Core/Common/IterateRegionWithWriteAccess/CMakeLists.txt b/src/Core/Common/IterateRegionWithWriteAccess/CMakeLists.txt index 398d0aff9..3b7db8552 100644 --- a/src/Core/Common/IterateRegionWithWriteAccess/CMakeLists.txt +++ b/src/Core/Common/IterateRegionWithWriteAccess/CMakeLists.txt @@ -6,23 +6,15 @@ find_package(ITK REQUIRED) itk_generate_factory_registration() find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -33,12 +25,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS IterateRegionWithWriteAccess - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS IterateRegionWithWriteAccess + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/IterateRegionWithWriteAccess/Code.cxx b/src/Core/Common/IterateRegionWithWriteAccess/Code.cxx index 6a9e34b14..51fc9930b 100644 --- a/src/Core/Common/IterateRegionWithWriteAccess/Code.cxx +++ b/src/Core/Common/IterateRegionWithWriteAccess/Code.cxx @@ -21,7 +21,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -75,12 +74,8 @@ main(int argc, char * argv[]) connector->SetInput(image); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif vtkSmartPointer renderWindow = vtkSmartPointer::New(); diff --git a/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/CMakeLists.txt b/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/CMakeLists.txt index f984627c3..de97e56c5 100644 --- a/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/CMakeLists.txt +++ b/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/CMakeLists.txt @@ -5,24 +5,16 @@ project(MakeOutOfBoundsPixelsReturnConstValue) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}InteractionStyle - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + InteractionStyle + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -32,12 +24,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS MakeOutOfBoundsPixelsReturnConstValue - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS MakeOutOfBoundsPixelsReturnConstValue + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/Code.cxx b/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/Code.cxx index 963457745..3183d65bf 100644 --- a/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/Code.cxx +++ b/src/Core/Common/MakeOutOfBoundsPixelsReturnConstValue/Code.cxx @@ -22,7 +22,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -77,12 +76,8 @@ main() connector->SetInput(image); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif vtkSmartPointer renderWindow = vtkSmartPointer::New(); diff --git a/src/Core/Common/MultiThreadOilPainting/CMakeLists.txt b/src/Core/Common/MultiThreadOilPainting/CMakeLists.txt index 7eed02386..a29f86df4 100644 --- a/src/Core/Common/MultiThreadOilPainting/CMakeLists.txt +++ b/src/Core/Common/MultiThreadOilPainting/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -27,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS MultiThreadOilPainting - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS MultiThreadOilPainting + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Mesh/ConvertMeshToUnstructeredGrid/CMakeLists.txt b/src/Core/Mesh/ConvertMeshToUnstructeredGrid/CMakeLists.txt index ff44a0103..6c81c15df 100644 --- a/src/Core/Mesh/ConvertMeshToUnstructeredGrid/CMakeLists.txt +++ b/src/Core/Mesh/ConvertMeshToUnstructeredGrid/CMakeLists.txt @@ -5,21 +5,14 @@ project(ConvertMeshToUnstructeredGrid) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}IOXML - ${_vtk_prefix}CommonDataModel - ${_vtk_prefix}InteractionImage + IOXML + CommonDataModel + InteractionImage ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +23,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS WatchRegistration - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS WatchRegistration + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Core/Mesh/ConvertMeshToUnstructeredGrid/Code.cxx b/src/Core/Mesh/ConvertMeshToUnstructeredGrid/Code.cxx index c022eca47..c1966b1e5 100644 --- a/src/Core/Mesh/ConvertMeshToUnstructeredGrid/Code.cxx +++ b/src/Core/Mesh/ConvertMeshToUnstructeredGrid/Code.cxx @@ -22,7 +22,6 @@ #include "itkQuadrilateralCell.h" // VTK -#include "vtkVersion.h" #include #include #include @@ -109,11 +108,7 @@ main() // Write file vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("output.vtu"); -#if VTK_MAJOR_VERSION <= 5 - writer->SetInputConnection(unstructuredGrid->GetProducerPort()); -#else writer->SetInputData(unstructuredGrid); -#endif writer->Write(); return EXIT_SUCCESS; diff --git a/src/Core/SpatialObjects/ContourSpatialObject/CMakeLists.txt b/src/Core/SpatialObjects/ContourSpatialObject/CMakeLists.txt index d4d4d5fd5..cf7e67117 100644 --- a/src/Core/SpatialObjects/ContourSpatialObject/CMakeLists.txt +++ b/src/Core/SpatialObjects/ContourSpatialObject/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -27,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ContourSpatialObject - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ContourSpatialObject + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/CMakeLists.txt b/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/CMakeLists.txt index b51c02787..40e2e5298 100644 --- a/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/CMakeLists.txt +++ b/src/Core/Transform/GlobalRegistrationTwoImagesBSpline/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -33,12 +30,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS GlobalRegistrationTwoImagesBSpline - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS GlobalRegistrationTwoImagesBSpline + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges/CMakeLists.txt b/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges/CMakeLists.txt index eada292d2..1d223eb78 100644 --- a/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges/CMakeLists.txt +++ b/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothImageWhilePreservingEdges - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothImageWhilePreservingEdges + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges2/CMakeLists.txt b/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges2/CMakeLists.txt index c568cc7f4..05b662887 100644 --- a/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges2/CMakeLists.txt +++ b/src/Filtering/AnisotropicSmoothing/SmoothImageWhilePreservingEdges2/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothImageWhilePreservingEdges2 - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothImageWhilePreservingEdges2 + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/BinaryMathematicalMorphology/ClosingBinaryImage/CMakeLists.txt b/src/Filtering/BinaryMathematicalMorphology/ClosingBinaryImage/CMakeLists.txt index e020aae70..497329692 100644 --- a/src/Filtering/BinaryMathematicalMorphology/ClosingBinaryImage/CMakeLists.txt +++ b/src/Filtering/BinaryMathematicalMorphology/ClosingBinaryImage/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ClosingBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ClosingBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/BinaryMathematicalMorphology/OpeningBinaryImage/CMakeLists.txt b/src/Filtering/BinaryMathematicalMorphology/OpeningBinaryImage/CMakeLists.txt index 55294d474..37d95e7d8 100644 --- a/src/Filtering/BinaryMathematicalMorphology/OpeningBinaryImage/CMakeLists.txt +++ b/src/Filtering/BinaryMathematicalMorphology/OpeningBinaryImage/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS OpeningBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS OpeningBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/BinaryMathematicalMorphology/PruneBinaryImage/CMakeLists.txt b/src/Filtering/BinaryMathematicalMorphology/PruneBinaryImage/CMakeLists.txt index 08a3b7b6c..f433e1f60 100644 --- a/src/Filtering/BinaryMathematicalMorphology/PruneBinaryImage/CMakeLists.txt +++ b/src/Filtering/BinaryMathematicalMorphology/PruneBinaryImage/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -29,12 +26,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS PruneBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS PruneBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/Convolution/ConvolveImageWithKernel/CMakeLists.txt b/src/Filtering/Convolution/ConvolveImageWithKernel/CMakeLists.txt index 477a31f56..a38b2d5a6 100644 --- a/src/Filtering/Convolution/ConvolveImageWithKernel/CMakeLists.txt +++ b/src/Filtering/Convolution/ConvolveImageWithKernel/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ConvolveImageWithKernel - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ConvolveImageWithKernel + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/CurvatureFlow/BinaryMinMaxCurvatureFlow/CMakeLists.txt b/src/Filtering/CurvatureFlow/BinaryMinMaxCurvatureFlow/CMakeLists.txt index e7d9e7344..e5464f0c9 100644 --- a/src/Filtering/CurvatureFlow/BinaryMinMaxCurvatureFlow/CMakeLists.txt +++ b/src/Filtering/CurvatureFlow/BinaryMinMaxCurvatureFlow/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -29,12 +26,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS BinaryMinMaxCurvatureFlow - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS BinaryMinMaxCurvatureFlow + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/CurvatureFlow/SmoothImageUsingCurvatureFlow/CMakeLists.txt b/src/Filtering/CurvatureFlow/SmoothImageUsingCurvatureFlow/CMakeLists.txt index 15fb8b727..774f4f5ac 100644 --- a/src/Filtering/CurvatureFlow/SmoothImageUsingCurvatureFlow/CMakeLists.txt +++ b/src/Filtering/CurvatureFlow/SmoothImageUsingCurvatureFlow/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothImageUsingCurvatureFlow - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothImageUsingCurvatureFlow + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/CurvatureFlow/SmoothImageUsingMinMaxCurvatureFlow/CMakeLists.txt b/src/Filtering/CurvatureFlow/SmoothImageUsingMinMaxCurvatureFlow/CMakeLists.txt index c7e8f3714..e3b182c39 100644 --- a/src/Filtering/CurvatureFlow/SmoothImageUsingMinMaxCurvatureFlow/CMakeLists.txt +++ b/src/Filtering/CurvatureFlow/SmoothImageUsingMinMaxCurvatureFlow/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothImageUsingMinMaxCurvatureFlow - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothImageUsingMinMaxCurvatureFlow + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/CurvatureFlow/SmoothRGBImageUsingCurvatureFlow/CMakeLists.txt b/src/Filtering/CurvatureFlow/SmoothRGBImageUsingCurvatureFlow/CMakeLists.txt index 22b61e727..dae2eab82 100644 --- a/src/Filtering/CurvatureFlow/SmoothRGBImageUsingCurvatureFlow/CMakeLists.txt +++ b/src/Filtering/CurvatureFlow/SmoothRGBImageUsingCurvatureFlow/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothRGBImageUsingCurvatureFlow - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothRGBImageUsingCurvatureFlow + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/CurvatureFlow/SmoothRGBImageUsingMinMaxCurvatureFlow/CMakeLists.txt b/src/Filtering/CurvatureFlow/SmoothRGBImageUsingMinMaxCurvatureFlow/CMakeLists.txt index f77660d3c..21ca40d5a 100644 --- a/src/Filtering/CurvatureFlow/SmoothRGBImageUsingMinMaxCurvatureFlow/CMakeLists.txt +++ b/src/Filtering/CurvatureFlow/SmoothRGBImageUsingMinMaxCurvatureFlow/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -30,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothRGBImageUsingMinMaxCurvatureFlow - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothRGBImageUsingMinMaxCurvatureFlow + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/DistanceMap/ApproxDistanceMapOfBinary/CMakeLists.txt b/src/Filtering/DistanceMap/ApproxDistanceMapOfBinary/CMakeLists.txt index 43cbd0c0d..5c0da5c01 100644 --- a/src/Filtering/DistanceMap/ApproxDistanceMapOfBinary/CMakeLists.txt +++ b/src/Filtering/DistanceMap/ApproxDistanceMapOfBinary/CMakeLists.txt @@ -10,12 +10,9 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -28,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ApproxDistanceMapOfBinary - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ApproxDistanceMapOfBinary + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/DistanceMap/MaurerDistanceMapOfBinary/CMakeLists.txt b/src/Filtering/DistanceMap/MaurerDistanceMapOfBinary/CMakeLists.txt index b5a34a653..ea9833614 100644 --- a/src/Filtering/DistanceMap/MaurerDistanceMapOfBinary/CMakeLists.txt +++ b/src/Filtering/DistanceMap/MaurerDistanceMapOfBinary/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS MaurerDistanceMapOfBinary - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS MaurerDistanceMapOfBinary + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/DistanceMap/MeanDistanceBetweenAllPointsOnTwoCurves/CMakeLists.txt b/src/Filtering/DistanceMap/MeanDistanceBetweenAllPointsOnTwoCurves/CMakeLists.txt index 26df7521a..5feb38fca 100644 --- a/src/Filtering/DistanceMap/MeanDistanceBetweenAllPointsOnTwoCurves/CMakeLists.txt +++ b/src/Filtering/DistanceMap/MeanDistanceBetweenAllPointsOnTwoCurves/CMakeLists.txt @@ -9,14 +9,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -27,12 +23,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS MeanDistanceBetweenAllPointsOnTwoCurves - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS MeanDistanceBetweenAllPointsOnTwoCurves + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/DistanceMap/SignedDistanceMapOfBinary/CMakeLists.txt b/src/Filtering/DistanceMap/SignedDistanceMapOfBinary/CMakeLists.txt index 2f2e35c37..de9911c5a 100644 --- a/src/Filtering/DistanceMap/SignedDistanceMapOfBinary/CMakeLists.txt +++ b/src/Filtering/DistanceMap/SignedDistanceMapOfBinary/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SignedDistanceMapOfBinary - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SignedDistanceMapOfBinary + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageFeature/ApplyAFilterToASpecifiedRegionOfAnImage/CMakeLists.txt b/src/Filtering/ImageFeature/ApplyAFilterToASpecifiedRegionOfAnImage/CMakeLists.txt index 0af0d9776..81caed689 100644 --- a/src/Filtering/ImageFeature/ApplyAFilterToASpecifiedRegionOfAnImage/CMakeLists.txt +++ b/src/Filtering/ImageFeature/ApplyAFilterToASpecifiedRegionOfAnImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ApplyAFilterToASpecifiedRegionOfAnImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ApplyAFilterToASpecifiedRegionOfAnImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageFeature/BilateralFilterAnImage/CMakeLists.txt b/src/Filtering/ImageFeature/BilateralFilterAnImage/CMakeLists.txt index 595683f60..1d82a6543 100644 --- a/src/Filtering/ImageFeature/BilateralFilterAnImage/CMakeLists.txt +++ b/src/Filtering/ImageFeature/BilateralFilterAnImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -30,12 +26,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS BilateralFilterAnImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS BilateralFilterAnImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageFeature/FindZeroCrossingsInSignedImage/CMakeLists.txt b/src/Filtering/ImageFeature/FindZeroCrossingsInSignedImage/CMakeLists.txt index 4522a2857..e07a301ab 100644 --- a/src/Filtering/ImageFeature/FindZeroCrossingsInSignedImage/CMakeLists.txt +++ b/src/Filtering/ImageFeature/FindZeroCrossingsInSignedImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -28,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS FindZeroCrossingsInSignedImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS FindZeroCrossingsInSignedImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageFeature/ZeroCrossingBasedEdgeDecor/CMakeLists.txt b/src/Filtering/ImageFeature/ZeroCrossingBasedEdgeDecor/CMakeLists.txt index e373750ca..9e6268055 100644 --- a/src/Filtering/ImageFeature/ZeroCrossingBasedEdgeDecor/CMakeLists.txt +++ b/src/Filtering/ImageFeature/ZeroCrossingBasedEdgeDecor/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ZeroCrossingBasedEdgeDecor - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ZeroCrossingBasedEdgeDecor + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageGrid/CropImageBySpecifyingRegion2/CMakeLists.txt b/src/Filtering/ImageGrid/CropImageBySpecifyingRegion2/CMakeLists.txt index ea954e781..be45a80a1 100644 --- a/src/Filtering/ImageGrid/CropImageBySpecifyingRegion2/CMakeLists.txt +++ b/src/Filtering/ImageGrid/CropImageBySpecifyingRegion2/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS CropImageBySpecifyingRegion2 - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS CropImageBySpecifyingRegion2 + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageGrid/RunImageFilterOnRegionOfImage/CMakeLists.txt b/src/Filtering/ImageGrid/RunImageFilterOnRegionOfImage/CMakeLists.txt index 89893ce4a..18a9690f3 100644 --- a/src/Filtering/ImageGrid/RunImageFilterOnRegionOfImage/CMakeLists.txt +++ b/src/Filtering/ImageGrid/RunImageFilterOnRegionOfImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -31,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS RunImageFilterOnRegionOfImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS RunImageFilterOnRegionOfImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageIntensity/AbsValueOfImage/CMakeLists.txt b/src/Filtering/ImageIntensity/AbsValueOfImage/CMakeLists.txt index 19e5b1563..495e25ba0 100644 --- a/src/Filtering/ImageIntensity/AbsValueOfImage/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/AbsValueOfImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS AbsValueOfImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS AbsValueOfImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageIntensity/AddTwoImages/CMakeLists.txt b/src/Filtering/ImageIntensity/AddTwoImages/CMakeLists.txt index f3b96ffd6..015901274 100644 --- a/src/Filtering/ImageIntensity/AddTwoImages/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/AddTwoImages/CMakeLists.txt @@ -5,23 +5,15 @@ project(AddTwoImages) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -32,12 +24,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS AddTwoImages - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS AddTwoImages + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Filtering/ImageIntensity/AddTwoImages/Code.cxx b/src/Filtering/ImageIntensity/AddTwoImages/Code.cxx index 6deb2e03a..2f085011a 100644 --- a/src/Filtering/ImageIntensity/AddTwoImages/Code.cxx +++ b/src/Filtering/ImageIntensity/AddTwoImages/Code.cxx @@ -21,7 +21,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -59,36 +58,24 @@ main() connector1->SetInput(image1); vtkSmartPointer actor1 = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor1->SetInput(connector1->GetOutput()); -#else connector1->Update(); actor1->GetMapper()->SetInputData(connector1->GetOutput()); -#endif // Visualize first image using ConnectorType = itk::ImageToVTKImageFilter; auto connector2 = ConnectorType::New(); connector2->SetInput(image2); vtkSmartPointer actor2 = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor2->SetInput(connector2->GetOutput()); -#else connector2->Update(); actor2->GetMapper()->SetInputData(connector2->GetOutput()); -#endif // Visualize joined image auto addConnector = ConnectorType::New(); addConnector->SetInput(addFilter->GetOutput()); vtkSmartPointer addActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - addActor->SetInput(addConnector->GetOutput()); -#else addConnector->Update(); addActor->GetMapper()->SetInputData(addConnector->GetOutput()); -#endif // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(900, 300); @@ -172,7 +159,6 @@ CreateImage1(ImageType::Pointer image) } } - void CreateImage2(ImageType::Pointer image) { diff --git a/src/Filtering/ImageIntensity/InvertImage/CMakeLists.txt b/src/Filtering/ImageIntensity/InvertImage/CMakeLists.txt index 2a08dc4ce..b53a66d2f 100644 --- a/src/Filtering/ImageIntensity/InvertImage/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/InvertImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS InvertImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS InvertImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageIntensity/MaskImage/CMakeLists.txt b/src/Filtering/ImageIntensity/MaskImage/CMakeLists.txt index f48290463..3992514b8 100644 --- a/src/Filtering/ImageIntensity/MaskImage/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/MaskImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS MaskImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS MaskImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageIntensity/NormalizeImage/CMakeLists.txt b/src/Filtering/ImageIntensity/NormalizeImage/CMakeLists.txt index 086c43c9a..b13a1e979 100644 --- a/src/Filtering/ImageIntensity/NormalizeImage/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/NormalizeImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -30,12 +26,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS NormalizeImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS NormalizeImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageIntensity/SubtractTwoImages/CMakeLists.txt b/src/Filtering/ImageIntensity/SubtractTwoImages/CMakeLists.txt index 47784b24b..73a71b8b7 100644 --- a/src/Filtering/ImageIntensity/SubtractTwoImages/CMakeLists.txt +++ b/src/Filtering/ImageIntensity/SubtractTwoImages/CMakeLists.txt @@ -5,21 +5,14 @@ project(SubtractTwoImages) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -31,12 +24,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SubtractTwoImages - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS SubtractTwoImages + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Filtering/ImageIntensity/SubtractTwoImages/Code.cxx b/src/Filtering/ImageIntensity/SubtractTwoImages/Code.cxx index f40c680db..e884795c9 100644 --- a/src/Filtering/ImageIntensity/SubtractTwoImages/Code.cxx +++ b/src/Filtering/ImageIntensity/SubtractTwoImages/Code.cxx @@ -21,7 +21,6 @@ #include "itkImageToVTKImageFilter.h" -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -59,12 +58,8 @@ main() connector1->SetInput(image1); vtkSmartPointer actor1 = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor1->SetInput(connector1->GetOutput()); -#else connector1->Update(); actor1->GetMapper()->SetInputData(connector1->GetOutput()); -#endif // Visualize second image using ConnectorType = itk::ImageToVTKImageFilter; @@ -73,24 +68,16 @@ main() vtkSmartPointer actor2 = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor2->SetInput(connector2->GetOutput()); -#else connector2->Update(); actor2->GetMapper()->SetInputData(connector2->GetOutput()); -#endif // Visualize subtracted image auto subtractConnector = ConnectorType::New(); subtractConnector->SetInput(subtractFilter->GetOutput()); vtkSmartPointer subtractActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - subtractActor->SetInput(subtractConnector->GetOutput()); -#else subtractConnector->Update(); subtractActor->GetMapper()->SetInputData(subtractConnector->GetOutput()); -#endif // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(900, 300); @@ -174,7 +161,6 @@ CreateImage1(ImageType::Pointer image) } } - void CreateImage2(ImageType::Pointer image) { diff --git a/src/Filtering/ImageLabel/ExtractBoundariesOfConnectedRegionsInBinaryImage/CMakeLists.txt b/src/Filtering/ImageLabel/ExtractBoundariesOfConnectedRegionsInBinaryImage/CMakeLists.txt index 36280693e..b1a4d327d 100644 --- a/src/Filtering/ImageLabel/ExtractBoundariesOfConnectedRegionsInBinaryImage/CMakeLists.txt +++ b/src/Filtering/ImageLabel/ExtractBoundariesOfConnectedRegionsInBinaryImage/CMakeLists.txt @@ -9,14 +9,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -27,12 +23,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ExtractBoundariesOfConnectedRegionsInBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ExtractBoundariesOfConnectedRegionsInBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageLabel/ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage/CMakeLists.txt b/src/Filtering/ImageLabel/ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage/CMakeLists.txt index e16bee134..eb84fccdf 100644 --- a/src/Filtering/ImageLabel/ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage/CMakeLists.txt +++ b/src/Filtering/ImageLabel/ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage/CMakeLists.txt @@ -9,14 +9,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -28,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ExtractInnerAndOuterBoundariesOfBlobsInBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/CMakeLists.txt b/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/CMakeLists.txt index fdd1cfc51..786a3154b 100644 --- a/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/CMakeLists.txt +++ b/src/Filtering/ImageLabel/LabelContoursOfConnectComponent/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -31,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS LabelContoursOfConnectComponent - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS LabelContoursOfConnectComponent + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/MathematicalMorphology/ErodeBinaryImageUsingFlatStruct/CMakeLists.txt b/src/Filtering/MathematicalMorphology/ErodeBinaryImageUsingFlatStruct/CMakeLists.txt index 76a898e8c..63a8fd073 100644 --- a/src/Filtering/MathematicalMorphology/ErodeBinaryImageUsingFlatStruct/CMakeLists.txt +++ b/src/Filtering/MathematicalMorphology/ErodeBinaryImageUsingFlatStruct/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ErodeBinaryImageUsingFlatStruct - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ErodeBinaryImageUsingFlatStruct + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/Smoothing/FindHigherDerivativesOfImage/CMakeLists.txt b/src/Filtering/Smoothing/FindHigherDerivativesOfImage/CMakeLists.txt index cbb9b63ae..e38d535b4 100644 --- a/src/Filtering/Smoothing/FindHigherDerivativesOfImage/CMakeLists.txt +++ b/src/Filtering/Smoothing/FindHigherDerivativesOfImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -30,12 +26,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS FindHigherDerivativesOfImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS FindHigherDerivativesOfImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/Smoothing/SmoothImageWithDiscreteGaussianFilter/CMakeLists.txt b/src/Filtering/Smoothing/SmoothImageWithDiscreteGaussianFilter/CMakeLists.txt index 7d262bcfe..b36956fce 100644 --- a/src/Filtering/Smoothing/SmoothImageWithDiscreteGaussianFilter/CMakeLists.txt +++ b/src/Filtering/Smoothing/SmoothImageWithDiscreteGaussianFilter/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SmoothImageWithDiscreteGaussianFilter - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SmoothImageWithDiscreteGaussianFilter + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/Thresholding/DemonstrateThresholdAlgorithms/CMakeLists.txt b/src/Filtering/Thresholding/DemonstrateThresholdAlgorithms/CMakeLists.txt index 717273293..95402f3fe 100644 --- a/src/Filtering/Thresholding/DemonstrateThresholdAlgorithms/CMakeLists.txt +++ b/src/Filtering/Thresholding/DemonstrateThresholdAlgorithms/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -28,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS DemonstrateThresholdAlgorithms - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS DemonstrateThresholdAlgorithms + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/Thresholding/SeparateGroundUsingOtsu/CMakeLists.txt b/src/Filtering/Thresholding/SeparateGroundUsingOtsu/CMakeLists.txt index 2a5688000..ed02ddf71 100644 --- a/src/Filtering/Thresholding/SeparateGroundUsingOtsu/CMakeLists.txt +++ b/src/Filtering/Thresholding/SeparateGroundUsingOtsu/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SeparateGroundUsingOtsu - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SeparateGroundUsingOtsu + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Nonunit/Review/GeometricPropertiesOfRegion/CMakeLists.txt b/src/Nonunit/Review/GeometricPropertiesOfRegion/CMakeLists.txt index 20647f128..d8fd4d6a6 100644 --- a/src/Nonunit/Review/GeometricPropertiesOfRegion/CMakeLists.txt +++ b/src/Nonunit/Review/GeometricPropertiesOfRegion/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -31,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS GeometricPropertiesOfRegion - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS GeometricPropertiesOfRegion + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Registration/Common/WatchRegistration/CMakeLists.txt b/src/Registration/Common/WatchRegistration/CMakeLists.txt index ebfd2d37f..e267c7c19 100644 --- a/src/Registration/Common/WatchRegistration/CMakeLists.txt +++ b/src/Registration/Common/WatchRegistration/CMakeLists.txt @@ -6,20 +6,13 @@ find_package(ITK REQUIRED) itk_generate_factory_registration() find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -38,12 +31,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS WatchRegistration - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS WatchRegistration + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Registration/Common/WatchRegistration/Code.cxx b/src/Registration/Common/WatchRegistration/Code.cxx index 89b49279a..1e344cdf1 100644 --- a/src/Registration/Common/WatchRegistration/Code.cxx +++ b/src/Registration/Common/WatchRegistration/Code.cxx @@ -28,8 +28,6 @@ #include "itkImageToVTKImageFilter.h" #include "itkCenteredTransformInitializer.h" -#include "vtkVersion.h" - #include "vtkSmartPointer.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" @@ -87,12 +85,8 @@ class IterationUpdate : public itk::Command m_Connector->SetInput(m_Filter->GetOutput()); m_Connector->Update(); -#if VTK_MAJOR_VERSION <= 5 - m_ImageActor->SetInput(m_Connector->GetOutput()); -#else m_Connector->Update(); m_ImageActor->GetMapper()->SetInputData(m_Connector->GetOutput()); -#endif m_RenderWindow->Render(); } void @@ -281,12 +275,8 @@ main(int argc, char * argv[]) connector->SetInput(flip->GetOutput()); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->SetBackground(.4, .5, .6); diff --git a/src/Remote/WikiExamples/CustomUserMatrixToAlignImageWithDICOM/Code.cxx b/src/Remote/WikiExamples/CustomUserMatrixToAlignImageWithDICOM/Code.cxx index c6ed22fb9..f0952e208 100644 --- a/src/Remote/WikiExamples/CustomUserMatrixToAlignImageWithDICOM/Code.cxx +++ b/src/Remote/WikiExamples/CustomUserMatrixToAlignImageWithDICOM/Code.cxx @@ -19,7 +19,6 @@ * #include #include "itkImageToVTKImageFilter.h" -#include "vtkVersion.h" #include #include #include @@ -90,12 +89,8 @@ int main(int argc, char *argv[]) vtkSmartPointer volumeMapper = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - volumeMapper->SetInput(conv->GetOutput()); -#else conv->Update(); volumeMapper->SetInputData(conv->GetOutput()); -#endif vtkSmartPointer volumeProperty = vtkSmartPointer::New(); diff --git a/src/Remote/WikiExamples/DisplayITKImage/Code.cxx b/src/Remote/WikiExamples/DisplayITKImage/Code.cxx index b5a4d62b6..b7159f9e9 100644 --- a/src/Remote/WikiExamples/DisplayITKImage/Code.cxx +++ b/src/Remote/WikiExamples/DisplayITKImage/Code.cxx @@ -20,7 +20,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkImageMapper3D.h" #include "vtkRenderWindowInteractor.h" @@ -48,12 +47,8 @@ main(int argc, char * argv[]) connector->SetInput(input); vtkSmartPointer actor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor->SetInput(connector->GetOutput()); -#else connector->Update(); actor->GetMapper()->SetInputData(connector->GetOutput()); -#endif vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(actor); renderer->ResetCamera(); diff --git a/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/CMakeLists.txt b/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/CMakeLists.txt index 1bfabc2fd..c5e14204b 100644 --- a/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/CMakeLists.txt +++ b/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/CMakeLists.txt @@ -5,21 +5,14 @@ project(ClusterPixelsInGrayscaleImage) find_package(ITK REQUIRED) find_package(VTK REQUIRED) -set(_vtk_prefix "") -if(VTK_VERSION VERSION_LESS "8.90.0") - set(_vtk_prefix "vtk") -endif() find_package( VTK REQUIRED COMPONENTS - ${_vtk_prefix}InteractionImage - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + InteractionImage + RenderingCore + RenderingGL2PSOpenGL2 ) -if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) -endif() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( @@ -33,12 +26,10 @@ target_link_libraries( ${VTK_LIBRARIES} ) -if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ClusterPixelsInGrayscaleImage - MODULES ${VTK_LIBRARIES} - ) -endif() +vtk_module_autoinit( + TARGETS ClusterPixelsInGrayscaleImage + MODULES ${VTK_LIBRARIES} +) install( TARGETS diff --git a/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/Code.cxx b/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/Code.cxx index 14bf3583c..46bc79fef 100644 --- a/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/Code.cxx +++ b/src/Segmentation/Classifiers/ClusterPixelsInGrayscaleImage/Code.cxx @@ -22,7 +22,6 @@ #include -#include "vtkVersion.h" #include "vtkImageViewer.h" #include "vtkRenderWindowInteractor.h" #include "vtkSmartPointer.h" @@ -98,23 +97,15 @@ main() auto originalConnector = ConnectorType::New(); originalConnector->SetInput(image); vtkSmartPointer originalActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - originalActor->SetInput(originalConnector->GetOutput()); -#else originalConnector->Update(); originalActor->SetInputData(originalConnector->GetOutput()); -#endif auto outputConnector = ConnectorType::New(); outputConnector->SetInput(rescaleFilter->GetOutput()); vtkSmartPointer outputActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - outputActor->SetInput(outputConnector->GetOutput()); -#else outputConnector->Update(); outputActor->SetInputData(outputConnector->GetOutput()); -#endif // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); @@ -139,7 +130,6 @@ main() rightRenderer->SetViewport(rightViewport); rightRenderer->SetBackground(.4, .5, .6); - // Add the sphere to the left and the cube to the right leftRenderer->AddActor(originalActor); rightRenderer->AddActor(outputActor); diff --git a/src/Segmentation/ConnectedComponents/AssignContiguousLabelsToConnectedRegions/CMakeLists.txt b/src/Segmentation/ConnectedComponents/AssignContiguousLabelsToConnectedRegions/CMakeLists.txt index bc74206c4..621fd78d1 100644 --- a/src/Segmentation/ConnectedComponents/AssignContiguousLabelsToConnectedRegions/CMakeLists.txt +++ b/src/Segmentation/ConnectedComponents/AssignContiguousLabelsToConnectedRegions/CMakeLists.txt @@ -9,14 +9,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -28,12 +24,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS AssignContiguousLabelsToConnectedRegions - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS AssignContiguousLabelsToConnectedRegions + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Segmentation/ConnectedComponents/ExtraLargestConnectComponentFromBinaryImage/CMakeLists.txt b/src/Segmentation/ConnectedComponents/ExtraLargestConnectComponentFromBinaryImage/CMakeLists.txt index cc5ce3f97..e31f20a17 100644 --- a/src/Segmentation/ConnectedComponents/ExtraLargestConnectComponentFromBinaryImage/CMakeLists.txt +++ b/src/Segmentation/ConnectedComponents/ExtraLargestConnectComponentFromBinaryImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -31,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS ExtraLargestConnectComponentFromBinaryImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS ExtraLargestConnectComponentFromBinaryImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Segmentation/ConnectedComponents/LabelConnectComponentsInGrayscaleImage/CMakeLists.txt b/src/Segmentation/ConnectedComponents/LabelConnectComponentsInGrayscaleImage/CMakeLists.txt index c22f3553b..151ecd177 100644 --- a/src/Segmentation/ConnectedComponents/LabelConnectComponentsInGrayscaleImage/CMakeLists.txt +++ b/src/Segmentation/ConnectedComponents/LabelConnectComponentsInGrayscaleImage/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -31,12 +27,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS LabelConnectComponentsInGrayscaleImage - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS LabelConnectComponentsInGrayscaleImage + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Segmentation/RegionGrowing/ConnectedComponentsInImage/Code.cxx b/src/Segmentation/RegionGrowing/ConnectedComponentsInImage/Code.cxx index ec9c8cd50..da803a966 100644 --- a/src/Segmentation/RegionGrowing/ConnectedComponentsInImage/Code.cxx +++ b/src/Segmentation/RegionGrowing/ConnectedComponentsInImage/Code.cxx @@ -72,24 +72,16 @@ main(int argc, char * argv[]) connector2->SetInput(image); vtkSmartPointer actor2 = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - actor2->SetInput(connector->GetOutput()); -#else connector2->Update(); actor2->GetMapper()->SetInputData(connector2->GetOutput()); -#endif // Visualize joined image auto addConnector = ConnectorType::New(); addConnector->SetInput(connectedThreshold->GetOutput()); vtkSmartPointer addActor = vtkSmartPointer::New(); -#if VTK_MAJOR_VERSION <= 5 - addActor->SetInput(connector->GetOutput()); -#else addConnector->Update(); addActor->GetMapper()->SetInputData(addConnector->GetOutput()); -#endif // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); @@ -136,7 +128,6 @@ main(int argc, char * argv[]) interactor->Start(); - return EXIT_SUCCESS; } diff --git a/src/Segmentation/RegionGrowing/SegmentPixelsWithSimilarStats/CMakeLists.txt b/src/Segmentation/RegionGrowing/SegmentPixelsWithSimilarStats/CMakeLists.txt index 4f39abab7..0ab7b6725 100644 --- a/src/Segmentation/RegionGrowing/SegmentPixelsWithSimilarStats/CMakeLists.txt +++ b/src/Segmentation/RegionGrowing/SegmentPixelsWithSimilarStats/CMakeLists.txt @@ -10,14 +10,10 @@ if(ENABLE_QUICKVIEW) VTK REQUIRED COMPONENTS - ${_vtk_prefix}RenderingCore - ${_vtk_prefix}RenderingGL2PSOpenGL2 + RenderingCore + RenderingGL2PSOpenGL2 ) - if(VTK_VERSION VERSION_LESS "8.90.0") - include(${VTK_USE_FILE}) - endif() - add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( ${PROJECT_NAME} @@ -29,12 +25,10 @@ if(ENABLE_QUICKVIEW) ${VTK_LIBRARIES} ) - if(NOT VTK_VERSION VERSION_LESS "8.90.0") - vtk_module_autoinit( - TARGETS SegmentPixelsWithSimilarStats - MODULES ${VTK_LIBRARIES} - ) - endif() + vtk_module_autoinit( + TARGETS SegmentPixelsWithSimilarStats + MODULES ${VTK_LIBRARIES} + ) else() add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries(