Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ cmake_minimum_required(VERSION 3.22.1)

project(ConvertAnRGBitkImageTovtkImageData)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
)
itk_generate_factory_registration()

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
ITK::ITKVtkGlueModule
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import itk
import argparse

from distutils.version import StrictVersion

if StrictVersion(itk.Version.GetITKVersion()) < StrictVersion("5.2.0"):
if tuple(int(v) for v in itk.Version.GetITKVersion().split(".")) < (5, 2, 0):
print("ITK 5.2.0 is required.")
sys.exit(1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ cmake_minimum_required(VERSION 3.22.1)

project(ConvertAnitkImageTovtkImageData)

find_package(ITK REQUIRED)
find_package(ITK REQUIRED COMPONENTS ITKImageIO)
itk_generate_factory_registration()

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKVtkGlueModule
)
Expand Down
4 changes: 1 addition & 3 deletions src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import itk
import argparse

from distutils.version import StrictVersion

if StrictVersion(itk.Version.GetITKVersion()) < StrictVersion("5.2.0"):
if tuple(int(v) for v in itk.Version.GetITKVersion().split(".")) < (5, 2, 0):
print("ITK 5.2.0 is required.")
sys.exit(1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.22.1)

project(ConvertRGBvtkImageDataToAnitkImage)

find_package(ITK REQUIRED)
find_package(ITK REQUIRED COMPONENTS ITKCommon)

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
ITK::ITKCommonModule
${ITK_INTERFACE_LIBRARIES}
ITK::ITKVtkGlueModule
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1)

project(ConvertvtkImageDataToAnitkImage)

find_package(ITK REQUIRED)
find_package(ITK REQUIRED COMPONENTS)

# Since we use vtkImageMagnitude
find_package(VTK REQUIRED COMPONENTS ImagingMath)
Expand All @@ -14,6 +14,7 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKVtkGlueModule
${VTK_LIBRARIES}
)
Expand Down
4 changes: 2 additions & 2 deletions src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1)

project(VTKImageToITKImage)

find_package(ITK REQUIRED)
find_package(ITK REQUIRED COMPONENTS ITKCommon)

find_package(VTK REQUIRED)
set(_vtk_prefix "")
Expand All @@ -26,7 +26,7 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
ITK::ITKCommonModule
${ITK_INTERFACE_LIBRARIES}
ITK::ITKVtkGlueModule
${VTK_LIBRARIES}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeEvolvingDense2DLevelSetAsElevationMap)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
ITKLevelSetsv4
)
itk_generate_factory_registration()

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
ITK::ITKLevelSetsv4Module
)

install(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeEvolvingDense2DLevelSetZeroSet)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
ITKLevelSetsv4
)
itk_generate_factory_registration()

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
ITK::ITKLevelSetsv4Module
)

install(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeStaticDense2DLevelSetAsElevationMap)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
ITKImageIntensity
ITKLevelSetsv4
ITKThresholding
)
itk_generate_factory_registration()

find_package(VTK REQUIRED)
Expand All @@ -26,11 +35,8 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
ITK::ITKImageIntensityModule
ITK::ITKLevelSetsv4Module
ITK::ITKThresholdingModule
${VTK_LIBRARIES}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeStaticDense2DLevelSetZeroSet)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
ITKImageIntensity
ITKLevelSetsv4
ITKThresholding
)
itk_generate_factory_registration()

find_package(VTK REQUIRED)
Expand All @@ -25,11 +34,8 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
ITK::ITKImageIntensityModule
ITK::ITKLevelSetsv4Module
ITK::ITKThresholdingModule
${VTK_LIBRARIES}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeStaticMalcolm2DLevelSetLayers)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKImageIntensity
ITKLevelSetsv4
ITKThresholding
)
itk_generate_factory_registration()

find_package(VTK REQUIRED)
Expand All @@ -25,10 +33,8 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKImageIntensityModule
ITK::ITKLevelSetsv4Module
ITK::ITKThresholdingModule
${VTK_LIBRARIES}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeStaticShi2DLevelSetLayers)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKImageIntensity
ITKLevelSetsv4
ITKThresholding
)
itk_generate_factory_registration()

find_package(VTK REQUIRED)
Expand All @@ -25,10 +33,8 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKImageIntensityModule
ITK::ITKLevelSetsv4Module
ITK::ITKThresholdingModule
${VTK_LIBRARIES}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ cmake_minimum_required(VERSION 3.22.1)

project(VisualizeStaticWhitaker2DLevelSetLayers)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKImageIntensity
ITKLevelSetsv4
ITKThresholding
)
itk_generate_factory_registration()

find_package(VTK REQUIRED)
Expand All @@ -25,10 +33,8 @@ add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKImageIntensityModule
ITK::ITKLevelSetsv4Module
ITK::ITKThresholdingModule
${VTK_LIBRARIES}
)

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(itk-module)
return()
endif()
endif()
find_package(ITK 5.2.0 REQUIRED)
find_package(ITK 6 REQUIRED)

# To avoid linker issues.
# Module_ITKVtkGlue is true when building inside ITK
Expand Down
10 changes: 8 additions & 2 deletions src/Core/Common/AddNoiseToBinaryImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ cmake_minimum_required(VERSION 3.22.1)

project(AddNoiseToBinaryImage)

find_package(ITK REQUIRED)
find_package(
ITK
REQUIRED
COMPONENTS
ITKImageIO
ITKCommon
)

itk_generate_factory_registration()

add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(
${PROJECT_NAME}
PRIVATE
${ITK_INTERFACE_LIBRARIES}
ITK::ITKImageIO
ITK::ITKCommonModule
)

install(
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Common/AddOffsetToIndex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.22.1)

project(AddOffsetToIndex)

find_package(ITK REQUIRED)
find_package(ITK REQUIRED COMPONENTS ITKCommon)

add_executable(
${PROJECT_NAME}
Code.cxx
Code.py
)
target_link_libraries(${PROJECT_NAME} PRIVATE ITK::ITKCommonModule)
target_link_libraries(${PROJECT_NAME} PRIVATE ${ITK_INTERFACE_LIBRARIES})

install(
TARGETS
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Common/AddOffsetToIndex/Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
import sys
import itk

from distutils.version import StrictVersion as VS

if VS(itk.Version.GetITKVersion()) < VS("4.9.0"):
if tuple(int(v) for v in itk.Version.GetITKVersion().split(".")) < (4, 9, 0):
print("ITK 4.9.0 is required.")
sys.exit(1)

Expand Down
Loading
Loading