Commit fa59aecd authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: Add INSTALL with demo scripts

parent f67b3a3b
......@@ -119,3 +119,32 @@ option( SUPERELASTIX_BUILD_DOXYGEN "Enable building Doxygen documentation." OFF
mark_as_advanced( SUPERELASTIX_BUILD_READTHEDOCS )
option( SUPERELASTIX_BUILD_READTHEDOCS "Enable building readthedocs.org documentation." OFF )
# ---------------------------------------------------------------------
# Install
# When building the "INSTALL" project of SuperElastix these files are installed
# Copy the SuperElastix executable
install(TARGETS "SuperElastix"
RUNTIME DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed"
)
# Copy some of the configuration files
install(FILES "${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/itkv4_SVF_ANTsCC.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/itkv4_SVF_MSD.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/elastix_Bspline_NC.json"
"${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR}/elastix_Bspline_MSD.json"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Configuration"
)
# Copy some of the input data files
#TODO: data files are only present if SUPERELASTIX_BUILD_TESTING is enabled
install(FILES "${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR}/coneA2d64.mhd"
"${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR}/coneA2d64.raw"
"${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR}/coneB2d64.mhd"
"${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR}/coneB2d64.raw"
DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed/Data"
)
# Copy the demo scripts
install(DIRECTORY "${CMAKE_SOURCE_DIR}/Install/" DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/installed" FILE_PERMISSIONS OWNER_EXECUTE)
\ No newline at end of file
..\SuperElastix.exe --conf ..\Configuration\elastix_Bspline_NC.json --graphout 1A_graph_elastix_NC.dot --in FixedImage=..\Data\coneA2d64.mhd MovingImage=..\Data\coneB2d64.mhd --out ResultImage=1A_image_elastix_NC.mhd
CALL graphviz_to_png 1A_graph_elastix_NC.dot
..\SuperElastix.exe --conf ..\Configuration\elastix_Bspline_MSD.json --graphout 1B_graph_elastix_MSD.dot --in FixedImage=..\Data\coneA2d64.mhd MovingImage=..\Data\coneB2d64.mhd --out ResultImage=1B_image_elastix_MSD.mhd
CALL graphviz_to_png 1B_graph_elastix_MSD.dot
..\SuperElastix.exe --conf ..\Configuration\itkv4_SVF_ANTsCC.json --graphout 2A_graph_itkv4_NC.dot --in FixedImage=..\Data\coneA2d64.mhd MovingImage=..\Data\coneB2d64.mhd --out ResultImage=1B_image_elastix_MSD.mhd ResultDisplacementField=2A_deformation_itkv4_NC.mhd
CALL graphviz_to_png 2A_graph_itkv4_NC.dot
\ No newline at end of file
..\SuperElastix.exe --conf ..\Configuration\itkv4_SVF_MSD.json --graphout 2B_graph_itkv4_MSD.dot --in FixedImage=..\Data\coneA2d64.mhd MovingImage=..\Data\coneB2d64.mhd --out ResultImage=2B_image_itkv4_MSD.mhd ResultDisplacementField=2B_deformation_itkv4_MSD.mhd
CALL graphviz_to_png 2B_graph_itkv4_MSD.dot
\ No newline at end of file
REM Helper script. Not intended to run directly.
REM Please install graphviz and substitute the correct path below
"c:\Program Files (x86)"\Graphviz2.38\bin\dot %1 -Tpng -o %1.png
......@@ -66,6 +66,11 @@ set( CTEST_CONFIGURATION_TYPE Debug )
# Unit tests
add_subdirectory( Unit )
# Make data directories available parent cmake for installation of SuperElastix
set( SUPERELASTIX_UNITTEST_INPUT_DATA_DIR ${SUPERELASTIX_UNITTEST_INPUT_DATA_DIR} PARENT_SCOPE )
set( SUPERELASTIX_UNITTEST_BASELINE_DATA_DIR ${SUPERELASTIX_UNITTEST_BASELINE_DATA_DIR} PARENT_SCOPE )
set( SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR ${SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR} PARENT_SCOPE )
# ---------------------------------------------------------------------
# Configure dashboard
mark_as_advanced( SUPERELASTIX_BUILD_DASHBOARD )
......
......@@ -31,10 +31,10 @@ endif()
# ---------------------------------------------------------------------
# Set data directories
set( SUPERELASTIX_UNITTEST_INPUT_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/Data/Input )
set( SUPERELASTIX_UNITTEST_INPUT_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/Data/Input PARENT_SCOPE )
set( SUPERELASTIX_UNITTEST_OUTPUT_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/Data/Output )
set( SUPERELASTIX_UNITTEST_BASELINE_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/Data/Baseline )
set( SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Data/Configuration )
set( SUPERELASTIX_UNITTEST_BASELINE_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/Data/Baseline PARENT_SCOPE )
set( SUPERELASTIX_UNITTEST_CONFIGURATION_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Data/Configuration PARENT_SCOPE )
if( NOT EXISTS ${SUPERELASTIX_UNITTEST_OUTPUT_DATA_DIR} )
file( MAKE_DIRECTORY ${SUPERELASTIX_UNITTEST_OUTPUT_DATA_DIR} )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment