<commit_before># - find DCMTK libraries and applications
#

#  DCMTK_INCLUDE_DIR   - Directories to include to use DCMTK
#  DCMTK_LIBRARIES     - Files to link against to use DCMTK
#  DCMTK_FOUND         - If false, don't try to use DCMTK
#  DCMTK_DIR           - (optional) Source directory for DCMTK
#
# DCMTK_DIR can be used to make it simpler to find the various include
# directories and compiled libraries if you've just compiled it in the
# source tree. Just set it to the root of the tree where you extracted
# the source (default to /usr/include/dcmtk/)

#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
# Copyright 2009 <NAME> <<EMAIL>>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
#  License text for the above reference.)

#
# Written for VXL by <NAME>.
# Upgraded for GDCM by <NAME>.
# 

IF( NOT DCMTK_FOUND )
  SET( DCMTK_DIR "/usr/include/dcmtk/"
    CACHE PATH "Root of DCMTK source tree (optional)." )
  MARK_AS_ADVANCED( DCMTK_DIR )
ENDIF( NOT DCMTK_FOUND )

FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
  ${DCMTK_DIR}/config/include
  ${DCMTK_DIR}/config
  ${DCMTK_DIR}/include/dcmtk/config
  ${DCMTK_DIR}/include
)

FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
  ${DCMTK_DIR}/ofstd/include
  ${DCMTK_DIR}/ofstd
  ${DCMTK_DIR}/include/ofstd
  ${DCMTK_DIR}/include/dcmtk/ofstd
)

FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
  ${DCMTK_DIR}/ofstd/libsrc
  ${DCMTK_DIR}/ofstd/libsrc/Release
  ${DCMTK_DIR}/ofstd/libsrc/Debug
  ${DCMTK_DIR}/ofstd/Release
  ${DCMTK_DIR}/ofstd/Debug
  ${DCMTK_DIR}/lib
)

FIND_LIBRARY( DCMTK_oflog_LIBRARY oflog
  ${DCMTK_DIR}/oflog/libsrc
  ${DCMTK_DIR}/oflog/libsrc/Release
  ${DCMTK_DIR}/oflog/libsrc/Debug
  ${DCMTK_DIR}/oflog/Release
  ${DCMTK_DIR}/oflog/Debug
  ${DCMTK_DIR}/lib
)

FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
  ${DCMTK_DIR}/include/dcmdata
  ${DCMTK_DIR}/include/dcmtk/dcmdata
  ${DCMTK_DIR}/dcmdata
  ${DCMTK_DIR}/dcmdata/include
)

FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
  ${DCMTK_DIR}/dcmdata/libsrc
  ${DCMTK_DIR}/dcmdata/libsrc/Release
  ${DCMTK_DIR}/dcmdata/libsrc/Debug
  ${DCMTK_DIR}/dcmdata/Release
  ${DCMTK_DIR}/dcmdata/Debug
  ${DCMTK_DIR}/lib
)

FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
  ${DCMTK_DIR}/dcmimgle/include
  ${DCMTK_DIR}/dcmimgle
  ${DCMTK_DIR}/include/dcmimgle
  ${DCMTK_DIR}/include/dcmtk/dcmimgle
)

FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
  ${DCMTK_DIR}/dcmimgle/libsrc
  ${DCMTK_DIR}/dcmimgle/libsrc/Release
  ${DCMTK_DIR}/dcmimgle/libsrc/Debug
  ${DCMTK_DIR}/dcmimgle/Release
  ${DCMTK_DIR}/dcmimgle/Debug
  ${DCMTK_DIR}/lib
)

# MM: I could not find this library on debian system / dcmtk 3.5.4
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb 
  ${DCMTK_DIR}/imagectn/libsrc/Release
  ${DCMTK_DIR}/imagectn/libsrc/
  ${DCMTK_DIR}/imagectn/libsrc/Debug
  )

FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet 
  ${DCMTK_DIR}/dcmnet/libsrc/Release
  ${DCMTK_DIR}/dcmnet/libsrc/Debug
  ${DCMTK_DIR}/dcmnet/libsrc/
  )

