Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 8e19f616 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

FIXED much better test + segfault fixes + complete suffix handling

Add more (pertinent) test everytime it is possible.
Fixing bugs as they are unveiled by the new tests
parent 64e96d7c
......@@ -9,18 +9,18 @@ if (WIN32)
endif()
endif()
camitk_extension( ACTION_EXTENSION
NEEDS_ITK
CXX_FLAGS "-w"
CEP_NAME CEP_IMAGING
DESCRIPTION "This action features basic ITK image processing filters"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
DEFINES COMPILE_ITKFILTER_API
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img brain.mha diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
camitk_extension(ACTION_EXTENSION
NEEDS_ITK
CXX_FLAGS "-w"
CEP_NAME CEP_IMAGING
DESCRIPTION "This action features basic ITK image processing filters"
DEFINES COMPILE_ITKFILTER_API
AUTO_TEST
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
# TODO fix this (good example of exception handling coming from itk!)
if(NOT PACKAGING_NSIS AND BUILD_TESTING)
set_tests_properties("action-itkfilters-level1-27" PROPERTIES WILL_FAIL true)
# set_tests_properties("action-itkfilters-level1-27" PROPERTIES WILL_FAIL true)
endif()
......@@ -4,6 +4,6 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME CEP_IMAGING
CXX_FLAGS "-w"
DESCRIPTION "This action features basic ITK image processing segmentation algorithms"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
AUTO_TEST
TEST_FILES Mesh.off BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
camitk_extension( COMPONENT_EXTENSION
NEEDS_GDCM
CEP_NAME CEP_IMAGING
DESCRIPTION "This allows one to read a single DICOM image file (.dcm) using the library GDCM 2.2.x"
TEST_APPLICATION ${APPLICATION_TEST_COMPONENT}
INSTALL_ALL_HEADERS
camitk_extension(COMPONENT_EXTENSION
NEEDS_GDCM
CEP_NAME CEP_IMAGING
DESCRIPTION "This allows one to read a single DICOM image file (.dcm) using the library GDCM 2.2.x"
INSTALL_ALL_HEADERS
AUTO_TEST
)
# itkimage component just needs to use the component_extension macro
camitk_extension( COMPONENT_EXTENSION
NEEDS_ITK
CEP_NAME CEP_IMAGING
CXX_FLAGS "-w"
DEFINES _SCL_SECURE_NO_WARNINGS # to remove Windows MSVC warnings
DESCRIPTION "This component allows CamiTK to handle basic ITK format images."
TEST_APPLICATION ${APPLICATION_TEST_COMPONENT}
camitk_extension(COMPONENT_EXTENSION
NEEDS_ITK
CEP_NAME CEP_IMAGING
CXX_FLAGS "-w"
DEFINES _SCL_SECURE_NO_WARNINGS # to remove Windows MSVC warnings
DESCRIPTION "This component allows CamiTK to handle basic ITK format images."
AUTO_TEST
)
# TODO: these two tests generates ITK exceptions, consider fail as passed until this is taken care of in the save() method
......
......@@ -4,5 +4,5 @@ camitk_extension(ACTION_EXTENSION
NEEDS_COMPONENT_EXTENSION pmlcomponent mmlcomponent vtkmesh msh
CEP_NAME CEP_MODELING
DESCRIPTION "Action MML features algorithms applicable on MML components."
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
)
\ No newline at end of file
# no auto test possible: mml needs a simulator
)
# Call CamiTK CMake Macro to define the action
camitk_extension( ACTION_EXTENSION
NEEDS_COMPONENT_EXTENSION pmlcomponent
NEEDS_CEP_LIBRARIES pml pmlschema
NEEDS_XSD
CEP_NAME CEP_MODELING
DESCRIPTION "Feature PML actions which aims at displaying and manipulating structural information about a PML component."
)
camitk_extension(ACTION_EXTENSION
NEEDS_COMPONENT_EXTENSION pmlcomponent
NEEDS_CEP_LIBRARIES pml pmlschema
NEEDS_XSD
CEP_NAME CEP_MODELING
DESCRIPTION "Feature PML actions which aims at displaying and manipulating structural information about a PML component."
AUTO_TEST
TEST_FILES
TEST_FILES Mesh.off BigEndian.hdr diaphragm.pml truthcube.pml
)
......@@ -7,9 +7,17 @@ add_executable(${LMLTEST_TARGET_NAME} ${SRCS})
target_link_libraries(${LMLTEST_TARGET_NAME} ${LML_DEPENDENCIES}) # both lml and lmlschema are needed
add_dependencies(${LMLTEST_TARGET_NAME} ${LML_DEPENDENCY}) # as lml depends on lmlschema, only lml needed here
# in debug mode, add postfix
# set output name property for test macro to work
if (MSVC)
set_target_properties(${LMLTEST_TARGET_NAME} PROPERTIES DEBUG_POSTFIX ${CAMITK_DEBUG_POSTFIX})
# in debug mode, add postfix
set_target_properties(${LMLTEST_TARGET_NAME}
PROPERTIES OUTPUT_NAME camitk-lmltest
DEBUG_POSTFIX ${CAMITK_DEBUG_POSTFIX}
)
else()
set_target_properties(${LMLTEST_TARGET_NAME}
PROPERTIES OUTPUT_NAME camitk-lmltest
)
endif()
#----------
......
......@@ -11,11 +11,18 @@ add_dependencies(${PMLTEST_TARGET_NAME} ${PML_DEPENDENCY}) # as pml depends on p
find_package(XSD REQUIRED)
include_directories(${XSD_INCLUDE_DIR})
# in debug mode, add postfix
# set output name property for test macro to work
if (MSVC)
set_target_properties(${PMLTEST_TARGET_NAME} PROPERTIES DEBUG_POSTFIX ${CAMITK_DEBUG_POSTFIX})
# in debug mode, add postfix
set_target_properties(${PMLTEST_TARGET_NAME}
PROPERTIES OUTPUT_NAME camitk-pmltest
DEBUG_POSTFIX ${CAMITK_DEBUG_POSTFIX}
)
else()
set_target_properties(${PMLTEST_TARGET_NAME}
PROPERTIES OUTPUT_NAME camitk-pmltest
)
endif()
#----------
# Testing
#----------
......
......@@ -4,21 +4,21 @@ if(COMPONENT_MML)
add_definitions(-DMML_GENERATE_GUI)
endif()
camitk_extension( COMPONENT_EXTENSION
DEFINES COMPILE_MMLCOMPONENT_API
NEEDS_XSD
NEEDS_CEP_LIBRARIES pml pmlschema lml lmlschema monitoring monitoringgui mmlschema
NEEDS_COMPONENT_EXTENSION pmlcomponent vtkmesh
HEADERS_TO_INSTALL MMLComponentExtension.h
MMLComponent.h
MMLDisplay.h
MMLMonitorDisplay.h
MMLMonitorDisplayFactory.h
MMLMonitorDisplays/Colors.h
MMLMonitorDisplays/Arrows.h
MMLMonitorDisplays/Tabular.h
MMLComponentAPI.h
CEP_NAME CEP_MODELING
DESCRIPTION "Component MML allows one to handle XML file that compare biomechanical simulations with different simulators"
TEST_APPLICATION ${APPLICATION_TEST_COMPONENT}
camitk_extension(COMPONENT_EXTENSION
DEFINES COMPILE_MMLCOMPONENT_API
NEEDS_XSD
NEEDS_CEP_LIBRARIES pml pmlschema lml lmlschema monitoring monitoringgui mmlschema
NEEDS_COMPONENT_EXTENSION pmlcomponent vtkmesh
HEADERS_TO_INSTALL MMLComponentExtension.h
MMLComponent.h
MMLDisplay.h
MMLMonitorDisplay.h
MMLMonitorDisplayFactory.h
MMLMonitorDisplays/Colors.h
MMLMonitorDisplays/Arrows.h
MMLMonitorDisplays/Tabular.h
MMLComponentAPI.h
CEP_NAME CEP_MODELING
DESCRIPTION "Component MML allows one to handle XML file that compare biomechanical simulations with different simulators"
# No auto test possible in mml without any simulator plugins
)
camitk_extension( COMPONENT_EXTENSION
NEEDS_CEP_LIBRARIES pml pmlschema
NEEDS_XSD
INSTALL_ALL_HEADERS
CEP_NAME CEP_MODELING
DESCRIPTION "CamiTK component to manage a physical model."
TEST_APPLICATION ${APPLICATION_TEST_COMPONENT}
DEFINES COMPILE_PML_COMPONENT_API
camitk_extension(COMPONENT_EXTENSION
NEEDS_CEP_LIBRARIES pml pmlschema
NEEDS_XSD
INSTALL_ALL_HEADERS
CEP_NAME CEP_MODELING
DESCRIPTION "CamiTK component to manage a physical model."
DEFINES COMPILE_PML_COMPONENT_API
AUTO_TEST
TEST_FILES diaphragm.pml truthcube.pml
)
......@@ -56,4 +56,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libraries/core/CamiTKVersion.h.in ${C
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "Welcome to ${CAMITK_VERSION_STRING} SDK compilation")
\ No newline at end of file
message(STATUS "Welcome to ${CAMITK_VERSION_STRING} SDK compilation")
camitk_extension( ACTION_EXTENSION
DEFINES COMPILE_APPLICATION_ACTION_API
CEP_NAME SDK
DESCRIPTION "Features actions used at aplication level (these actions are mandatory for any CamiTK appliction to work)"
)
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_APPLICATION_ACTION_API
CEP_NAME SDK
DESCRIPTION "Features actions used at aplication level (these actions are mandatory for any CamiTK appliction to work)"
)
if(NOT ACTION_APPLICATION)
message(FATAL_ERROR "ACTION_APPLICATION cannot be set to OFF, it is mandatory for any CamiTK applications")
endif()
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
# Call CamiTK CMake Macro to define the action
camitk_extension(ACTION_EXTENSION
DESCRIPTION "Manipulating Frames in one
didactic action."
DESCRIPTION "Manipulating Frames."
AUTO_TEST
TEST_FILES brain.mha structured.vtk
)
# Call CamiTK CMake Macro to define the action
camitk_extension( ACTION_EXTENSION
DEFINES COMPILE_BOXVOI_API
NEEDS_ACTION_EXTENSION multipicking
CEP_NAME SDK
DESCRIPTION "Helps you to crop a volume to keep only an interesting subsample"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_BOXVOI_API
NEEDS_ACTION_EXTENSION multipicking
CEP_NAME SDK
DESCRIPTION "Helps you to crop a volume to keep only an interesting subsample"
AUTO_TEST
TEST_FILES Mesh.off BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
camitk_extension( ACTION_EXTENSION
DEFINES COMPILE_LUT_ACTION_API
CEP_NAME SDK
DESCRIPTION "Displays the image look-up-table (lut)"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_LUT_ACTION_API
CEP_NAME SDK
DESCRIPTION "Displays the image look-up-table (lut)"
AUTO_TEST
TEST_FILES scissors.obj BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
# Call CamiTK CMake Macro to define the action
camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Re-sample image volumes"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
camitk_extension(ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Re-sample image volumes"
AUTO_TEST
TEST_FILES liver-smooth.obj BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
camitk_extension( ACTION_EXTENSION
DEFINES COMPILE_MULTIPICKING_ACTION_API
INSTALL_ALL_HEADERS
CEP_NAME SDK
DESCRIPTION "Action-multipicking allows one to make several pixel picking on an image component (volumic image)"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_MULTIPICKING_ACTION_API
INSTALL_ALL_HEADERS
CEP_NAME SDK
DESCRIPTION "Action-multipicking allows one to make several pixel picking on an image component (volumic image)"
AUTO_TEST
TEST_FILES structured.vtk BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
# Call CamiTK CMake Macro to define the action
camitk_extension( ACTION_EXTENSION
DEFINES COMPILE_PIXELCOLORCHANGER_ACTION_API
CEP_NAME SDK
DESCRIPTION "Allows changing the color of the image pixels"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
camitk_extension(ACTION_EXTENSION
DEFINES COMPILE_PIXELCOLORCHANGER_ACTION_API
CEP_NAME SDK
DESCRIPTION "Allows changing the color of the image pixels"
AUTO_TEST
TEST_FILES mixed_3D_beam.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd ramp1.gipl
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment