<commit_before>mitk_check_module_dependencies(MODULES DiffusionCore MitkGraphAlgorithms
  MISSING_DEPENDENCIES_VAR _missing_deps)

if(NOT _missing_deps)
  set(lut_url http://mitk.org/download/data/FibertrackingLUT.tar.gz)
  set(lut_tarball ${CMAKE_CURRENT_BINARY_DIR}/FibertrackingLUT.tar.gz)
  message("Downloading FiberTracking LUT ${lut_url}...")
  file(DOWNLOAD ${lut_url} ${lut_tarball}
       EXPECTED_MD5 38ecb6d4a826c9ebb0f4965eb9aeee44
       TIMEOUT 20
       STATUS status
       SHOW_PROGRESS
      )

  list(GET status 0 status_code)
  list(GET status 1 status_msg)

  if(NOT status_code EQUAL 0)
    message(SEND_ERROR "${status_msg} (error code ${status_code})")
  else()
    message("done.")
  endif()

  file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources)
  message("Unpacking FiberTracking LUT tarball...")
  execute_process(COMMAND ${CMAKE_COMMAND} -E  tar xzf ../FibertrackingLUT.tar.gz
                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources
                  RESULT_VARIABLE result
                  ERROR_VARIABLE err_msg)
  if(result)
    message(SEND_ERROR "Unpacking FibertrackingLUT.tar.gz failed: ${err_msg}")
  else()
    message("done.")
  endif()
endif()

MITK_CREATE_MODULE(
  SUBPROJECTS MITK-DTI
  INCLUDE_DIRS Algorithms Algorithms/GibbsTracking Algorithms/StochasticTracking IODataStructures IODataStructures/FiberBundleX IODataStructures/PlanarFigureComposite Interactions SignalModels Rendering ${CMAKE_CURRENT_BINARY_DIR}
  DEPENDS MitkDiffusionCore MitkGraphAlgorithms
  PACKAGE_DEPENDS ITK|ITKFFT
  #WARNINGS_AS_ERRORS
)

if(MODULE_IS_ENABLED)
  add_subdirectory(Testing)
endif()
<commit_msg>COMP: Properly check for enabled FiberTracking module.<commit_after>MITK_CREATE_MODULE(
  SUBPROJECTS MITK-DTI
  INCLUDE_DIRS Algorithms Algorithms/GibbsTracking Algorithms/StochasticTracking IODataStructures IODataStructures/FiberBundleX IODataStructures/PlanarFigureComposite Interactions SignalModels Rendering ${CMAKE_CURRENT_BINARY_DIR}
  DEPENDS MitkDiffusionCore MitkGraphAlgorithms
  PACKAGE_DEPENDS ITK|ITKFFT
  #WARNINGS_AS_ERRORS
)

if(MODULE_IS_ENABLED)

  set(lut_url http://mitk.org/download/data/FibertrackingLUT.tar.gz)
  set(lut_tarball ${CMAKE_CURRENT_BINARY_DIR}/FibertrackingLUT.tar.gz)
  message("Downloading FiberTracking LUT ${lut_url}...")
  file(DOWNLOAD ${lut_url} ${lut_tarball}
       EXPECTED_MD5 38ecb6d4a826c9ebb0f4965eb9aeee44
       TIMEOUT 20
       STATUS status
       SHOW_PROGRESS
      )

  list(GET status 0 status_code)
  list(GET status 1 status_msg)

  if(NOT status_code EQUAL 0)
    message(SEND_ERROR "${status_msg} (error code ${status_code})")
  else()
    message("done.")
  endif()

  file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources)
  message("Unpacking FiberTracking LUT tarball...")
  execute_process(COMMAND ${CMAKE_COMMAND} -E  tar xzf ../FibertrackingLUT.tar.gz
                  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Resources
                  RESULT_VARIABLE result
                  ERROR_VARIABLE err_msg)
  if(result)
    message(SEND_ERROR "Unpacking FibertrackingLUT.tar.gz failed: ${err_msg}")
  else()
    message("done.")
  endif()

  add_subdirectory(Testing)
endif()

{'fraction_non_alphanumeric': 0.0859277708592777, 'fraction_numerical': 0.0136986301369863, 'mean_word_length': 4.6171328671328675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3103310', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1129, 'n_words': 190}