IF( DCMTK_config_INCLUDE_DIR 
    AND DCMTK_ofstd_INCLUDE_DIR 
    AND DCMTK_ofstd_LIBRARY
    AND DCMTK_oflog_LIBRARY
    AND DCMTK_dcmdata_INCLUDE_DIR
    AND DCMTK_dcmdata_LIBRARY
    AND DCMTK_dcmimgle_INCLUDE_DIR
    AND DCMTK_dcmimgle_LIBRARY )

#   # Wrap library is required on Linux
#   IF(NOT WIN32)
#     FIND_LIBRARY(DCMTK_wrap_LIBRARY wrap)
#     MESSAGE(DCMTK_wrap_LIBRARY:${DCMTK_wrap_LIBRARY})
#     IF(NOT DCMTK_wrap_LIBRARY)
#       MESSAGE(FATAL_ERROR "error: Wrap library is required to use DCMTK. "
#                           "On Ubuntu, you could install it using 'sudo apt-get libwrap0'")
#     ENDIF()
#   ENDIF()
  
  SET( DCMTK_FOUND "YES" )
  SET( DCMTK_INCLUDE_DIR
    ${DCMTK_DIR}/include
    ${DCMTK_config_INCLUDE_DIR}
    ${DCMTK_ofstd_INCLUDE_DIR}
    ${DCMTK_dcmdata_INCLUDE_DIR}
    ${DCMTK_dcmimgle_INCLUDE_DIR}
  )

  SET( DCMTK_LIBRARIES
    ${DCMTK_dcmimgle_LIBRARY}
    ${DCMTK_dcmdata_LIBRARY}
    ${DCMTK_ofstd_LIBRARY}
    ${DCMTK_oflog_LIBRARY}
    ${DCMTK_config_LIBRARY}
  )

  IF(DCMTK_imagedb_LIBRARY)
   SET( DCMTK_LIBRARIES
   ${DCMTK_LIBRARIES}
   ${DCMTK_imagedb_LIBRARY}
   )
  ENDIF(DCMTK_imagedb_LIBRARY)

  IF(DCMTK_dcmnet_LIBRARY)
   SET( DCMTK_LIBRARIES
   ${DCMTK_LIBRARIES}
   ${DCMTK_dcmnet_LIBRARY}
   )
  ENDIF(DCMTK_dcmnet_LIBRARY)

  IF( WIN32 )
    SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ws2_32 netapi32 wsock32)
  ENDIF( WIN32 )
  
#   IF (NOT WIN32)
#     SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ${DCMTK_wrap_LIBRARY} )
#   ENDIF()

ENDIF( DCMTK_config_INCLUDE_DIR 
    AND DCMTK_ofstd_INCLUDE_DIR 
    AND DCMTK_ofstd_LIBRARY
    AND DCMTK_oflog_LIBRARY
    AND DCMTK_dcmdata_INCLUDE_DIR
    AND DCMTK_dcmdata_LIBRARY
    AND DCMTK_dcmimgle_INCLUDE_DIR
    AND DCMTK_dcmimgle_LIBRARY )

FIND_PROGRAM(DCMTK_DCMDUMP_EXECUTABLE dcmdump
  ${DCMTK_DIR}/bin
  )

FIND_PROGRAM(DCMTK_DCMDJPEG_EXECUTABLE dcmdjpeg
  ${DCMTK_DIR}/bin
  )

FIND_PROGRAM(DCMTK_DCMDRLE_EXECUTABLE dcmdrle
  ${DCMTK_DIR}/bin
  )<commit_msg>COMP: Update FindDCMTK to not look in default path.<commit_after># - find DCMTK libraries and applications
#

#  DCMTK_INCLUDE_DIR   - Directories to include to use DCMTK
#  DCMTK_LIBRARIES     - Files to link against to use DCMTK
#  DCMTK_FOUND         - If false, don't try to use DCMTK
#  DCMTK_DIR           - (optional) Source directory for DCMTK
#
# DCMTK_DIR can be used to make it simpler to find the various include
# directories and compiled libraries if you've just compiled it in the
# source tree. Just set it to the root of the tree where you extracted
# the source (default to /usr/include/dcmtk/)

