Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
25 changes: 8 additions & 17 deletions src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
17 changes: 6 additions & 11 deletions src/Core/Common/DisplayImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
23 changes: 7 additions & 16 deletions src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/Core/Common/FindMaxAndMinInImage/Code.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <itkImageToVTKImageFilter.h>

#include "vtkVersion.h"
#include "vtkImageViewer.h"
#include "vtkImageMapper3D.h"
#include "vtkRenderWindowInteractor.h"
Expand Down Expand Up @@ -61,12 +60,8 @@ main(int argc, char * argv[])
originalConnector->SetInput(input);

vtkSmartPointer<vtkImageActor> originalActor = vtkSmartPointer<vtkImageActor>::New();
#if VTK_MAJOR_VERSION <= 5
originalActor->SetInput(originalConnector->GetOutput());
#else
originalConnector->Update();
originalActor->GetMapper()->SetInputData(originalConnector->GetOutput());
#endif

vtkSmartPointer<vtkSphereSource> minimumSphereSource = vtkSmartPointer<vtkSphereSource>::New();
ImageType::IndexType minimumLocation = imageCalculatorFilter->GetIndexOfMinimum();
Expand All @@ -90,7 +85,6 @@ main(int argc, char * argv[])
maximumActor->SetMapper(maximumMapper);
maximumActor->GetProperty()->SetColor(1, 0, 0);


// Visualize
vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();

Expand Down
23 changes: 7 additions & 16 deletions src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/Core/Common/InPlaceFilterOfImage/Code.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include <itkImageToVTKImageFilter.h>

#include "vtkVersion.h"

#include "vtkSmartPointer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
Expand Down Expand Up @@ -56,12 +54,8 @@ main(int argc, char * argv[])
connector->SetInput(image);

vtkSmartPointer<vtkImageActor> actor = vtkSmartPointer<vtkImageActor>::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<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
Expand Down
17 changes: 6 additions & 11 deletions src/Core/Common/IterateLineThroughImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
23 changes: 7 additions & 16 deletions src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
Loading
Loading