diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1439588c..1b310ace 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ env: -DVTK_MODULE_ENABLE_VTK_InteractionImage=YES -DVTK_MODULE_ENABLE_VTK_InteractionStyle=YES -DVTK_MODULE_ENABLE_VTK_IOGeometry=YES + -DVTK_MODULE_ENABLE_VTK_IOExport=YES -DVTK_MODULE_ENABLE_VTK_IOImage=YES -DVTK_MODULE_ENABLE_VTK_IOLegacy=YES -DVTK_MODULE_ENABLE_VTK_IOMovie=YES diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c2e3d31c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +CMakeSettings.json +.vs +_build* +_install* diff --git a/cmake/build_opt.cmake b/cmake/build_opt.cmake index 125c371a..ae1ab8b7 100644 --- a/cmake/build_opt.cmake +++ b/cmake/build_opt.cmake @@ -28,7 +28,7 @@ option(CLITK_BUILD_TOOLS "Build command-line tools" OFF) option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF) option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF) -option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON) +option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires QT and VTK with VTK_GROUP_ENABLE_Qt)" ON) if(CLITK_BUILD_VV) add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index df694f98..91a83125 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -43,7 +43,8 @@ include("${ITK_USE_FILE}") #========================================================= # Find VTK (required) -find_package(VTK 9.5 REQUIRED COMPONENTS +if(CLITK_BUILD_VV) + set(VTK_REQUIRED_COMPONENTS ChartsCore CommonCore CommonDataModel @@ -67,6 +68,7 @@ find_package(VTK 9.5 REQUIRED COMPONENTS InteractionStyle IOCore IOGeometry + IOExport IOImage IOLegacy IOMovie @@ -77,8 +79,45 @@ find_package(VTK 9.5 REQUIRED COMPONENTS RenderingCore RenderingLOD RenderingOpenGL2 - ViewsContext2D -) + ViewsContext2D) +else(CLITK_BUILD_VV) + set(VTK_REQUIRED_COMPONENTS + ChartsCore + CommonCore + CommonDataModel + CommonExecutionModel + CommonMath + CommonMisc + CommonTransforms + FiltersCore + FiltersGeneral + FiltersHybrid + FiltersModeling + FiltersSources + ImagingColor + ImagingCore + ImagingMath + ImagingMorphological + ImagingStatistics + ImagingStencil + InteractionImage + InteractionStyle + IOCore + IOGeometry + IOExport + IOImage + IOLegacy + IOMovie + IOXML + RenderingAnnotation + RenderingContext2D + RenderingContextOpenGL2 + RenderingCore + RenderingLOD + RenderingOpenGL2 + ViewsContext2D) +endif(CLITK_BUILD_VV) +find_package(VTK 9.5 REQUIRED COMPONENTS ${VTK_REQUIRED_COMPONENTS}) #======================================================== #========================================================= diff --git a/itk/clitkConditionalBinaryErodeImageFilter.h b/itk/clitkConditionalBinaryErodeImageFilter.h index 2c1eb3ec..3b79ccef 100644 --- a/itk/clitkConditionalBinaryErodeImageFilter.h +++ b/itk/clitkConditionalBinaryErodeImageFilter.h @@ -66,7 +66,7 @@ namespace clitk itkNewMacro(Self); // Run-time type information (and related methods) - itkTypeMacro(BinaryErodeImageFilter, BinaryMorphologyImageFilterr ); + itkTypeMacro(ConditionalBinaryErodeImageFilter, BinaryMorphologyImageFilterr ); /** Dimension of the domain space. */ itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension); diff --git a/itk/clitkReconstructThroughDilationImageFilter.h b/itk/clitkReconstructThroughDilationImageFilter.h index 4c7f5eb9..5f528b8f 100644 --- a/itk/clitkReconstructThroughDilationImageFilter.h +++ b/itk/clitkReconstructThroughDilationImageFilter.h @@ -87,7 +87,7 @@ namespace clitk void SetRadius(const int r) { for(uint i=0; i ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(VectorBSplineReconstructionImageFunction, + itkTypeMacro(VectorBSplineResampleImageFunctionWithLUT, VectorBSplineInterpolateImageFunctionWithLUT); /** New macro for creation of through a Smart Pointer */ diff --git a/segmentation/clitkExtractLungFilter.txx b/segmentation/clitkExtractLungFilter.txx index a0962c3b..7634dbab 100644 --- a/segmentation/clitkExtractLungFilter.txx +++ b/segmentation/clitkExtractLungFilter.txx @@ -618,10 +618,11 @@ SearchForTracheaSeed(int skip) bool is_orientation_superior(itk::SpatialOrientation::ValidCoordinateOrientationFlags orientation) { + const uint32_t value = static_cast(orientation); itk::SpatialOrientation::CoordinateTerms sup = itk::SpatialOrientation::ITK_COORDINATE_Superior; - bool primary = (orientation & 0x0000ff) == sup; - bool secondary = ((orientation & 0x00ff00) >> 8) == sup; - bool tertiary = ((orientation & 0xff0000) >> 16) == sup; + bool primary = (value & 0x0000ff) == static_cast (sup); + bool secondary = ((value & 0x00ff00) >> 8) == static_cast(sup); + bool tertiary = ((value & 0xff0000) >> 16) == static_cast(sup); return primary || secondary || tertiary; } diff --git a/segmentation/clitkMorphoMathFilter.h b/segmentation/clitkMorphoMathFilter.h index a6340067..c1247ad0 100644 --- a/segmentation/clitkMorphoMathFilter.h +++ b/segmentation/clitkMorphoMathFilter.h @@ -54,7 +54,7 @@ namespace clitk { itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(AddRelativePositionConstraintToLabelImageFilter, ImageToImageFilter); + itkTypeMacro(MorphoMathFilter, ImageToImageFilter); FILTERBASE_INIT; /** Some convenient typedefs. */ diff --git a/tools/clitk4DImageToNVectorImageGenericFilter.h b/tools/clitk4DImageToNVectorImageGenericFilter.h index 2823cb74..f6a36388 100644 --- a/tools/clitk4DImageToNVectorImageGenericFilter.h +++ b/tools/clitk4DImageToNVectorImageGenericFilter.h @@ -56,7 +56,7 @@ namespace clitk itkNewMacro(Self); // Run-time type information (and related methods) - itkTypeMacro( 4DImageToNVectorImageGenericFilter, LightObject ); + itkTypeMacro( FourDImageToNVectorImageGenericFilter, LightObject ); //---------------------------------------- diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 55077d68..2c75a01d 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -113,7 +113,7 @@ set(vv_SRCS # ========================================================= # Qt related commands -find_package(Qt6 REQUIRED COMPONENTS Widgets Network) +find_package(Qt6 REQUIRED COMPONENTS Widgets OpenGL OpenGLWidgets Network) qt_wrap_cpp(vv_SRCS vvMainWindowBase.h @@ -261,7 +261,7 @@ if(APPLE) endif() #========================================================= #Create binary and libs for tests -set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} Qt6::Widgets Qt6::Network ${APPLE_FRAMEWORKS}) +set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} Qt6::Widgets Qt6::OpenGL Qt6::OpenGLWidgets Qt6::Network VTK::GUISupportQt ${APPLE_FRAMEWORKS}) #----------------------------------------------------------------------------- # For retina displays, see @@ -277,7 +277,9 @@ if(WIN32) add_executable(vv WIN32 vv.cxx vvIcon.rc) elseif(APPLE) add_executable(vv MACOSX_BUNDLE vv.cxx) - set_target_properties(vv PROPERTIES INSTALL_RPATH "@rpath:@rpath/../lib") + set_target_properties(vv PROPERTIES + MACOSX_BUNDLE_GUI_IDENTIFIER "fr.insa-lyon.creatis.vv" + INSTALL_RPATH "@rpath:@rpath/../lib") else() add_executable(vv vv.cxx) set_target_properties(vv PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../lib") @@ -293,16 +295,16 @@ target_link_libraries(vv vvLib) # Install options (also used by CPack) install(TARGETS vv DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -get_target_property(QT_INSTALL_PREFIX Qt6::Core LOCATION) -configure_file("${CMAKE_SOURCE_DIR}/cmake/deploy.cmake.in" - "${CMAKE_BINARY_DIR}/cmake/deploy.cmake" - @ONLY -) -file(GENERATE - OUTPUT "${CMAKE_BINARY_DIR}/cmake/deploy-$.cmake" - INPUT "${CMAKE_BINARY_DIR}/cmake/deploy.cmake" -) -install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/deploy-$.cmake") +#get_target_property(QT_INSTALL_PREFIX Qt6::Core LOCATION) +#configure_file("${CMAKE_SOURCE_DIR}/cmake/deploy.cmake.in" +# "${CMAKE_BINARY_DIR}/cmake/deploy.cmake" +# @ONLY +#) +#file(GENERATE +# OUTPUT "${CMAKE_BINARY_DIR}/cmake/deploy-$.cmake" +# INPUT "${CMAKE_BINARY_DIR}/cmake/deploy.cmake" +#) +#install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/deploy-$.cmake") #=========================================================