# 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 testrgba.nrrd truthcube.pml
                )
                
# 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 "") 

# "Box Volume Of Interest" action will always fail as it needs a widget to define the 
# voxels that define the ROI
# The following line will inverse the result of the test, and therefore transform 
# a fail to a pass
# This is needed until there is a way to automatically add input ROI without a widget
# and launch the action with this input from the test environment
if(NOT PACKAGING_NSIS AND BUILD_TESTING)
    set_tests_properties("action-cropvolume-LEVEL1-15" PROPERTIES WILL_FAIL true)
endif()