#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
# Copyright 2009 <NAME> <<EMAIL>>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
#  License text for the above reference.)

#
# Written for VXL by <NAME>.
# Upgraded for GDCM by <NAME>.
# 

IF( NOT DCMTK_FOUND )
  SET( DCMTK_DIR "/usr/include/dcmtk/"
    CACHE PATH "Root of DCMTK source tree (optional)." )
  MARK_AS_ADVANCED( DCMTK_DIR )
ENDIF( NOT DCMTK_FOUND )

FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
  PATHS
    ${DCMTK_DIR}/config/include
    ${DCMTK_DIR}/config
    ${DCMTK_DIR}/include/dcmtk/config
    ${DCMTK_DIR}/include
  NO_DEFAULT_PATH
  
)

FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
  PATHS
    ${DCMTK_DIR}/ofstd/include
    ${DCMTK_DIR}/ofstd
    ${DCMTK_DIR}/include/ofstd
    ${DCMTK_DIR}/include/dcmtk/ofstd
  NO_DEFAULT_PATH
)

FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
  PATHS
    ${DCMTK_DIR}/ofstd/libsrc
    ${DCMTK_DIR}/ofstd/libsrc/Release
    ${DCMTK_DIR}/ofstd/libsrc/Debug
    ${DCMTK_DIR}/ofstd/Release
    ${DCMTK_DIR}/ofstd/Debug
    ${DCMTK_DIR}/lib
  NO_DEFAULT_PATH
)

FIND_LIBRARY( DCMTK_oflog_LIBRARY oflog
  PATHS
    ${DCMTK_DIR}/oflog/libsrc
    ${DCMTK_DIR}/oflog/libsrc/Release
    ${DCMTK_DIR}/oflog/libsrc/Debug
    ${DCMTK_DIR}/oflog/Release
    ${DCMTK_DIR}/oflog/Debug
    ${DCMTK_DIR}/lib
  NO_DEFAULT_PATH
)

FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
  PATHS
    ${DCMTK_DIR}/include/dcmdata
    ${DCMTK_DIR}/include/dcmtk/dcmdata
    ${DCMTK_DIR}/dcmdata
    ${DCMTK_DIR}/dcmdata/include
  NO_DEFAULT_PATH
)

FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
  PATHS
    ${DCMTK_DIR}/dcmdata/libsrc
    ${DCMTK_DIR}/dcmdata/libsrc/Release
    ${DCMTK_DIR}/dcmdata/libsrc/Debug
    ${DCMTK_DIR}/dcmdata/Release
    ${DCMTK_DIR}/dcmdata/Debug
    ${DCMTK_DIR}/lib
  NO_DEFAULT_PATH
)

FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
  PATHS
    ${DCMTK_DIR}/dcmimgle/include
    ${DCMTK_DIR}/dcmimgle
    ${DCMTK_DIR}/include/dcmimgle
    ${DCMTK_DIR}/include/dcmtk/dcmimgle
  NO_DEFAULT_PATH
)

FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
  PATHS
    ${DCMTK_DIR}/dcmimgle/libsrc
    ${DCMTK_DIR}/dcmimgle/libsrc/Release
    ${DCMTK_DIR}/dcmimgle/libsrc/Debug
    ${DCMTK_DIR}/dcmimgle/Release
    ${DCMTK_DIR}/dcmimgle/Debug
    ${DCMTK_DIR}/lib
  NO_DEFAULT_PATH
)

# MM: I could not find this library on debian system / dcmtk 3.5.4
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
  PATHS
    ${DCMTK_DIR}/imagectn/libsrc/Release
    ${DCMTK_DIR}/imagectn/libsrc/
    ${DCMTK_DIR}/imagectn/libsrc/Debug
  NO_DEFAULT_PATH
  )

FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
  PATHS
    ${DCMTK_DIR}/dcmnet/libsrc/Release
    ${DCMTK_DIR}/dcmnet/libsrc/Debug
    ${DCMTK_DIR}/dcmnet/libsrc/
  NO_DEFAULT_PATH
  )

