camitk_extension(COMPONENT_EXTENSION
                 DEFINES COMPILE_VTK_IMAGE_COMPONENT_API
                 HEADERS_TO_INSTALL  VtkImageComponent.h VtkImageComponentAPI.h
                 CEP_NAME SDK
                 DESCRIPTION "Support for most native vtk image file formats"
                 ENABLE_AUTO_TEST
                 AUTO_TEST_LEVEL 3 
                 # Note: FullHead.mhd is also provided, but as its orientation is not RAI, only test level 2 can succeed
                 # it is therefore excluded from the test files, althought provided as testdata
                 TEST_FILES brain.mha sinus.mhd
                 
                 # Uncomment next line to activate memory leak test (open/close the same file many times)                 
                 # ENABLE_INTEGRATION_TEST
)

# 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 "") 

# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_tests_requirement(TESTS component-vtkimage-level3-1
                               component-vtkimage-level3-2
                               REQUIRES "${VTK_VERSION} VERSION_EQUAL 7.1.1"
                               REASON "VTK version is not equals than 7.1.1
   The default test files are written using the currently supported version of VTK (VTK 7.1).
   This test will therefore fail when comparing the input to the output if another version of VTK is used.
   Although everything should work fine, the output diff will make this test unconditionnaly fail."
)