Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
CMakeSettings.json
.vs
_build*
_install*
2 changes: 1 addition & 1 deletion cmake/build_opt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
45 changes: 42 additions & 3 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -67,6 +68,7 @@ find_package(VTK 9.5 REQUIRED COMPONENTS
InteractionStyle
IOCore
IOGeometry
IOExport
IOImage
IOLegacy
IOMovie
Expand All @@ -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})
#========================================================

#=========================================================
Expand Down
2 changes: 1 addition & 1 deletion itk/clitkConditionalBinaryErodeImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion itk/clitkReconstructThroughDilationImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace clitk
void SetRadius(const int r) { for(uint i=0; i<InputImageDimension; i++) m_Radius[i] = r; SetRadius(m_Radius); }
SizeType GetRadius(void){return m_Radius;}
itkSetMacro( ErosionPaddingValue, OutputPixelType);
itkGetConstMacro( ErosionPaddingValue, OutputPixelType)
itkGetConstMacro( ErosionPaddingValue, OutputPixelType);
itkSetMacro( MaximumNumberOfLabels, unsigned int);
itkGetConstMacro( MaximumNumberOfLabels, unsigned int);
itkSetMacro( BackgroundValue, InternalPixelType);
Expand Down
2 changes: 1 addition & 1 deletion itk/clitkVectorBSplineResampleImageFunctionWithLUT.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ITK_EXPORT VectorBSplineResampleImageFunctionWithLUT :
typedef itk::SmartPointer<const Self> ConstPointer;

/** Run-time type information (and related methods). */
itkTypeMacro(VectorBSplineReconstructionImageFunction,
itkTypeMacro(VectorBSplineResampleImageFunctionWithLUT,
VectorBSplineInterpolateImageFunctionWithLUT);

/** New macro for creation of through a Smart Pointer */
Expand Down
7 changes: 4 additions & 3 deletions segmentation/clitkExtractLungFilter.txx
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,11 @@ SearchForTracheaSeed(int skip)

bool is_orientation_superior(itk::SpatialOrientation::ValidCoordinateOrientationFlags orientation)
{
const uint32_t value = static_cast<uint32_t>(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<uint32_t> (sup);
bool secondary = ((value & 0x00ff00) >> 8) == static_cast<uint32_t>(sup);
bool tertiary = ((value & 0xff0000) >> 16) == static_cast<uint32_t>(sup);
return primary || secondary || tertiary;
}

Expand Down
2 changes: 1 addition & 1 deletion segmentation/clitkMorphoMathFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion tools/clitk4DImageToNVectorImageGenericFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace clitk
itkNewMacro(Self);

// Run-time type information (and related methods)
itkTypeMacro( 4DImageToNVectorImageGenericFilter, LightObject );
itkTypeMacro( FourDImageToNVectorImageGenericFilter, LightObject );


//----------------------------------------
Expand Down
28 changes: 15 additions & 13 deletions vv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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")
Expand All @@ -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-$<CONFIG>.cmake"
INPUT "${CMAKE_BINARY_DIR}/cmake/deploy.cmake"
)
install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/deploy-$<CONFIG>.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-$<CONFIG>.cmake"
# INPUT "${CMAKE_BINARY_DIR}/cmake/deploy.cmake"
#)
#install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/deploy-$<CONFIG>.cmake")

#=========================================================

Expand Down