IF( DCMTK_config_INCLUDE_DIR 
    AND DCMTK_ofstd_INCLUDE_DIR 
    AND DCMTK_ofstd_LIBRARY
    AND DCMTK_oflog_LIBRARY
    AND DCMTK_dcmdata_INCLUDE_DIR
    AND DCMTK_dcmdata_LIBRARY
    AND DCMTK_dcmimgle_INCLUDE_DIR
    AND DCMTK_dcmimgle_LIBRARY )

#   # Wrap library is required on Linux
#   IF(NOT WIN32)
#     FIND_LIBRARY(DCMTK_wrap_LIBRARY wrap)
#     MESSAGE(DCMTK_wrap_LIBRARY:${DCMTK_wrap_LIBRARY})
#     IF(NOT DCMTK_wrap_LIBRARY)
#       MESSAGE(FATAL_ERROR "error: Wrap library is required to use DCMTK. "
#                           "On Ubuntu, you could install it using 'sudo apt-get libwrap0'")
#     ENDIF()
#   ENDIF()
  
  SET( DCMTK_FOUND "YES" )
  SET( DCMTK_INCLUDE_DIR
    ${DCMTK_DIR}/include
    ${DCMTK_config_INCLUDE_DIR}
    ${DCMTK_ofstd_INCLUDE_DIR}
    ${DCMTK_dcmdata_INCLUDE_DIR}
    ${DCMTK_dcmimgle_INCLUDE_DIR}
  )

  SET( DCMTK_LIBRARIES
    ${DCMTK_dcmimgle_LIBRARY}
    ${DCMTK_dcmdata_LIBRARY}
    ${DCMTK_ofstd_LIBRARY}
    ${DCMTK_oflog_LIBRARY}
    ${DCMTK_config_LIBRARY}
  )

  IF(DCMTK_imagedb_LIBRARY)
   SET( DCMTK_LIBRARIES
   ${DCMTK_LIBRARIES}
   ${DCMTK_imagedb_LIBRARY}
   )
  ENDIF(DCMTK_imagedb_LIBRARY)

  IF(DCMTK_dcmnet_LIBRARY)
   SET( DCMTK_LIBRARIES
   ${DCMTK_LIBRARIES}
   ${DCMTK_dcmnet_LIBRARY}
   )
  ENDIF(DCMTK_dcmnet_LIBRARY)

  IF( WIN32 )
    SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ws2_32 netapi32 wsock32)
  ENDIF( WIN32 )
  
#   IF (NOT WIN32)
#     SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ${DCMTK_wrap_LIBRARY} )
#   ENDIF()

ENDIF( DCMTK_config_INCLUDE_DIR 
    AND DCMTK_ofstd_INCLUDE_DIR 
    AND DCMTK_ofstd_LIBRARY
    AND DCMTK_oflog_LIBRARY
    AND DCMTK_dcmdata_INCLUDE_DIR
    AND DCMTK_dcmdata_LIBRARY
    AND DCMTK_dcmimgle_INCLUDE_DIR
    AND DCMTK_dcmimgle_LIBRARY )

FIND_PROGRAM(DCMTK_DCMDUMP_EXECUTABLE dcmdump
  PATHS
    ${DCMTK_DIR}/bin
  NO_DEFAULT_PATH
  )

FIND_PROGRAM(DCMTK_DCMDJPEG_EXECUTABLE dcmdjpeg
  PATHS
    ${DCMTK_DIR}/bin
  NO_DEFAULT_PATH
  )

FIND_PROGRAM(DCMTK_DCMDRLE_EXECUTABLE dcmdrle
  PATHS
    ${DCMTK_DIR}/bin
  NO_DEFAULT_PATH
  )
{'fraction_non_alphanumeric': 0.11884187082405345, 'fraction_numerical': 0.005523385300668151, 'mean_word_length': 4.218967921896792, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1661503', 'n_tokens_mistral': 4871, 'n_tokens_neox': 4540, 'n_words': 792}