sync upstream patches

This commit is contained in:
zhouganqing 2024-02-29 18:17:11 +08:00
parent a01a6be004
commit 479c6a9302
8 changed files with 24 additions and 25 deletions

View File

@ -37,9 +37,9 @@ get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS ${SELF_DIR}/GDCMTargets.cmake)
# This is an install tree
include(${SELF_DIR}/GDCMTargets.cmake)
get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT})
get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT})
else()
if(EXISTS ${SELF_DIR}/GDCMExports.cmake)

View File

@ -461,6 +461,10 @@ std::wstring System::ConvertToUNC(const char *utf8path)
#endif
}
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
// return size of file; also returns zero if no file exists
size_t System::FileSize(const char* filename)
{

View File

@ -138,6 +138,10 @@ bool Global::Prepend(const char *path)
#define PATH_MAX 4096
#endif
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
const char *Global::Locate(const char *resfile) const
{
#ifdef _WIN32

View File

@ -160,6 +160,7 @@ if(GDCM_DOCUMENTATION)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf
DESTINATION ${GDCM_INSTALL_DOC_DIR}
RENAME gdcm-${GDCM_MAJOR_VERSION}.pdf
)
add_dependencies(DoxygenDoc GDCMDoxygenPDF)
else()

View File

@ -22,7 +22,7 @@ mark_as_advanced(VTK_DIR)
set (QT_TAG_FILE "${CMAKE_CURRENT_BINARY_DIR}/Qt.tag")
endif ()
set(BUILD_DOXYGEN ON)
set(DOCUMENTATION_DOWNLOAD_VTK_TAGFILE ON)
set(DOCUMENTATION_DOWNLOAD_VTK_TAGFILE OFF)
set(DOCUMENTATION_HTML_TARZ ON)
set(DOXYGEN_PROJECT_NAME "vtkgdcm")
if(VTK_SOURCE_DIR)
@ -35,8 +35,8 @@ mark_as_advanced(VTK_DIR)
# sudo apt-get install vtk-doc
if(EXISTS "/usr/share/doc/vtk-doc/html")
set(DOXYGEN_SOURCE_DIR "/usr/share/doc/vtk-doc/html")
elseif(EXISTS "/usr/share/doc/vtk6-doc/doxygen")
set(DOXYGEN_SOURCE_DIR "/usr/share/doc/vtk6-doc/doxygen")
elseif(EXISTS "/usr/share/doc/vtk9/doxygen")
set(DOXYGEN_SOURCE_DIR "/usr/share/doc/vtk9/doxygen")
else()
message(ERROR "DOXYGEN_SOURCE_DIR need to be set.")
endif()
@ -97,7 +97,7 @@ mark_as_advanced(VTK_DIR)
get_filename_component(DOT_PATH ${DOT} PATH)
endif()
set(TAGFILES "\"${CMAKE_CURRENT_BINARY_DIR}/vtkNightlyDoc.tag=http://www.vtk.org/doc/nightly/html\"")
#set(TAGFILES "\"${CMAKE_CURRENT_BINARY_DIR}/vtkNightlyDoc.tag=http://www.vtk.org/doc/nightly/html\"")
if(INCLUDE_QT_DOCUMENTATION)
set (TAGFILES "${TAGFILES} \"${QT_TAG_FILE}=http://doc.trolltech.com/4.2\"")
endif()

View File

@ -42,7 +42,7 @@ export PROJECT_NAME=@DOXYGEN_PROJECT_NAME@
# Example:
# PATH_TO_VTK_DOX_SCRIPTS=@CMAKE_CURRENT_SOURCE_DIR@
#
export PATH_TO_VTK_DOX_SCRIPTS="@DOXYGEN_SOURCE_DIR@"
export PATH_TO_VTK_DOX_SCRIPTS=/usr/share/vtk9/doxygen/
export PATH_TO_VTKGDCM_FINAL_PATH="@VTKGDCM_FINAL_PATH@"
@ -169,12 +169,12 @@ cd "${DOXTEMP}" || echoexit "Cannot find Doxygen output directory: ${DOXTEMP}"
# Convert the VTK headers to the Doxygen format.
echo "Convert the VTK headers to the Doxygen format."
if test "x$PERL_PROG" != "xNOTFOUND" ; then
$PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \
$PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \
--to "$INTERMEDIATE_DOX_DIR" \
--relativeto "@DOXYGEN_SOURCE_LOCATIONS_DIR@" \
@DOXYGEN_SOURCE_LOCATIONS@ || echoexit "Problem converting VTK headers"
if test "x@DOXYGEN_BINARY_LOCATIONS_DIR@" != "x"; then
$PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \
$PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_header2doxygen.pl" \
--to "$INTERMEDIATE_DOX_DIR" \
--relativeto "@DOXYGEN_BINARY_LOCATIONS_DIR@" \
@DOXYGEN_BINARY_LOCATIONS@ || echoexit "Problem converting VTK headers"
@ -186,13 +186,16 @@ echo "Convert the VTK headers to the Doxygen format - done"
# Build the full-text index.
echo "Build the full-text index."
if test "x$PERL_PROG" != "xNOTFOUND" ; then
cp "$PATH_TO_VTK_DOX_SCRIPTS/doc_index.stop" doc_index.stop
$PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_index.pl" \
--project "$PROJECT_NAME" \
--stop "$PATH_TO_VTK_DOX_SCRIPTS/doc_index.stop" \
--stop "doc_index.stop" \
--store "doc_""$PROJECT_NAME""_index.dox" \
--to "$INTERMEDIATE_DOX_DIR" \
@DOXYGEN_SOURCE_LOCATIONS@ \
@DOXYGEN_BINARY_LOCATIONS@ || echoexit "Problem building full-text index"
rm -f doc_index.stop
fi
echo "Build the full-text index - done"
@ -201,7 +204,7 @@ echo "Build the full-text index - done"
# # demos that use that class.
# if test "x$PERL_PROG" != "xNOTFOUND" ; then
# $PERL_PROG $PATH_TO_VTK_DOX_SCRIPTS/doc_class2example.pl \
# gzip -dc $PATH_TO_VTK_DOX_SCRIPTS/doc_class2example.pl | $PERL_PROG - \
# --datamatch "\W((VTK|ParaView)_DATA_ROOT|(VTK|MedVIP)Data|(vtk)?GetDataRoot|ExpandDataFileName)\W" \
# --dataicon "paper-clip.gif" \
# --dirmatch "^demos$" \

View File

@ -23,6 +23,7 @@ PDF_HYPERLINKS = YES
HAVE_DOT = YES
#HAVE_DOT = NO
DOT_PATH = "@DOT_PATH@"
DOT_IMAGE_FORMAT = svg
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES

View File

@ -1,14 +0,0 @@
Reference:
Author: >
David Rodríguez González and Trevor Carpenter and Jano I. van Hemert
and Joanna Wardlaw
Title: An open source toolkit for medical imaging de-identification
Journal: European Radiology
Year: 2010
Volume: 20
Number: 8
Pages: 1896-1904
DOI: 10.1007/s00330-010-1745-3
PMID: 20204640
URL: http://www.springerlink.com/content/j20844338623m167
eprint: http://www.springerlink.com/content/j20844338623m167/fulltext.pdf