-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shu-gong
committed
Jun 6, 2022
0 parents
commit 7674f21
Showing
2,613 changed files
with
355,203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
# - find DCMTK libraries and applications | ||
# | ||
|
||
# DCMTK_INCLUDE_DIRS - 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-2010 Mathieu Malaterre <[email protected]> | ||
# Copyright 2010 Thomas Sondergaard <[email protected]> | ||
# | ||
# 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 distribute this file outside of CMake, substitute the full | ||
# License text for the above reference.) | ||
|
||
# | ||
# Written for VXL by Amitha Perera. | ||
# Upgraded for GDCM by Mathieu Malaterre. | ||
# Modified for EasyViz by Thomas Sondergaard. | ||
# | ||
|
||
if(NOT DCMTK_FOUND AND NOT DCMTK_DIR) | ||
set(DCMTK_DIR | ||
"/usr/include/dcmtk/" | ||
CACHE | ||
PATH | ||
"Root of DCMTK source tree (optional).") | ||
mark_as_advanced(DCMTK_DIR) | ||
endif() | ||
|
||
|
||
foreach(lib | ||
dcmdata | ||
dcmdsig | ||
dcmimage | ||
dcmimgle | ||
dcmjpeg | ||
dcmjpls | ||
dcmnet | ||
dcmpstat | ||
dcmqrdb | ||
dcmsign | ||
dcmsr | ||
dcmtls | ||
ijg12 | ||
ijg16 | ||
ijg8 | ||
oflog | ||
ofstd) | ||
|
||
find_library(DCMTK_${lib}_LIBRARY | ||
${lib} | ||
PATHS | ||
${DCMTK_DIR}/${lib}/libsrc | ||
${DCMTK_DIR}/${lib}/libsrc/Release | ||
${DCMTK_DIR}/${lib}/libsrc/Debug | ||
${DCMTK_DIR}/${lib}/Release | ||
${DCMTK_DIR}/${lib}/Debug | ||
${DCMTK_DIR}/lib | ||
PATH_SUFFIXES | ||
dcmtk) | ||
|
||
mark_as_advanced(DCMTK_${lib}_LIBRARY) | ||
|
||
if(DCMTK_${lib}_LIBRARY) | ||
list(APPEND DCMTK_LIBRARIES ${DCMTK_${lib}_LIBRARY}) | ||
endif() | ||
|
||
endforeach() | ||
|
||
|
||
set(DCMTK_config_TEST_HEADER osconfig.h) | ||
set(DCMTK_dcmdata_TEST_HEADER dctypes.h) | ||
set(DCMTK_dcmimage_TEST_HEADER dicoimg.h) | ||
set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h) | ||
set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h) | ||
set(DCMTK_dcmnet_TEST_HEADER assoc.h) | ||
set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h) | ||
set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h) | ||
set(DCMTK_dcmsign_TEST_HEADER sicert.h) | ||
set(DCMTK_dcmsr_TEST_HEADER dsrtree.h) | ||
set(DCMTK_dcmtls_TEST_HEADER tlslayer.h) | ||
set(DCMTK_ofstd_TEST_HEADER ofstdinc.h) | ||
|
||
foreach(dir | ||
config | ||
dcmdata | ||
dcmdsig | ||
dcmimage | ||
dcmimgle | ||
dcmjpeg | ||
dcmjpls | ||
dcmnet | ||
dcmpstat | ||
dcmqrdb | ||
dcmsign | ||
dcmsr | ||
dcmtls | ||
oflog | ||
ofstd) | ||
find_path(DCMTK_${dir}_INCLUDE_DIR | ||
${DCMTK_${dir}_TEST_HEADER} | ||
PATHS | ||
${DCMTK_DIR}/${dir}/include | ||
${DCMTK_DIR}/${dir} | ||
${DCMTK_DIR}/include/${dir}) | ||
|
||
mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR) | ||
|
||
if(DCMTK_${dir}_INCLUDE_DIR) | ||
list(APPEND | ||
DCMTK_INCLUDE_DIRS | ||
${DCMTK_${dir}_INCLUDE_DIR}) | ||
endif() | ||
endforeach() | ||
|
||
if(WIN32) | ||
list(APPEND DCMTK_LIBRARIES netapi32 wsock32) | ||
endif() | ||
|
||
if(DCMTK_dcmjpls_LIBRARY) | ||
list(APPEND DCMTK_LIBRARIES CharLS) | ||
endif() | ||
|
||
if(DCMTK_ofstd_INCLUDE_DIR) | ||
get_filename_component(DCMTK_dcmtk_INCLUDE_DIR | ||
${DCMTK_ofstd_INCLUDE_DIR} | ||
PATH | ||
CACHE) | ||
list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_dcmtk_INCLUDE_DIR}) | ||
mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(DCMTK DEFAULT_MSG | ||
DCMTK_config_INCLUDE_DIR | ||
DCMTK_ofstd_INCLUDE_DIR | ||
DCMTK_ofstd_LIBRARY | ||
DCMTK_dcmdata_INCLUDE_DIR | ||
DCMTK_dcmdata_LIBRARY | ||
DCMTK_dcmimgle_INCLUDE_DIR | ||
DCMTK_dcmimgle_LIBRARY) | ||
|
||
# Compatibility: This variable is deprecated | ||
set(DCMTK_INCLUDE_DIR ${DCMTK_INCLUDE_DIRS}) | ||
|
||
foreach(executable dcmdump dcmdjpeg dcmdrle) | ||
string(TOUPPER ${executable} EXECUTABLE) | ||
find_program(DCMTK_${EXECUTABLE}_EXECUTABLE ${executable} ${DCMTK_DIR}/bin) | ||
mark_as_advanced(DCMTK_${EXECUTABLE}_EXECUTABLE) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# - Try to find Eigen3 lib | ||
# | ||
# This module supports requiring a minimum version, e.g. you can do | ||
# find_package(Eigen3 3.1.2) | ||
# to require version 3.1.2 or newer of Eigen3. | ||
# | ||
# Once done this will define | ||
# | ||
# EIGEN_FOUND - system has eigen lib with correct version | ||
# EIGEN_INCLUDE_DIR - the eigen include directory | ||
# EIGEN_VERSION - eigen version | ||
|
||
# Copyright (c) 2006, 2007 Montel Laurent, <[email protected]> | ||
# Copyright (c) 2008, 2009 Gael Guennebaud, <[email protected]> | ||
# Copyright (c) 2009 Benoit Jacob <[email protected]> | ||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license. | ||
|
||
if(NOT Eigen_FIND_VERSION) | ||
if(NOT Eigen_FIND_VERSION_MAJOR) | ||
set(Eigen_FIND_VERSION_MAJOR 2) | ||
endif(NOT Eigen_FIND_VERSION_MAJOR) | ||
if(NOT Eigen_FIND_VERSION_MINOR) | ||
set(Eigen_FIND_VERSION_MINOR 91) | ||
endif(NOT Eigen_FIND_VERSION_MINOR) | ||
if(NOT Eigen_FIND_VERSION_PATCH) | ||
set(Eigen_FIND_VERSION_PATCH 0) | ||
endif(NOT Eigen_FIND_VERSION_PATCH) | ||
|
||
set(Eigen_FIND_VERSION "${Eigen_FIND_VERSION_MAJOR}.${Eigen_FIND_VERSION_MINOR}.${Eigen_FIND_VERSION_PATCH}") | ||
endif(NOT Eigen_FIND_VERSION) | ||
|
||
macro(_eigen3_check_version) | ||
file(READ "${EIGEN_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) | ||
|
||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") | ||
set(EIGEN_WORLD_VERSION "${CMAKE_MATCH_1}") | ||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") | ||
set(EIGEN_MAJOR_VERSION "${CMAKE_MATCH_1}") | ||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") | ||
set(EIGEN_MINOR_VERSION "${CMAKE_MATCH_1}") | ||
|
||
set(EIGEN_VERSION ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION}) | ||
if(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION}) | ||
set(EIGEN_VERSION_OK FALSE) | ||
else(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION}) | ||
set(EIGEN_VERSION_OK TRUE) | ||
endif(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION}) | ||
|
||
if(NOT EIGEN_VERSION_OK) | ||
|
||
message(STATUS "Eigen version ${EIGEN_VERSION} found in ${EIGEN_INCLUDE_DIR}, " | ||
"but at least version ${Eigen_FIND_VERSION} is required") | ||
endif(NOT EIGEN_VERSION_OK) | ||
endmacro(_eigen3_check_version) | ||
|
||
if (EIGEN_INCLUDE_DIRS) | ||
|
||
# in cache already | ||
_eigen3_check_version() | ||
set(EIGEN_FOUND ${EIGEN_VERSION_OK}) | ||
|
||
else () | ||
|
||
find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library | ||
PATHS | ||
${CMAKE_INSTALL_PREFIX}/include | ||
${KDE4_INCLUDE_DIR} | ||
PATH_SUFFIXES eigen3 eigen | ||
) | ||
|
||
if(EIGEN_INCLUDE_DIR) | ||
_eigen3_check_version() | ||
endif(EIGEN_INCLUDE_DIR) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR EIGEN_VERSION_OK) | ||
|
||
mark_as_advanced(EIGEN_INCLUDE_DIR) | ||
SET(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR} CACHE PATH "The Eigen include path.") | ||
|
||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
############################################################################### | ||
# Find Flann | ||
# | ||
# This sets the following variables: | ||
# FLANN_FOUND - True if FLANN was found. | ||
# FLANN_INCLUDE_DIRS - Directories containing the FLANN include files. | ||
# FLANN_LIBRARIES - Libraries needed to use FLANN. | ||
# FLANN_DEFINITIONS - Compiler flags for FLANN. | ||
|
||
find_package(PkgConfig) | ||
pkg_check_modules(PC_FLANN flann) | ||
set(FLANN_DEFINITIONS ${PC_FLANN_CFLAGS_OTHER}) | ||
|
||
find_path(FLANN_INCLUDE_DIR flann/flann.hpp | ||
HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS}) | ||
|
||
find_library(FLANN_LIBRARY flann | ||
HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS}) | ||
|
||
set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR}) | ||
set(FLANN_LIBRARIES ${FLANN_LIBRARY}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Flann DEFAULT_MSG | ||
FLANN_LIBRARY FLANN_INCLUDE_DIR) | ||
|
||
mark_as_advanced(FLANN_LIBRARY FLANN_INCLUDE_DIR) | ||
|
Oops, something went wrong.