diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 24ebb4ebee..3a97284642 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -158,6 +158,7 @@ jobs: -B build -G Ninja -D CMAKE_BUILD_TYPE=Release + -D CMAKE_FIND_FRAMEWORK=LAST -D MRTRIX_BUILD_TESTS=ON -D MRTRIX_STL_DEBUGGING=ON -D MRTRIX_USE_PCH=OFF diff --git a/CMakeLists.txt b/CMakeLists.txt index ec4e36e39c..871b431545 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ option(MRTRIX_BUILD_TESTS "Build tests executables" OFF) option(MRTRIX_STRIP_CONDA "Strip ananconda/mininconda from PATH to avoid conflicts" ON) option(MRTRIX_USE_PCH "Use precompiled headers" ON) option(MRTRIX_PYTHON_SOFTLINK "Build directory softlink to Python source code rather than copying" ON) -option(MRTRIX_BUILD_NON_CORE_STATIC "Build MRtrix's non-core code as a static library" OFF) +option(MRTRIX_BUILD_STATIC "Build MRtrix's library statically" OFF) option(MRTRIX_USE_LLD "Use lld as the linker" OFF) set(MRTRIX_DEPENDENCIES_DIR "" CACHE PATH @@ -73,16 +73,6 @@ file(RELATIVE_PATH relDir set(CMAKE_INSTALL_RPATH ${base} ${base}/${relDir}) include(BuildType) -include(LinkerSetup) -include(FindFFTW) -include(CompilerCache) -include(ECMEnableSanitizers) -include(Dependencies) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - include(MacOSBundle) -endif() - -use_compiler_cache() if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit) message(WARNING @@ -91,37 +81,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND NOT EXISTS ${CMAKE_CURRENT_SOURCE "and then run `pre-commit install` from the ${CMAKE_CURRENT_SOURCE_DIR} directory.") endif() -add_library(mrtrix-common INTERFACE) -add_library(mrtrix::common ALIAS mrtrix-common) -target_compile_definitions(mrtrix-common INTERFACE - MRTRIX_BUILD_TYPE="${CMAKE_BUILD_TYPE}" - $<$:MRTRIX_WINDOWS> - $<$:MRTRIX_MACOSX> - $<$:MRTRIX_FREEBSD> -) - -if(MRTRIX_STL_DEBUGGING AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - message(STATUS "Enabling STL debug mode") - target_compile_definitions(mrtrix-common INTERFACE - $<$:_ITERATOR_DEBUG_LEVEL=1> - $<$:_GLIBCXX_DEBUG _GLIBCXX_DEBUG_PEDANTIC> - $<$:_LIBCPP_DEBUG=1> - ) -endif() - -if(MRTRIX_WARNINGS_AS_ERRORS) - message(STATUS "Enabling warnings as errors") - target_compile_options(mrtrix-common INTERFACE - $<$:/WX> - $<$:-Werror> - ) -endif() - -# Allow compilation of big object of files in debug mode on MINGW -if(MINGW AND CMAKE_BUILD_TYPE MATCHES "Debug") - target_compile_options(mrtrix-common INTERFACE -Wa,-mbig-obj) -endif() - if(MRTRIX_STRIP_CONDA AND DEFINED ENV{CONDA_PREFIX}) message(WARNING "CONDA_PREFIX is set to ${CONDA_PREFIX}, adding conda diretories to CMAKE_IGNORE_PATH to avoid conflicts.\n" @@ -145,11 +104,9 @@ if(COMPILER_PATH MATCHES "fsl/bin" OR LINKER_PATH MATCHES "fsl/bin") ) endif() -add_subdirectory(cmd) -add_subdirectory(core) +add_subdirectory(cpp) add_subdirectory(python) add_subdirectory(share) -add_subdirectory(src) if(PROJECT_IS_TOP_LEVEL AND MRTRIX_BUILD_TESTS) add_subdirectory(testing) diff --git a/clang-format-all b/clang-format-all index b5a5649c28..3ed85526e0 100755 --- a/clang-format-all +++ b/clang-format-all @@ -34,11 +34,10 @@ parser.add_argument( args = parser.parse_args() clang_format = args.executable -paths = ['core', 'cmd', 'src', 'testing'] +paths = ['cpp', 'testing'] extensions = ['.h', '.cpp'] -exclusion_list = ['core/file/nifti1.h', - 'core/file/nifti2.h', - 'core/file/json.h'] +exclusion_list = ['cpp/gui/opengl/gl_core_3_3.h', + 'cpp/gui/opengl/gl_core_3_3.cpp'] # if clang-format path contains spaces, wrap it in quotes if ' ' in clang_format and not clang_format.startswith('"'): diff --git a/cmake/MacOSBundle.cmake b/cmake/MacOSBundle.cmake index 42bb702a7d..d90e7358af 100644 --- a/cmake/MacOSBundle.cmake +++ b/cmake/MacOSBundle.cmake @@ -1,7 +1,7 @@ function(set_bundle_properties executable_name) - set(icon_files ${CMAKE_CURRENT_SOURCE_DIR}/../icons/macos/${executable_name}.icns) + set(icon_files ${PROJECT_SOURCE_DIR}/icons/macos/${executable_name}.icns) if(${executable_name} STREQUAL "mrview") - list(APPEND icon_files ${CMAKE_CURRENT_SOURCE_DIR}/../icons/macos/mrview_doc.icns) + list(APPEND icon_files ${PROJECT_SOURCE_DIR}/icons/macos/mrview_doc.icns) endif() string(TIMESTAMP CURRENT_YEAR "%Y") @@ -10,14 +10,14 @@ function(set_bundle_properties executable_name) target_sources(${executable_name} PRIVATE ${icon_files}) set_target_properties(${executable_name} PROPERTIES MACOSX_BUNDLE TRUE - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/../packaging/macos/bundle/${executable_name}.plist.in" + MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/packaging/macos/bundle/${executable_name}.plist.in" RESOURCE "${icon_files}" INSTALL_RPATH "@executable_path/../../../../lib" ) endfunction() function(install_bundle_wrapper_scripts executable_name) - set(wrapper_script ${CMAKE_CURRENT_SOURCE_DIR}/../packaging/macos/bundle/wrapper_launcher.sh.in) + set(wrapper_script ${PROJECT_SOURCE_DIR}/packaging/macos/bundle/wrapper_launcher.sh.in) configure_file(${wrapper_script} ${PROJECT_BINARY_DIR}/bin/${executable_name} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @ONLY diff --git a/core/version.cpp.in b/core/version.cpp.in deleted file mode 100644 index 2143df497a..0000000000 --- a/core/version.cpp.in +++ /dev/null @@ -1,8 +0,0 @@ -#include "version.h" - -namespace MR { - namespace App { - const char *mrtrix_version = "@MRTRIX_VERSION@"; - const char *build_date = __DATE__; - } -} diff --git a/core/version.h b/core/version.h deleted file mode 100644 index a5aafdfb51..0000000000 --- a/core/version.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -extern const char *mrtrix_version; -extern const char *build_date; diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt new file mode 100644 index 0000000000..0319494577 --- /dev/null +++ b/cpp/CMakeLists.txt @@ -0,0 +1,41 @@ +include(LinkerSetup) +include(FindFFTW) +include(ECMEnableSanitizers) +include(Dependencies) +include(CompilerCache) +use_compiler_cache() + +add_library(mrtrix-common INTERFACE) +add_library(mrtrix::common ALIAS mrtrix-common) +target_compile_definitions(mrtrix-common INTERFACE + MRTRIX_BUILD_TYPE="${CMAKE_BUILD_TYPE}" + $<$:MRTRIX_WINDOWS> + $<$:MRTRIX_MACOSX> + $<$:MRTRIX_FREEBSD> +) + +if(MRTRIX_STL_DEBUGGING AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + message(STATUS "Enabling STL debug mode") + target_compile_definitions(mrtrix-common INTERFACE + $<$:_ITERATOR_DEBUG_LEVEL=1> + $<$:_GLIBCXX_DEBUG _GLIBCXX_DEBUG_PEDANTIC> + $<$:_LIBCPP_DEBUG=1> + ) +endif() + +if(MRTRIX_WARNINGS_AS_ERRORS) + message(STATUS "Enabling warnings as errors") + target_compile_options(mrtrix-common INTERFACE + $<$:/WX> + $<$:-Werror> + ) +endif() + +# Allow compilation of big object of files in debug mode on MINGW +if(MINGW AND CMAKE_BUILD_TYPE MATCHES "Debug") + target_compile_options(mrtrix-common INTERFACE -Wa,-mbig-obj) +endif() + +add_subdirectory(cmd) +add_subdirectory(core) +add_subdirectory(gui) diff --git a/cmd/5tt2gmwmi.cpp b/cpp/cmd/5tt2gmwmi.cpp similarity index 100% rename from cmd/5tt2gmwmi.cpp rename to cpp/cmd/5tt2gmwmi.cpp diff --git a/cmd/5tt2vis.cpp b/cpp/cmd/5tt2vis.cpp similarity index 100% rename from cmd/5tt2vis.cpp rename to cpp/cmd/5tt2vis.cpp diff --git a/cmd/5ttcheck.cpp b/cpp/cmd/5ttcheck.cpp similarity index 100% rename from cmd/5ttcheck.cpp rename to cpp/cmd/5ttcheck.cpp diff --git a/cmd/5ttedit.cpp b/cpp/cmd/5ttedit.cpp similarity index 100% rename from cmd/5ttedit.cpp rename to cpp/cmd/5ttedit.cpp diff --git a/cmd/CMakeLists.txt b/cpp/cmd/CMakeLists.txt similarity index 93% rename from cmd/CMakeLists.txt rename to cpp/cmd/CMakeLists.txt index e6ede5619b..0ec13f4241 100644 --- a/cmd/CMakeLists.txt +++ b/cpp/cmd/CMakeLists.txt @@ -1,3 +1,7 @@ +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + include(MacOSBundle) +endif() + set(GUI_CMD_SRCS mrview.cpp shview.cpp) file(GLOB HEADLESS_CMD_SRCS *.cpp) @@ -26,8 +30,8 @@ function(add_cmd CMD_SRC IS_GUI) get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) add_executable(${CMD_NAME} ${CMD_SRC}) target_link_libraries(${CMD_NAME} PRIVATE - $,mrtrix::gui,mrtrix::headless> - mrtrix::exec-version-lib + $,mrtrix::gui,mrtrix::core> + mrtrix::executable-version ) set_target_properties(${CMD_NAME} PROPERTIES LINK_DEPENDS_NO_SHARED true diff --git a/cmd/afdconnectivity.cpp b/cpp/cmd/afdconnectivity.cpp similarity index 99% rename from cmd/afdconnectivity.cpp rename to cpp/cmd/afdconnectivity.cpp index 617a242679..5d0023d63d 100644 --- a/cmd/afdconnectivity.cpp +++ b/cpp/cmd/afdconnectivity.cpp @@ -23,7 +23,7 @@ #include "dwi/tractography/mapping/mapping.h" #include "dwi/tractography/properties.h" #include "memory.h" -#include "version.h" +#include "mrtrix_version.h" using namespace MR; using namespace MR::DWI; diff --git a/cmd/amp2response.cpp b/cpp/cmd/amp2response.cpp similarity index 100% rename from cmd/amp2response.cpp rename to cpp/cmd/amp2response.cpp diff --git a/cmd/amp2sh.cpp b/cpp/cmd/amp2sh.cpp similarity index 100% rename from cmd/amp2sh.cpp rename to cpp/cmd/amp2sh.cpp diff --git a/cmd/connectome2tck.cpp b/cpp/cmd/connectome2tck.cpp similarity index 100% rename from cmd/connectome2tck.cpp rename to cpp/cmd/connectome2tck.cpp diff --git a/cmd/connectomeedit.cpp b/cpp/cmd/connectomeedit.cpp similarity index 100% rename from cmd/connectomeedit.cpp rename to cpp/cmd/connectomeedit.cpp diff --git a/cmd/connectomestats.cpp b/cpp/cmd/connectomestats.cpp similarity index 100% rename from cmd/connectomestats.cpp rename to cpp/cmd/connectomestats.cpp diff --git a/cmd/dcmedit.cpp b/cpp/cmd/dcmedit.cpp similarity index 100% rename from cmd/dcmedit.cpp rename to cpp/cmd/dcmedit.cpp diff --git a/cmd/dcminfo.cpp b/cpp/cmd/dcminfo.cpp similarity index 100% rename from cmd/dcminfo.cpp rename to cpp/cmd/dcminfo.cpp diff --git a/cmd/dirflip.cpp b/cpp/cmd/dirflip.cpp similarity index 100% rename from cmd/dirflip.cpp rename to cpp/cmd/dirflip.cpp diff --git a/cmd/dirgen.cpp b/cpp/cmd/dirgen.cpp similarity index 100% rename from cmd/dirgen.cpp rename to cpp/cmd/dirgen.cpp diff --git a/cmd/dirmerge.cpp b/cpp/cmd/dirmerge.cpp similarity index 100% rename from cmd/dirmerge.cpp rename to cpp/cmd/dirmerge.cpp diff --git a/cmd/dirorder.cpp b/cpp/cmd/dirorder.cpp similarity index 100% rename from cmd/dirorder.cpp rename to cpp/cmd/dirorder.cpp diff --git a/cmd/dirrotate.cpp b/cpp/cmd/dirrotate.cpp similarity index 100% rename from cmd/dirrotate.cpp rename to cpp/cmd/dirrotate.cpp diff --git a/cmd/dirsplit.cpp b/cpp/cmd/dirsplit.cpp similarity index 100% rename from cmd/dirsplit.cpp rename to cpp/cmd/dirsplit.cpp diff --git a/cmd/dirstat.cpp b/cpp/cmd/dirstat.cpp similarity index 100% rename from cmd/dirstat.cpp rename to cpp/cmd/dirstat.cpp diff --git a/cmd/dwi2adc.cpp b/cpp/cmd/dwi2adc.cpp similarity index 100% rename from cmd/dwi2adc.cpp rename to cpp/cmd/dwi2adc.cpp diff --git a/cmd/dwi2fod.cpp b/cpp/cmd/dwi2fod.cpp similarity index 100% rename from cmd/dwi2fod.cpp rename to cpp/cmd/dwi2fod.cpp diff --git a/cmd/dwi2tensor.cpp b/cpp/cmd/dwi2tensor.cpp similarity index 100% rename from cmd/dwi2tensor.cpp rename to cpp/cmd/dwi2tensor.cpp diff --git a/cmd/dwidenoise.cpp b/cpp/cmd/dwidenoise.cpp similarity index 100% rename from cmd/dwidenoise.cpp rename to cpp/cmd/dwidenoise.cpp diff --git a/cmd/dwiextract.cpp b/cpp/cmd/dwiextract.cpp similarity index 100% rename from cmd/dwiextract.cpp rename to cpp/cmd/dwiextract.cpp diff --git a/cmd/fixel2peaks.cpp b/cpp/cmd/fixel2peaks.cpp similarity index 100% rename from cmd/fixel2peaks.cpp rename to cpp/cmd/fixel2peaks.cpp diff --git a/cmd/fixel2sh.cpp b/cpp/cmd/fixel2sh.cpp similarity index 100% rename from cmd/fixel2sh.cpp rename to cpp/cmd/fixel2sh.cpp diff --git a/cmd/fixel2tsf.cpp b/cpp/cmd/fixel2tsf.cpp similarity index 100% rename from cmd/fixel2tsf.cpp rename to cpp/cmd/fixel2tsf.cpp diff --git a/cmd/fixel2voxel.cpp b/cpp/cmd/fixel2voxel.cpp similarity index 100% rename from cmd/fixel2voxel.cpp rename to cpp/cmd/fixel2voxel.cpp diff --git a/cmd/fixelcfestats.cpp b/cpp/cmd/fixelcfestats.cpp similarity index 100% rename from cmd/fixelcfestats.cpp rename to cpp/cmd/fixelcfestats.cpp diff --git a/cmd/fixelconnectivity.cpp b/cpp/cmd/fixelconnectivity.cpp similarity index 100% rename from cmd/fixelconnectivity.cpp rename to cpp/cmd/fixelconnectivity.cpp diff --git a/cmd/fixelconvert.cpp b/cpp/cmd/fixelconvert.cpp similarity index 100% rename from cmd/fixelconvert.cpp rename to cpp/cmd/fixelconvert.cpp diff --git a/cmd/fixelcorrespondence.cpp b/cpp/cmd/fixelcorrespondence.cpp similarity index 100% rename from cmd/fixelcorrespondence.cpp rename to cpp/cmd/fixelcorrespondence.cpp diff --git a/cmd/fixelcrop.cpp b/cpp/cmd/fixelcrop.cpp similarity index 100% rename from cmd/fixelcrop.cpp rename to cpp/cmd/fixelcrop.cpp diff --git a/cmd/fixelfilter.cpp b/cpp/cmd/fixelfilter.cpp similarity index 100% rename from cmd/fixelfilter.cpp rename to cpp/cmd/fixelfilter.cpp diff --git a/cmd/fixelreorient.cpp b/cpp/cmd/fixelreorient.cpp similarity index 100% rename from cmd/fixelreorient.cpp rename to cpp/cmd/fixelreorient.cpp diff --git a/cmd/fod2dec.cpp b/cpp/cmd/fod2dec.cpp similarity index 100% rename from cmd/fod2dec.cpp rename to cpp/cmd/fod2dec.cpp diff --git a/cmd/fod2fixel.cpp b/cpp/cmd/fod2fixel.cpp similarity index 100% rename from cmd/fod2fixel.cpp rename to cpp/cmd/fod2fixel.cpp diff --git a/cmd/label2colour.cpp b/cpp/cmd/label2colour.cpp similarity index 100% rename from cmd/label2colour.cpp rename to cpp/cmd/label2colour.cpp diff --git a/cmd/label2mesh.cpp b/cpp/cmd/label2mesh.cpp similarity index 100% rename from cmd/label2mesh.cpp rename to cpp/cmd/label2mesh.cpp diff --git a/cmd/labelconvert.cpp b/cpp/cmd/labelconvert.cpp similarity index 99% rename from cmd/labelconvert.cpp rename to cpp/cmd/labelconvert.cpp index 0c6cbc4152..de59687d03 100644 --- a/cmd/labelconvert.cpp +++ b/cpp/cmd/labelconvert.cpp @@ -18,8 +18,8 @@ #include "image.h" #include "image_helpers.h" #include "mrtrix.h" +#include "mrtrix_version.h" #include "transform.h" -#include "version.h" #include "algo/loop.h" #include "file/path.h" diff --git a/cmd/labelstats.cpp b/cpp/cmd/labelstats.cpp similarity index 100% rename from cmd/labelstats.cpp rename to cpp/cmd/labelstats.cpp diff --git a/cmd/maskdump.cpp b/cpp/cmd/maskdump.cpp similarity index 100% rename from cmd/maskdump.cpp rename to cpp/cmd/maskdump.cpp diff --git a/cmd/maskfilter.cpp b/cpp/cmd/maskfilter.cpp similarity index 100% rename from cmd/maskfilter.cpp rename to cpp/cmd/maskfilter.cpp diff --git a/cmd/mesh2voxel.cpp b/cpp/cmd/mesh2voxel.cpp similarity index 100% rename from cmd/mesh2voxel.cpp rename to cpp/cmd/mesh2voxel.cpp diff --git a/cmd/meshconvert.cpp b/cpp/cmd/meshconvert.cpp similarity index 100% rename from cmd/meshconvert.cpp rename to cpp/cmd/meshconvert.cpp diff --git a/cmd/meshfilter.cpp b/cpp/cmd/meshfilter.cpp similarity index 100% rename from cmd/meshfilter.cpp rename to cpp/cmd/meshfilter.cpp diff --git a/cmd/mraverageheader.cpp b/cpp/cmd/mraverageheader.cpp similarity index 100% rename from cmd/mraverageheader.cpp rename to cpp/cmd/mraverageheader.cpp diff --git a/cmd/mrcalc.cpp b/cpp/cmd/mrcalc.cpp similarity index 100% rename from cmd/mrcalc.cpp rename to cpp/cmd/mrcalc.cpp diff --git a/cmd/mrcat.cpp b/cpp/cmd/mrcat.cpp similarity index 100% rename from cmd/mrcat.cpp rename to cpp/cmd/mrcat.cpp diff --git a/cmd/mrcentroid.cpp b/cpp/cmd/mrcentroid.cpp similarity index 100% rename from cmd/mrcentroid.cpp rename to cpp/cmd/mrcentroid.cpp diff --git a/cmd/mrcheckerboardmask.cpp b/cpp/cmd/mrcheckerboardmask.cpp similarity index 100% rename from cmd/mrcheckerboardmask.cpp rename to cpp/cmd/mrcheckerboardmask.cpp diff --git a/cmd/mrclusterstats.cpp b/cpp/cmd/mrclusterstats.cpp similarity index 100% rename from cmd/mrclusterstats.cpp rename to cpp/cmd/mrclusterstats.cpp diff --git a/cmd/mrcolour.cpp b/cpp/cmd/mrcolour.cpp similarity index 100% rename from cmd/mrcolour.cpp rename to cpp/cmd/mrcolour.cpp diff --git a/cmd/mrconvert.cpp b/cpp/cmd/mrconvert.cpp similarity index 100% rename from cmd/mrconvert.cpp rename to cpp/cmd/mrconvert.cpp diff --git a/cmd/mrdegibbs.cpp b/cpp/cmd/mrdegibbs.cpp similarity index 100% rename from cmd/mrdegibbs.cpp rename to cpp/cmd/mrdegibbs.cpp diff --git a/cmd/mrdump.cpp b/cpp/cmd/mrdump.cpp similarity index 100% rename from cmd/mrdump.cpp rename to cpp/cmd/mrdump.cpp diff --git a/cmd/mredit.cpp b/cpp/cmd/mredit.cpp similarity index 100% rename from cmd/mredit.cpp rename to cpp/cmd/mredit.cpp diff --git a/cmd/mrfilter.cpp b/cpp/cmd/mrfilter.cpp similarity index 100% rename from cmd/mrfilter.cpp rename to cpp/cmd/mrfilter.cpp diff --git a/cmd/mrgrid.cpp b/cpp/cmd/mrgrid.cpp similarity index 100% rename from cmd/mrgrid.cpp rename to cpp/cmd/mrgrid.cpp diff --git a/cmd/mrhistmatch.cpp b/cpp/cmd/mrhistmatch.cpp similarity index 100% rename from cmd/mrhistmatch.cpp rename to cpp/cmd/mrhistmatch.cpp diff --git a/cmd/mrhistogram.cpp b/cpp/cmd/mrhistogram.cpp similarity index 100% rename from cmd/mrhistogram.cpp rename to cpp/cmd/mrhistogram.cpp diff --git a/cmd/mrinfo.cpp b/cpp/cmd/mrinfo.cpp similarity index 100% rename from cmd/mrinfo.cpp rename to cpp/cmd/mrinfo.cpp diff --git a/cmd/mrmath.cpp b/cpp/cmd/mrmath.cpp similarity index 100% rename from cmd/mrmath.cpp rename to cpp/cmd/mrmath.cpp diff --git a/cmd/mrmetric.cpp b/cpp/cmd/mrmetric.cpp similarity index 100% rename from cmd/mrmetric.cpp rename to cpp/cmd/mrmetric.cpp diff --git a/cmd/mrregister.cpp b/cpp/cmd/mrregister.cpp similarity index 100% rename from cmd/mrregister.cpp rename to cpp/cmd/mrregister.cpp diff --git a/cmd/mrstats.cpp b/cpp/cmd/mrstats.cpp similarity index 100% rename from cmd/mrstats.cpp rename to cpp/cmd/mrstats.cpp diff --git a/cmd/mrthreshold.cpp b/cpp/cmd/mrthreshold.cpp similarity index 100% rename from cmd/mrthreshold.cpp rename to cpp/cmd/mrthreshold.cpp diff --git a/cmd/mrtransform.cpp b/cpp/cmd/mrtransform.cpp similarity index 100% rename from cmd/mrtransform.cpp rename to cpp/cmd/mrtransform.cpp diff --git a/cmd/mrview.cpp b/cpp/cmd/mrview.cpp similarity index 94% rename from cmd/mrview.cpp rename to cpp/cmd/mrview.cpp index d45aef8a60..62cf5f4a54 100644 --- a/cmd/mrview.cpp +++ b/cpp/cmd/mrview.cpp @@ -15,16 +15,16 @@ */ // clang-format off -#include "gui/gui.h" +#include "gui.h" #include "command.h" // clang-format on -#include "gui/mrview/icons.h" -#include "gui/mrview/mode/list.h" -#include "gui/mrview/sync/syncmanager.h" -#include "gui/mrview/tool/list.h" -#include "gui/mrview/window.h" #include "memory.h" +#include "mrview/icons.h" +#include "mrview/mode/list.h" +#include "mrview/sync/syncmanager.h" +#include "mrview/tool/list.h" +#include "mrview/window.h" #include "progressbar.h" using namespace MR; @@ -75,7 +75,7 @@ void usage() { MR::GUI::MRView::Tool::classname::add_commandline_options(OPTIONS); { using namespace MR::GUI::MRView::Tool; -#include "gui/mrview/tool/list.h" +#include "mrview/tool/list.h" } REQUIRES_AT_LEAST_ONE_ARGUMENT = false; diff --git a/cmd/mtnormalise.cpp b/cpp/cmd/mtnormalise.cpp similarity index 100% rename from cmd/mtnormalise.cpp rename to cpp/cmd/mtnormalise.cpp diff --git a/cmd/peaks2amp.cpp b/cpp/cmd/peaks2amp.cpp similarity index 100% rename from cmd/peaks2amp.cpp rename to cpp/cmd/peaks2amp.cpp diff --git a/cmd/peaks2fixel.cpp b/cpp/cmd/peaks2fixel.cpp similarity index 100% rename from cmd/peaks2fixel.cpp rename to cpp/cmd/peaks2fixel.cpp diff --git a/cmd/sh2amp.cpp b/cpp/cmd/sh2amp.cpp similarity index 100% rename from cmd/sh2amp.cpp rename to cpp/cmd/sh2amp.cpp diff --git a/cmd/sh2peaks.cpp b/cpp/cmd/sh2peaks.cpp similarity index 100% rename from cmd/sh2peaks.cpp rename to cpp/cmd/sh2peaks.cpp diff --git a/cmd/sh2power.cpp b/cpp/cmd/sh2power.cpp similarity index 100% rename from cmd/sh2power.cpp rename to cpp/cmd/sh2power.cpp diff --git a/cmd/sh2response.cpp b/cpp/cmd/sh2response.cpp similarity index 100% rename from cmd/sh2response.cpp rename to cpp/cmd/sh2response.cpp diff --git a/cmd/shbasis.cpp b/cpp/cmd/shbasis.cpp similarity index 100% rename from cmd/shbasis.cpp rename to cpp/cmd/shbasis.cpp diff --git a/cmd/shconv.cpp b/cpp/cmd/shconv.cpp similarity index 100% rename from cmd/shconv.cpp rename to cpp/cmd/shconv.cpp diff --git a/cmd/shview.cpp b/cpp/cmd/shview.cpp similarity index 95% rename from cmd/shview.cpp rename to cpp/cmd/shview.cpp index ffa21c2098..91c427130a 100644 --- a/cmd/shview.cpp +++ b/cpp/cmd/shview.cpp @@ -15,15 +15,15 @@ */ // clang-format off -#include "gui/gui.h" +#include "gui.h" #include "command.h" // clang-format on #include "file/path.h" -#include "gui/shview/icons.h" -#include "gui/shview/render_window.h" #include "math/SH.h" #include "progressbar.h" +#include "shview/icons.h" +#include "shview/render_window.h" using namespace MR; using namespace App; diff --git a/cmd/tck2connectome.cpp b/cpp/cmd/tck2connectome.cpp similarity index 100% rename from cmd/tck2connectome.cpp rename to cpp/cmd/tck2connectome.cpp diff --git a/cmd/tck2fixel.cpp b/cpp/cmd/tck2fixel.cpp similarity index 100% rename from cmd/tck2fixel.cpp rename to cpp/cmd/tck2fixel.cpp diff --git a/cmd/tckconvert.cpp b/cpp/cmd/tckconvert.cpp similarity index 100% rename from cmd/tckconvert.cpp rename to cpp/cmd/tckconvert.cpp diff --git a/cmd/tckdfc.cpp b/cpp/cmd/tckdfc.cpp similarity index 100% rename from cmd/tckdfc.cpp rename to cpp/cmd/tckdfc.cpp diff --git a/cmd/tckedit.cpp b/cpp/cmd/tckedit.cpp similarity index 100% rename from cmd/tckedit.cpp rename to cpp/cmd/tckedit.cpp diff --git a/cmd/tckgen.cpp b/cpp/cmd/tckgen.cpp similarity index 100% rename from cmd/tckgen.cpp rename to cpp/cmd/tckgen.cpp diff --git a/cmd/tckglobal.cpp b/cpp/cmd/tckglobal.cpp similarity index 99% rename from cmd/tckglobal.cpp rename to cpp/cmd/tckglobal.cpp index eb8dc81afd..ceb5fa7096 100644 --- a/cmd/tckglobal.cpp +++ b/cpp/cmd/tckglobal.cpp @@ -22,8 +22,8 @@ #include "file/matrix.h" #include "image.h" #include "math/SH.h" +#include "mrtrix_version.h" #include "thread.h" -#include "version.h" #include "dwi/tractography/GT/externalenergy.h" #include "dwi/tractography/GT/gt.h" diff --git a/cmd/tckinfo.cpp b/cpp/cmd/tckinfo.cpp similarity index 100% rename from cmd/tckinfo.cpp rename to cpp/cmd/tckinfo.cpp diff --git a/cmd/tckmap.cpp b/cpp/cmd/tckmap.cpp similarity index 100% rename from cmd/tckmap.cpp rename to cpp/cmd/tckmap.cpp diff --git a/cmd/tckresample.cpp b/cpp/cmd/tckresample.cpp similarity index 100% rename from cmd/tckresample.cpp rename to cpp/cmd/tckresample.cpp diff --git a/cmd/tcksample.cpp b/cpp/cmd/tcksample.cpp similarity index 100% rename from cmd/tcksample.cpp rename to cpp/cmd/tcksample.cpp diff --git a/cmd/tcksift.cpp b/cpp/cmd/tcksift.cpp similarity index 100% rename from cmd/tcksift.cpp rename to cpp/cmd/tcksift.cpp diff --git a/cmd/tcksift2.cpp b/cpp/cmd/tcksift2.cpp similarity index 100% rename from cmd/tcksift2.cpp rename to cpp/cmd/tcksift2.cpp diff --git a/cmd/tckstats.cpp b/cpp/cmd/tckstats.cpp similarity index 100% rename from cmd/tckstats.cpp rename to cpp/cmd/tckstats.cpp diff --git a/cmd/tcktransform.cpp b/cpp/cmd/tcktransform.cpp similarity index 100% rename from cmd/tcktransform.cpp rename to cpp/cmd/tcktransform.cpp diff --git a/cmd/tensor2metric.cpp b/cpp/cmd/tensor2metric.cpp similarity index 100% rename from cmd/tensor2metric.cpp rename to cpp/cmd/tensor2metric.cpp diff --git a/cmd/transformcalc.cpp b/cpp/cmd/transformcalc.cpp similarity index 100% rename from cmd/transformcalc.cpp rename to cpp/cmd/transformcalc.cpp diff --git a/cmd/transformcompose.cpp b/cpp/cmd/transformcompose.cpp similarity index 100% rename from cmd/transformcompose.cpp rename to cpp/cmd/transformcompose.cpp diff --git a/cmd/transformconvert.cpp b/cpp/cmd/transformconvert.cpp similarity index 100% rename from cmd/transformconvert.cpp rename to cpp/cmd/transformconvert.cpp diff --git a/cmd/tsfdivide.cpp b/cpp/cmd/tsfdivide.cpp similarity index 100% rename from cmd/tsfdivide.cpp rename to cpp/cmd/tsfdivide.cpp diff --git a/cmd/tsfinfo.cpp b/cpp/cmd/tsfinfo.cpp similarity index 100% rename from cmd/tsfinfo.cpp rename to cpp/cmd/tsfinfo.cpp diff --git a/cmd/tsfmult.cpp b/cpp/cmd/tsfmult.cpp similarity index 100% rename from cmd/tsfmult.cpp rename to cpp/cmd/tsfmult.cpp diff --git a/cmd/tsfsmooth.cpp b/cpp/cmd/tsfsmooth.cpp similarity index 100% rename from cmd/tsfsmooth.cpp rename to cpp/cmd/tsfsmooth.cpp diff --git a/cmd/tsfthreshold.cpp b/cpp/cmd/tsfthreshold.cpp similarity index 100% rename from cmd/tsfthreshold.cpp rename to cpp/cmd/tsfthreshold.cpp diff --git a/cmd/tsfvalidate.cpp b/cpp/cmd/tsfvalidate.cpp similarity index 100% rename from cmd/tsfvalidate.cpp rename to cpp/cmd/tsfvalidate.cpp diff --git a/cmd/vectorstats.cpp b/cpp/cmd/vectorstats.cpp similarity index 100% rename from cmd/vectorstats.cpp rename to cpp/cmd/vectorstats.cpp diff --git a/cmd/voxel2fixel.cpp b/cpp/cmd/voxel2fixel.cpp similarity index 100% rename from cmd/voxel2fixel.cpp rename to cpp/cmd/voxel2fixel.cpp diff --git a/cmd/voxel2mesh.cpp b/cpp/cmd/voxel2mesh.cpp similarity index 100% rename from cmd/voxel2mesh.cpp rename to cpp/cmd/voxel2mesh.cpp diff --git a/cmd/warp2metric.cpp b/cpp/cmd/warp2metric.cpp similarity index 100% rename from cmd/warp2metric.cpp rename to cpp/cmd/warp2metric.cpp diff --git a/cmd/warpconvert.cpp b/cpp/cmd/warpconvert.cpp similarity index 100% rename from cmd/warpconvert.cpp rename to cpp/cmd/warpconvert.cpp diff --git a/cmd/warpcorrect.cpp b/cpp/cmd/warpcorrect.cpp similarity index 100% rename from cmd/warpcorrect.cpp rename to cpp/cmd/warpcorrect.cpp diff --git a/cmd/warpinit.cpp b/cpp/cmd/warpinit.cpp similarity index 100% rename from cmd/warpinit.cpp rename to cpp/cmd/warpinit.cpp diff --git a/cmd/warpinvert.cpp b/cpp/cmd/warpinvert.cpp similarity index 100% rename from cmd/warpinvert.cpp rename to cpp/cmd/warpinvert.cpp diff --git a/core/CMakeLists.txt b/cpp/core/CMakeLists.txt similarity index 52% rename from core/CMakeLists.txt rename to cpp/core/CMakeLists.txt index 6b4211f625..a09046350a 100644 --- a/core/CMakeLists.txt +++ b/cpp/core/CMakeLists.txt @@ -1,7 +1,4 @@ include(CheckSymbolExists) - -file(GLOB_RECURSE CORE_SRCS *.cpp *.h) - find_package(ZLIB REQUIRED) find_package(FFTW REQUIRED) find_package(Git QUIET) @@ -12,9 +9,6 @@ if(PNG_FOUND) message(STATUS "Found PNG: ${PNG_LIBRARIES}") endif() -add_library(mrtrix-core SHARED ${CORE_SRCS}) -add_library(mrtrix::core ALIAS mrtrix-core) - # Check to see if we can use lgamma_r() function in custom Math::betaincreg() # The function is defined under _REENTRANT on some systems (e.g. MacOS) list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_REENTRANT) @@ -25,33 +19,61 @@ if(NOT MRTRIX_HAVE_LGAMMA_R) message(STATUS "No lgamma_r() function found; statistical inference may have poorer multi-threading performance") endif() -# On Windows, the library need to be in the same directory as the executables -if(WIN32) - set_target_properties(mrtrix-core PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin - ) -endif() +file(GLOB_RECURSE HEADLESS_SOURCES *.h *.cpp) -set(CORE_VERSION_CPP ${CMAKE_CURRENT_BINARY_DIR}/version.cpp) +find_package(Git QUIET) + +# Create version target and library +set(MRTRIX_VERSION_CPP ${CMAKE_CURRENT_BINARY_DIR}/mrtrix_version.cpp) +set(CMD_VERSION_CPP ${CMAKE_CURRENT_BINARY_DIR}/executable_version.cpp) + +add_custom_target(mrtrix-executable-version-target ALL + COMMAND ${CMAKE_COMMAND} + -D GIT_EXECUTABLE=${GIT_EXECUTABLE} + -D MRTRIX_BASE_VERSION=${MRTRIX_BASE_VERSION} + -D DST=${CMD_VERSION_CPP} + -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/executable_version.cpp.in + -P ${PROJECT_SOURCE_DIR}/cmake/FindVersion.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating executable_version.cpp" + BYPRODUCTS ${CMD_VERSION_CPP} + VERBATIM +) -add_custom_target(core-version-target ALL +add_custom_target(mrtrix-version-target ALL COMMAND ${CMAKE_COMMAND} -D GIT_EXECUTABLE=${GIT_EXECUTABLE} -D MRTRIX_BASE_VERSION=${MRTRIX_BASE_VERSION} - -D DST=${CMAKE_CURRENT_BINARY_DIR}/version.cpp - -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in - -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/FindVersion.cmake + -D DST=${MRTRIX_VERSION_CPP} + -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/mrtrix_version.cpp.in + -P ${PROJECT_SOURCE_DIR}/cmake/FindVersion.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Generating version.cpp for core library" - BYPRODUCTS ${CORE_VERSION_CPP} + COMMENT "Generating mrtrix_version.cpp" + BYPRODUCTS ${MRTRIX_VERSION_CPP} VERBATIM ) -add_library(mrtrix-core-version-lib STATIC ${CORE_VERSION_CPP}) -add_library(mrtrix::core-version-lib ALIAS mrtrix-core-version-lib) -add_dependencies(mrtrix-core-version-lib core-version-target) +add_library(mrtrix-version STATIC ${MRTRIX_VERSION_CPP}) +add_library(mrtrix::version ALIAS mrtrix-version) +target_include_directories(mrtrix-version PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +add_dependencies(mrtrix-version mrtrix-version-target) -target_include_directories(mrtrix-core-version-lib PRIVATE +add_library(mrtrix-executable-version STATIC ${CMD_VERSION_CPP}) +add_library(mrtrix::executable-version ALIAS mrtrix-executable-version) +target_include_directories(mrtrix-executable-version PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +add_dependencies(mrtrix-executable-version mrtrix-executable-version-target) + + +if(MRTRIX_BUILD_STATIC) + set(MRTRIX_LIBRARY_TYPE STATIC) +else() + set(MRTRIX_LIBRARY_TYPE SHARED) +endif() + +add_library(mrtrix-core ${MRTRIX_LIBRARY_TYPE} ${HEADLESS_SOURCES}) +add_library(mrtrix::core ALIAS mrtrix-core) + +target_include_directories(mrtrix-core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -59,6 +81,7 @@ if(MRTRIX_USE_PCH) target_precompile_headers(mrtrix-core PRIVATE [["exception.h"]] + ) endif() @@ -82,20 +105,22 @@ target_link_libraries(mrtrix-core PUBLIC Eigen3::Eigen ZLIB::ZLIB ${FFTW_LIBRARIES} - mrtrix::core-version-lib mrtrix::common + mrtrix::version Threads::Threads - ${FFTW_LIBRARIES} nlohmann_json::nlohmann_json nifti::nifti half::half ) -target_include_directories(mrtrix-core PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} ${FFTW_INCLUDES} -) +# On Windows, the libraries need to be in the same directory as the executables +if(WIN32) + set_target_properties(mrtrix-core PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin + ) +endif() install(TARGETS mrtrix-core RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -) +) \ No newline at end of file diff --git a/core/adapter/base.h b/cpp/core/adapter/base.h similarity index 100% rename from core/adapter/base.h rename to cpp/core/adapter/base.h diff --git a/core/adapter/extract.h b/cpp/core/adapter/extract.h similarity index 100% rename from core/adapter/extract.h rename to cpp/core/adapter/extract.h diff --git a/core/adapter/gaussian1D.h b/cpp/core/adapter/gaussian1D.h similarity index 100% rename from core/adapter/gaussian1D.h rename to cpp/core/adapter/gaussian1D.h diff --git a/core/adapter/gradient1D.h b/cpp/core/adapter/gradient1D.h similarity index 100% rename from core/adapter/gradient1D.h rename to cpp/core/adapter/gradient1D.h diff --git a/core/adapter/gradient3D.h b/cpp/core/adapter/gradient3D.h similarity index 100% rename from core/adapter/gradient3D.h rename to cpp/core/adapter/gradient3D.h diff --git a/core/adapter/jacobian.h b/cpp/core/adapter/jacobian.h similarity index 100% rename from core/adapter/jacobian.h rename to cpp/core/adapter/jacobian.h diff --git a/core/adapter/median.h b/cpp/core/adapter/median.h similarity index 100% rename from core/adapter/median.h rename to cpp/core/adapter/median.h diff --git a/core/adapter/neighbourhood3D.h b/cpp/core/adapter/neighbourhood3D.h similarity index 100% rename from core/adapter/neighbourhood3D.h rename to cpp/core/adapter/neighbourhood3D.h diff --git a/core/adapter/normalise3D.h b/cpp/core/adapter/normalise3D.h similarity index 100% rename from core/adapter/normalise3D.h rename to cpp/core/adapter/normalise3D.h diff --git a/core/adapter/permute_axes.h b/cpp/core/adapter/permute_axes.h similarity index 100% rename from core/adapter/permute_axes.h rename to cpp/core/adapter/permute_axes.h diff --git a/core/adapter/regrid.h b/cpp/core/adapter/regrid.h similarity index 100% rename from core/adapter/regrid.h rename to cpp/core/adapter/regrid.h diff --git a/core/adapter/replicate.h b/cpp/core/adapter/replicate.h similarity index 100% rename from core/adapter/replicate.h rename to cpp/core/adapter/replicate.h diff --git a/core/adapter/reslice.cpp b/cpp/core/adapter/reslice.cpp similarity index 100% rename from core/adapter/reslice.cpp rename to cpp/core/adapter/reslice.cpp diff --git a/core/adapter/reslice.h b/cpp/core/adapter/reslice.h similarity index 100% rename from core/adapter/reslice.h rename to cpp/core/adapter/reslice.h diff --git a/core/adapter/subset.h b/cpp/core/adapter/subset.h similarity index 100% rename from core/adapter/subset.h rename to cpp/core/adapter/subset.h diff --git a/core/adapter/warp.h b/cpp/core/adapter/warp.h similarity index 100% rename from core/adapter/warp.h rename to cpp/core/adapter/warp.h diff --git a/core/algo/copy.h b/cpp/core/algo/copy.h similarity index 100% rename from core/algo/copy.h rename to cpp/core/algo/copy.h diff --git a/core/algo/histogram.cpp b/cpp/core/algo/histogram.cpp similarity index 100% rename from core/algo/histogram.cpp rename to cpp/core/algo/histogram.cpp diff --git a/core/algo/histogram.h b/cpp/core/algo/histogram.h similarity index 100% rename from core/algo/histogram.h rename to cpp/core/algo/histogram.h diff --git a/core/algo/iterator.h b/cpp/core/algo/iterator.h similarity index 100% rename from core/algo/iterator.h rename to cpp/core/algo/iterator.h diff --git a/core/algo/loop.h b/cpp/core/algo/loop.h similarity index 100% rename from core/algo/loop.h rename to cpp/core/algo/loop.h diff --git a/core/algo/min_max.h b/cpp/core/algo/min_max.h similarity index 100% rename from core/algo/min_max.h rename to cpp/core/algo/min_max.h diff --git a/core/algo/neighbourhooditerator.h b/cpp/core/algo/neighbourhooditerator.h similarity index 100% rename from core/algo/neighbourhooditerator.h rename to cpp/core/algo/neighbourhooditerator.h diff --git a/core/algo/random_loop.h b/cpp/core/algo/random_loop.h similarity index 100% rename from core/algo/random_loop.h rename to cpp/core/algo/random_loop.h diff --git a/core/algo/random_threaded_loop.h b/cpp/core/algo/random_threaded_loop.h similarity index 100% rename from core/algo/random_threaded_loop.h rename to cpp/core/algo/random_threaded_loop.h diff --git a/core/algo/stochastic_threaded_loop.h b/cpp/core/algo/stochastic_threaded_loop.h similarity index 100% rename from core/algo/stochastic_threaded_loop.h rename to cpp/core/algo/stochastic_threaded_loop.h diff --git a/core/algo/threaded_copy.h b/cpp/core/algo/threaded_copy.h similarity index 100% rename from core/algo/threaded_copy.h rename to cpp/core/algo/threaded_copy.h diff --git a/core/algo/threaded_loop.h b/cpp/core/algo/threaded_loop.h similarity index 100% rename from core/algo/threaded_loop.h rename to cpp/core/algo/threaded_loop.h diff --git a/core/app.cpp b/cpp/core/app.cpp similarity index 98% rename from core/app.cpp rename to cpp/core/app.cpp index b0347fa429..3594d95e79 100644 --- a/core/app.cpp +++ b/cpp/core/app.cpp @@ -22,8 +22,10 @@ #include "app.h" #include "debug.h" +#include "executable_version.h" #include "file/config.h" #include "file/path.h" +#include "mrtrix_version.h" #include "progressbar.h" #include "signal_handler.h" @@ -114,7 +116,6 @@ const std::thread::id main_thread_ID = std::this_thread::get_id(); const char *project_version = nullptr; const char *project_build_date = nullptr; -const char *executable_uses_mrtrix_version = nullptr; std::vector raw_arguments_list; @@ -1151,16 +1152,6 @@ void init(int cmdline_argc, const char *const *cmdline_argv) { NAME.erase(NAME.size() - 4); #endif - if (strcmp(mrtrix_version, executable_uses_mrtrix_version) != 0) { - Exception E("executable was compiled for a different version of the MRtrix3 library!"); - E.push_back(std::string(" ") + NAME + " version: " + executable_uses_mrtrix_version); - E.push_back(std::string(" library version: ") + mrtrix_version); - E.push_back("You may need to erase files left over from prior MRtrix3 versions;"); - E.push_back("eg. core/version.cpp; src/exec_version.cpp"); - E.push_back(", and re-configure cmake"); - throw E; - } - auto argv_quoted = [](const std::string &s) -> std::string { for (size_t i = 0; i != s.size(); ++i) { if (!(isalnum(s[i]) || s[i] == '.' || s[i] == '_' || s[i] == '-' || s[i] == '/')) { diff --git a/core/app.h b/cpp/core/app.h similarity index 99% rename from core/app.h rename to cpp/core/app.h index 1af93e0e74..d678d6f0c4 100644 --- a/core/app.h +++ b/cpp/core/app.h @@ -34,8 +34,8 @@ extern void run(); namespace MR::App { -extern const char *mrtrix_version; -extern const char *build_date; +extern const std::string mrtrix_version; +extern const std::string build_date; extern int log_level; extern int exit_error_code; extern std::string NAME; diff --git a/core/apply.h b/cpp/core/apply.h similarity index 100% rename from core/apply.h rename to cpp/core/apply.h diff --git a/core/axes.cpp b/cpp/core/axes.cpp similarity index 100% rename from core/axes.cpp rename to cpp/core/axes.cpp diff --git a/core/axes.h b/cpp/core/axes.h similarity index 100% rename from core/axes.h rename to cpp/core/axes.h diff --git a/core/cmdline_option.h b/cpp/core/cmdline_option.h similarity index 100% rename from core/cmdline_option.h rename to cpp/core/cmdline_option.h diff --git a/src/colourmap.cpp b/cpp/core/colourmap.cpp similarity index 100% rename from src/colourmap.cpp rename to cpp/core/colourmap.cpp diff --git a/src/colourmap.h b/cpp/core/colourmap.h similarity index 100% rename from src/colourmap.h rename to cpp/core/colourmap.h diff --git a/core/command.h b/cpp/core/command.h similarity index 83% rename from core/command.h rename to cpp/core/command.h index aec23d4415..59c1e924a8 100644 --- a/core/command.h +++ b/cpp/core/command.h @@ -21,8 +21,9 @@ #endif #include "app.h" -#include "exec_version.h" +#include "executable_version.h" #include "mrtrix.h" +#include "mrtrix_version.h" #ifdef MRTRIX_PROJECT namespace MR { namespace App { @@ -36,7 +37,6 @@ void set_project_version(); #ifdef MRTRIX_AS_R_LIBRARY extern "C" void R_main(int *cmdline_argc, char **cmdline_argv) { - ::MR::App::set_executable_uses_mrtrix_version(); #ifdef MRTRIX_PROJECT ::MR::App::set_project_version(); #endif @@ -70,6 +70,16 @@ extern "C" void R_usage(char **output) { #else int main(int cmdline_argc, char **cmdline_argv) { + if (MR::App::mrtrix_version != MR::App::mrtrix_executable_version) { + MR::Exception E("executable was compiled for a different version of the MRtrix3 library!"); + E.push_back(std::string(" ") + MR::App::NAME + " version: " + MR::App::mrtrix_executable_version); + E.push_back(std::string(" library version: ") + MR::App::mrtrix_version); + E.push_back("You may need to erase files left over from prior MRtrix3 versions;"); + E.push_back("eg. core/version.cpp; src/exec_version.cpp"); + E.push_back(", and re-configure cmake"); + throw E; + } + #ifdef FLUSH_TO_ZERO // use gcc switches: -msse -mfpmath=sse -ffast-math int mxcsr = _mm_getcsr(); @@ -79,7 +89,6 @@ int main(int cmdline_argc, char **cmdline_argv) { mxcsr |= (1 << 6); // denormals-are-zero _mm_setcsr(mxcsr); #endif - ::MR::App::set_executable_uses_mrtrix_version(); #ifdef MRTRIX_PROJECT ::MR::App::set_project_version(); #endif diff --git a/src/connectome/connectome.cpp b/cpp/core/connectome/connectome.cpp similarity index 100% rename from src/connectome/connectome.cpp rename to cpp/core/connectome/connectome.cpp diff --git a/src/connectome/connectome.h b/cpp/core/connectome/connectome.h similarity index 100% rename from src/connectome/connectome.h rename to cpp/core/connectome/connectome.h diff --git a/src/connectome/enhance.cpp b/cpp/core/connectome/enhance.cpp similarity index 100% rename from src/connectome/enhance.cpp rename to cpp/core/connectome/enhance.cpp diff --git a/src/connectome/enhance.h b/cpp/core/connectome/enhance.h similarity index 100% rename from src/connectome/enhance.h rename to cpp/core/connectome/enhance.h diff --git a/src/connectome/lut.cpp b/cpp/core/connectome/lut.cpp similarity index 100% rename from src/connectome/lut.cpp rename to cpp/core/connectome/lut.cpp diff --git a/src/connectome/lut.h b/cpp/core/connectome/lut.h similarity index 100% rename from src/connectome/lut.h rename to cpp/core/connectome/lut.h diff --git a/src/connectome/mat2vec.h b/cpp/core/connectome/mat2vec.h similarity index 100% rename from src/connectome/mat2vec.h rename to cpp/core/connectome/mat2vec.h diff --git a/core/datatype.cpp b/cpp/core/datatype.cpp similarity index 100% rename from core/datatype.cpp rename to cpp/core/datatype.cpp diff --git a/core/datatype.h b/cpp/core/datatype.h similarity index 100% rename from core/datatype.h rename to cpp/core/datatype.h diff --git a/core/debug.h b/cpp/core/debug.h similarity index 100% rename from core/debug.h rename to cpp/core/debug.h diff --git a/src/degibbs/unring1d.h b/cpp/core/degibbs/unring1d.h similarity index 100% rename from src/degibbs/unring1d.h rename to cpp/core/degibbs/unring1d.h diff --git a/src/degibbs/unring2d.h b/cpp/core/degibbs/unring2d.h similarity index 100% rename from src/degibbs/unring2d.h rename to cpp/core/degibbs/unring2d.h diff --git a/src/degibbs/unring3d.h b/cpp/core/degibbs/unring3d.h similarity index 100% rename from src/degibbs/unring3d.h rename to cpp/core/degibbs/unring3d.h diff --git a/src/doc/build.md b/cpp/core/doc/build.md similarity index 100% rename from src/doc/build.md rename to cpp/core/doc/build.md diff --git a/src/doc/cmdlineparsing.md b/cpp/core/doc/cmdlineparsing.md similarity index 100% rename from src/doc/cmdlineparsing.md rename to cpp/core/doc/cmdlineparsing.md diff --git a/src/doc/configure.md b/cpp/core/doc/configure.md similarity index 100% rename from src/doc/configure.md rename to cpp/core/doc/configure.md diff --git a/src/doc/examples/examples.md b/cpp/core/doc/examples/examples.md similarity index 100% rename from src/doc/examples/examples.md rename to cpp/core/doc/examples/examples.md diff --git a/src/doc/examples/per_datum_multithreaded_processing.md b/cpp/core/doc/examples/per_datum_multithreaded_processing.md similarity index 100% rename from src/doc/examples/per_datum_multithreaded_processing.md rename to cpp/core/doc/examples/per_datum_multithreaded_processing.md diff --git a/src/doc/examples/per_datum_processing.md b/cpp/core/doc/examples/per_datum_processing.md similarity index 100% rename from src/doc/examples/per_datum_processing.md rename to cpp/core/doc/examples/per_datum_processing.md diff --git a/src/doc/examples/per_voxel_multithreaded_processing.md b/cpp/core/doc/examples/per_voxel_multithreaded_processing.md similarity index 100% rename from src/doc/examples/per_voxel_multithreaded_processing.md rename to cpp/core/doc/examples/per_voxel_multithreaded_processing.md diff --git a/src/doc/header.html b/cpp/core/doc/header.html similarity index 100% rename from src/doc/header.html rename to cpp/core/doc/header.html diff --git a/src/doc/image_access.md b/cpp/core/doc/image_access.md similarity index 100% rename from src/doc/image_access.md rename to cpp/core/doc/image_access.md diff --git a/src/doc/logo.png b/cpp/core/doc/logo.png similarity index 100% rename from src/doc/logo.png rename to cpp/core/doc/logo.png diff --git a/src/doc/module.md b/cpp/core/doc/module.md similarity index 100% rename from src/doc/module.md rename to cpp/core/doc/module.md diff --git a/src/doc/multithreading.md b/cpp/core/doc/multithreading.md similarity index 100% rename from src/doc/multithreading.md rename to cpp/core/doc/multithreading.md diff --git a/src/doc/newcommand.md b/cpp/core/doc/newcommand.md similarity index 100% rename from src/doc/newcommand.md rename to cpp/core/doc/newcommand.md diff --git a/src/doc/overview.md b/cpp/core/doc/overview.md similarity index 100% rename from src/doc/overview.md rename to cpp/core/doc/overview.md diff --git a/src/doc/stylesheet.css b/cpp/core/doc/stylesheet.css similarity index 100% rename from src/doc/stylesheet.css rename to cpp/core/doc/stylesheet.css diff --git a/src/dwi/bootstrap.h b/cpp/core/dwi/bootstrap.h similarity index 100% rename from src/dwi/bootstrap.h rename to cpp/core/dwi/bootstrap.h diff --git a/src/dwi/directions/file.cpp b/cpp/core/dwi/directions/file.cpp similarity index 100% rename from src/dwi/directions/file.cpp rename to cpp/core/dwi/directions/file.cpp diff --git a/src/dwi/directions/file.h b/cpp/core/dwi/directions/file.h similarity index 100% rename from src/dwi/directions/file.h rename to cpp/core/dwi/directions/file.h diff --git a/src/dwi/directions/mask.cpp b/cpp/core/dwi/directions/mask.cpp similarity index 100% rename from src/dwi/directions/mask.cpp rename to cpp/core/dwi/directions/mask.cpp diff --git a/src/dwi/directions/mask.h b/cpp/core/dwi/directions/mask.h similarity index 100% rename from src/dwi/directions/mask.h rename to cpp/core/dwi/directions/mask.h diff --git a/src/dwi/directions/predefined.cpp b/cpp/core/dwi/directions/predefined.cpp similarity index 100% rename from src/dwi/directions/predefined.cpp rename to cpp/core/dwi/directions/predefined.cpp diff --git a/src/dwi/directions/predefined.h b/cpp/core/dwi/directions/predefined.h similarity index 100% rename from src/dwi/directions/predefined.h rename to cpp/core/dwi/directions/predefined.h diff --git a/src/dwi/directions/set.cpp b/cpp/core/dwi/directions/set.cpp similarity index 100% rename from src/dwi/directions/set.cpp rename to cpp/core/dwi/directions/set.cpp diff --git a/src/dwi/directions/set.h b/cpp/core/dwi/directions/set.h similarity index 100% rename from src/dwi/directions/set.h rename to cpp/core/dwi/directions/set.h diff --git a/src/dwi/fixel_map.h b/cpp/core/dwi/fixel_map.h similarity index 100% rename from src/dwi/fixel_map.h rename to cpp/core/dwi/fixel_map.h diff --git a/src/dwi/fmls.cpp b/cpp/core/dwi/fmls.cpp similarity index 100% rename from src/dwi/fmls.cpp rename to cpp/core/dwi/fmls.cpp diff --git a/src/dwi/fmls.h b/cpp/core/dwi/fmls.h similarity index 100% rename from src/dwi/fmls.h rename to cpp/core/dwi/fmls.h diff --git a/core/dwi/gradient.cpp b/cpp/core/dwi/gradient.cpp similarity index 100% rename from core/dwi/gradient.cpp rename to cpp/core/dwi/gradient.cpp diff --git a/core/dwi/gradient.h b/cpp/core/dwi/gradient.h similarity index 100% rename from core/dwi/gradient.h rename to cpp/core/dwi/gradient.h diff --git a/src/dwi/noise_estimator.h b/cpp/core/dwi/noise_estimator.h similarity index 100% rename from src/dwi/noise_estimator.h rename to cpp/core/dwi/noise_estimator.h diff --git a/src/dwi/sdeconv/csd.cpp b/cpp/core/dwi/sdeconv/csd.cpp similarity index 100% rename from src/dwi/sdeconv/csd.cpp rename to cpp/core/dwi/sdeconv/csd.cpp diff --git a/src/dwi/sdeconv/csd.h b/cpp/core/dwi/sdeconv/csd.h similarity index 100% rename from src/dwi/sdeconv/csd.h rename to cpp/core/dwi/sdeconv/csd.h diff --git a/src/dwi/sdeconv/msmt_csd.cpp b/cpp/core/dwi/sdeconv/msmt_csd.cpp similarity index 100% rename from src/dwi/sdeconv/msmt_csd.cpp rename to cpp/core/dwi/sdeconv/msmt_csd.cpp diff --git a/src/dwi/sdeconv/msmt_csd.h b/cpp/core/dwi/sdeconv/msmt_csd.h similarity index 100% rename from src/dwi/sdeconv/msmt_csd.h rename to cpp/core/dwi/sdeconv/msmt_csd.h diff --git a/core/dwi/shells.cpp b/cpp/core/dwi/shells.cpp similarity index 100% rename from core/dwi/shells.cpp rename to cpp/core/dwi/shells.cpp diff --git a/core/dwi/shells.h b/cpp/core/dwi/shells.h similarity index 100% rename from core/dwi/shells.h rename to cpp/core/dwi/shells.h diff --git a/src/dwi/tensor.h b/cpp/core/dwi/tensor.h similarity index 100% rename from src/dwi/tensor.h rename to cpp/core/dwi/tensor.h diff --git a/src/dwi/tractography/ACT/act.cpp b/cpp/core/dwi/tractography/ACT/act.cpp similarity index 100% rename from src/dwi/tractography/ACT/act.cpp rename to cpp/core/dwi/tractography/ACT/act.cpp diff --git a/src/dwi/tractography/ACT/act.h b/cpp/core/dwi/tractography/ACT/act.h similarity index 100% rename from src/dwi/tractography/ACT/act.h rename to cpp/core/dwi/tractography/ACT/act.h diff --git a/src/dwi/tractography/ACT/gmwmi.cpp b/cpp/core/dwi/tractography/ACT/gmwmi.cpp similarity index 100% rename from src/dwi/tractography/ACT/gmwmi.cpp rename to cpp/core/dwi/tractography/ACT/gmwmi.cpp diff --git a/src/dwi/tractography/ACT/gmwmi.h b/cpp/core/dwi/tractography/ACT/gmwmi.h similarity index 100% rename from src/dwi/tractography/ACT/gmwmi.h rename to cpp/core/dwi/tractography/ACT/gmwmi.h diff --git a/src/dwi/tractography/ACT/method.h b/cpp/core/dwi/tractography/ACT/method.h similarity index 100% rename from src/dwi/tractography/ACT/method.h rename to cpp/core/dwi/tractography/ACT/method.h diff --git a/src/dwi/tractography/ACT/shared.h b/cpp/core/dwi/tractography/ACT/shared.h similarity index 100% rename from src/dwi/tractography/ACT/shared.h rename to cpp/core/dwi/tractography/ACT/shared.h diff --git a/src/dwi/tractography/ACT/tissues.h b/cpp/core/dwi/tractography/ACT/tissues.h similarity index 100% rename from src/dwi/tractography/ACT/tissues.h rename to cpp/core/dwi/tractography/ACT/tissues.h diff --git a/src/dwi/tractography/GT/energy.h b/cpp/core/dwi/tractography/GT/energy.h similarity index 100% rename from src/dwi/tractography/GT/energy.h rename to cpp/core/dwi/tractography/GT/energy.h diff --git a/src/dwi/tractography/GT/externalenergy.cpp b/cpp/core/dwi/tractography/GT/externalenergy.cpp similarity index 100% rename from src/dwi/tractography/GT/externalenergy.cpp rename to cpp/core/dwi/tractography/GT/externalenergy.cpp diff --git a/src/dwi/tractography/GT/externalenergy.h b/cpp/core/dwi/tractography/GT/externalenergy.h similarity index 100% rename from src/dwi/tractography/GT/externalenergy.h rename to cpp/core/dwi/tractography/GT/externalenergy.h diff --git a/src/dwi/tractography/GT/gt.cpp b/cpp/core/dwi/tractography/GT/gt.cpp similarity index 100% rename from src/dwi/tractography/GT/gt.cpp rename to cpp/core/dwi/tractography/GT/gt.cpp diff --git a/src/dwi/tractography/GT/gt.h b/cpp/core/dwi/tractography/GT/gt.h similarity index 100% rename from src/dwi/tractography/GT/gt.h rename to cpp/core/dwi/tractography/GT/gt.h diff --git a/src/dwi/tractography/GT/internalenergy.cpp b/cpp/core/dwi/tractography/GT/internalenergy.cpp similarity index 100% rename from src/dwi/tractography/GT/internalenergy.cpp rename to cpp/core/dwi/tractography/GT/internalenergy.cpp diff --git a/src/dwi/tractography/GT/internalenergy.h b/cpp/core/dwi/tractography/GT/internalenergy.h similarity index 100% rename from src/dwi/tractography/GT/internalenergy.h rename to cpp/core/dwi/tractography/GT/internalenergy.h diff --git a/src/dwi/tractography/GT/mhsampler.cpp b/cpp/core/dwi/tractography/GT/mhsampler.cpp similarity index 100% rename from src/dwi/tractography/GT/mhsampler.cpp rename to cpp/core/dwi/tractography/GT/mhsampler.cpp diff --git a/src/dwi/tractography/GT/mhsampler.h b/cpp/core/dwi/tractography/GT/mhsampler.h similarity index 100% rename from src/dwi/tractography/GT/mhsampler.h rename to cpp/core/dwi/tractography/GT/mhsampler.h diff --git a/src/dwi/tractography/GT/particle.cpp b/cpp/core/dwi/tractography/GT/particle.cpp similarity index 100% rename from src/dwi/tractography/GT/particle.cpp rename to cpp/core/dwi/tractography/GT/particle.cpp diff --git a/src/dwi/tractography/GT/particle.h b/cpp/core/dwi/tractography/GT/particle.h similarity index 100% rename from src/dwi/tractography/GT/particle.h rename to cpp/core/dwi/tractography/GT/particle.h diff --git a/src/dwi/tractography/GT/particlegrid.cpp b/cpp/core/dwi/tractography/GT/particlegrid.cpp similarity index 100% rename from src/dwi/tractography/GT/particlegrid.cpp rename to cpp/core/dwi/tractography/GT/particlegrid.cpp diff --git a/src/dwi/tractography/GT/particlegrid.h b/cpp/core/dwi/tractography/GT/particlegrid.h similarity index 100% rename from src/dwi/tractography/GT/particlegrid.h rename to cpp/core/dwi/tractography/GT/particlegrid.h diff --git a/src/dwi/tractography/GT/particlepool.h b/cpp/core/dwi/tractography/GT/particlepool.h similarity index 100% rename from src/dwi/tractography/GT/particlepool.h rename to cpp/core/dwi/tractography/GT/particlepool.h diff --git a/src/dwi/tractography/GT/spatiallock.h b/cpp/core/dwi/tractography/GT/spatiallock.h similarity index 100% rename from src/dwi/tractography/GT/spatiallock.h rename to cpp/core/dwi/tractography/GT/spatiallock.h diff --git a/src/dwi/tractography/SIFT/fixel.h b/cpp/core/dwi/tractography/SIFT/fixel.h similarity index 100% rename from src/dwi/tractography/SIFT/fixel.h rename to cpp/core/dwi/tractography/SIFT/fixel.h diff --git a/src/dwi/tractography/SIFT/gradient_sort.cpp b/cpp/core/dwi/tractography/SIFT/gradient_sort.cpp similarity index 100% rename from src/dwi/tractography/SIFT/gradient_sort.cpp rename to cpp/core/dwi/tractography/SIFT/gradient_sort.cpp diff --git a/src/dwi/tractography/SIFT/gradient_sort.h b/cpp/core/dwi/tractography/SIFT/gradient_sort.h similarity index 100% rename from src/dwi/tractography/SIFT/gradient_sort.h rename to cpp/core/dwi/tractography/SIFT/gradient_sort.h diff --git a/src/dwi/tractography/SIFT/model.h b/cpp/core/dwi/tractography/SIFT/model.h similarity index 100% rename from src/dwi/tractography/SIFT/model.h rename to cpp/core/dwi/tractography/SIFT/model.h diff --git a/src/dwi/tractography/SIFT/model_base.h b/cpp/core/dwi/tractography/SIFT/model_base.h similarity index 100% rename from src/dwi/tractography/SIFT/model_base.h rename to cpp/core/dwi/tractography/SIFT/model_base.h diff --git a/src/dwi/tractography/SIFT/output.h b/cpp/core/dwi/tractography/SIFT/output.h similarity index 100% rename from src/dwi/tractography/SIFT/output.h rename to cpp/core/dwi/tractography/SIFT/output.h diff --git a/src/dwi/tractography/SIFT/proc_mask.cpp b/cpp/core/dwi/tractography/SIFT/proc_mask.cpp similarity index 100% rename from src/dwi/tractography/SIFT/proc_mask.cpp rename to cpp/core/dwi/tractography/SIFT/proc_mask.cpp diff --git a/src/dwi/tractography/SIFT/proc_mask.h b/cpp/core/dwi/tractography/SIFT/proc_mask.h similarity index 100% rename from src/dwi/tractography/SIFT/proc_mask.h rename to cpp/core/dwi/tractography/SIFT/proc_mask.h diff --git a/src/dwi/tractography/SIFT/sift.cpp b/cpp/core/dwi/tractography/SIFT/sift.cpp similarity index 100% rename from src/dwi/tractography/SIFT/sift.cpp rename to cpp/core/dwi/tractography/SIFT/sift.cpp diff --git a/src/dwi/tractography/SIFT/sift.h b/cpp/core/dwi/tractography/SIFT/sift.h similarity index 100% rename from src/dwi/tractography/SIFT/sift.h rename to cpp/core/dwi/tractography/SIFT/sift.h diff --git a/src/dwi/tractography/SIFT/sifter.cpp b/cpp/core/dwi/tractography/SIFT/sifter.cpp similarity index 100% rename from src/dwi/tractography/SIFT/sifter.cpp rename to cpp/core/dwi/tractography/SIFT/sifter.cpp diff --git a/src/dwi/tractography/SIFT/sifter.h b/cpp/core/dwi/tractography/SIFT/sifter.h similarity index 100% rename from src/dwi/tractography/SIFT/sifter.h rename to cpp/core/dwi/tractography/SIFT/sifter.h diff --git a/src/dwi/tractography/SIFT/track_contribution.cpp b/cpp/core/dwi/tractography/SIFT/track_contribution.cpp similarity index 100% rename from src/dwi/tractography/SIFT/track_contribution.cpp rename to cpp/core/dwi/tractography/SIFT/track_contribution.cpp diff --git a/src/dwi/tractography/SIFT/track_contribution.h b/cpp/core/dwi/tractography/SIFT/track_contribution.h similarity index 100% rename from src/dwi/tractography/SIFT/track_contribution.h rename to cpp/core/dwi/tractography/SIFT/track_contribution.h diff --git a/src/dwi/tractography/SIFT/track_index_range.cpp b/cpp/core/dwi/tractography/SIFT/track_index_range.cpp similarity index 100% rename from src/dwi/tractography/SIFT/track_index_range.cpp rename to cpp/core/dwi/tractography/SIFT/track_index_range.cpp diff --git a/src/dwi/tractography/SIFT/track_index_range.h b/cpp/core/dwi/tractography/SIFT/track_index_range.h similarity index 100% rename from src/dwi/tractography/SIFT/track_index_range.h rename to cpp/core/dwi/tractography/SIFT/track_index_range.h diff --git a/src/dwi/tractography/SIFT/types.h b/cpp/core/dwi/tractography/SIFT/types.h similarity index 100% rename from src/dwi/tractography/SIFT/types.h rename to cpp/core/dwi/tractography/SIFT/types.h diff --git a/src/dwi/tractography/SIFT2/coeff_optimiser.cpp b/cpp/core/dwi/tractography/SIFT2/coeff_optimiser.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/coeff_optimiser.cpp rename to cpp/core/dwi/tractography/SIFT2/coeff_optimiser.cpp diff --git a/src/dwi/tractography/SIFT2/coeff_optimiser.h b/cpp/core/dwi/tractography/SIFT2/coeff_optimiser.h similarity index 100% rename from src/dwi/tractography/SIFT2/coeff_optimiser.h rename to cpp/core/dwi/tractography/SIFT2/coeff_optimiser.h diff --git a/src/dwi/tractography/SIFT2/fixel.h b/cpp/core/dwi/tractography/SIFT2/fixel.h similarity index 100% rename from src/dwi/tractography/SIFT2/fixel.h rename to cpp/core/dwi/tractography/SIFT2/fixel.h diff --git a/src/dwi/tractography/SIFT2/fixel_updater.cpp b/cpp/core/dwi/tractography/SIFT2/fixel_updater.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/fixel_updater.cpp rename to cpp/core/dwi/tractography/SIFT2/fixel_updater.cpp diff --git a/src/dwi/tractography/SIFT2/fixel_updater.h b/cpp/core/dwi/tractography/SIFT2/fixel_updater.h similarity index 100% rename from src/dwi/tractography/SIFT2/fixel_updater.h rename to cpp/core/dwi/tractography/SIFT2/fixel_updater.h diff --git a/src/dwi/tractography/SIFT2/line_search.cpp b/cpp/core/dwi/tractography/SIFT2/line_search.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/line_search.cpp rename to cpp/core/dwi/tractography/SIFT2/line_search.cpp diff --git a/src/dwi/tractography/SIFT2/line_search.h b/cpp/core/dwi/tractography/SIFT2/line_search.h similarity index 100% rename from src/dwi/tractography/SIFT2/line_search.h rename to cpp/core/dwi/tractography/SIFT2/line_search.h diff --git a/src/dwi/tractography/SIFT2/reg_calculator.cpp b/cpp/core/dwi/tractography/SIFT2/reg_calculator.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/reg_calculator.cpp rename to cpp/core/dwi/tractography/SIFT2/reg_calculator.cpp diff --git a/src/dwi/tractography/SIFT2/reg_calculator.h b/cpp/core/dwi/tractography/SIFT2/reg_calculator.h similarity index 100% rename from src/dwi/tractography/SIFT2/reg_calculator.h rename to cpp/core/dwi/tractography/SIFT2/reg_calculator.h diff --git a/src/dwi/tractography/SIFT2/regularisation.h b/cpp/core/dwi/tractography/SIFT2/regularisation.h similarity index 100% rename from src/dwi/tractography/SIFT2/regularisation.h rename to cpp/core/dwi/tractography/SIFT2/regularisation.h diff --git a/src/dwi/tractography/SIFT2/streamline_stats.cpp b/cpp/core/dwi/tractography/SIFT2/streamline_stats.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/streamline_stats.cpp rename to cpp/core/dwi/tractography/SIFT2/streamline_stats.cpp diff --git a/src/dwi/tractography/SIFT2/streamline_stats.h b/cpp/core/dwi/tractography/SIFT2/streamline_stats.h similarity index 100% rename from src/dwi/tractography/SIFT2/streamline_stats.h rename to cpp/core/dwi/tractography/SIFT2/streamline_stats.h diff --git a/src/dwi/tractography/SIFT2/tckfactor.cpp b/cpp/core/dwi/tractography/SIFT2/tckfactor.cpp similarity index 100% rename from src/dwi/tractography/SIFT2/tckfactor.cpp rename to cpp/core/dwi/tractography/SIFT2/tckfactor.cpp diff --git a/src/dwi/tractography/SIFT2/tckfactor.h b/cpp/core/dwi/tractography/SIFT2/tckfactor.h similarity index 100% rename from src/dwi/tractography/SIFT2/tckfactor.h rename to cpp/core/dwi/tractography/SIFT2/tckfactor.h diff --git a/src/dwi/tractography/algorithms/calibrator.h b/cpp/core/dwi/tractography/algorithms/calibrator.h similarity index 100% rename from src/dwi/tractography/algorithms/calibrator.h rename to cpp/core/dwi/tractography/algorithms/calibrator.h diff --git a/src/dwi/tractography/algorithms/fact.h b/cpp/core/dwi/tractography/algorithms/fact.h similarity index 100% rename from src/dwi/tractography/algorithms/fact.h rename to cpp/core/dwi/tractography/algorithms/fact.h diff --git a/src/dwi/tractography/algorithms/iFOD1.cpp b/cpp/core/dwi/tractography/algorithms/iFOD1.cpp similarity index 100% rename from src/dwi/tractography/algorithms/iFOD1.cpp rename to cpp/core/dwi/tractography/algorithms/iFOD1.cpp diff --git a/src/dwi/tractography/algorithms/iFOD1.h b/cpp/core/dwi/tractography/algorithms/iFOD1.h similarity index 100% rename from src/dwi/tractography/algorithms/iFOD1.h rename to cpp/core/dwi/tractography/algorithms/iFOD1.h diff --git a/src/dwi/tractography/algorithms/iFOD2.cpp b/cpp/core/dwi/tractography/algorithms/iFOD2.cpp similarity index 100% rename from src/dwi/tractography/algorithms/iFOD2.cpp rename to cpp/core/dwi/tractography/algorithms/iFOD2.cpp diff --git a/src/dwi/tractography/algorithms/iFOD2.h b/cpp/core/dwi/tractography/algorithms/iFOD2.h similarity index 100% rename from src/dwi/tractography/algorithms/iFOD2.h rename to cpp/core/dwi/tractography/algorithms/iFOD2.h diff --git a/src/dwi/tractography/algorithms/nulldist.h b/cpp/core/dwi/tractography/algorithms/nulldist.h similarity index 100% rename from src/dwi/tractography/algorithms/nulldist.h rename to cpp/core/dwi/tractography/algorithms/nulldist.h diff --git a/src/dwi/tractography/algorithms/sd_stream.h b/cpp/core/dwi/tractography/algorithms/sd_stream.h similarity index 100% rename from src/dwi/tractography/algorithms/sd_stream.h rename to cpp/core/dwi/tractography/algorithms/sd_stream.h diff --git a/src/dwi/tractography/algorithms/seedtest.h b/cpp/core/dwi/tractography/algorithms/seedtest.h similarity index 100% rename from src/dwi/tractography/algorithms/seedtest.h rename to cpp/core/dwi/tractography/algorithms/seedtest.h diff --git a/src/dwi/tractography/algorithms/tensor_det.h b/cpp/core/dwi/tractography/algorithms/tensor_det.h similarity index 100% rename from src/dwi/tractography/algorithms/tensor_det.h rename to cpp/core/dwi/tractography/algorithms/tensor_det.h diff --git a/src/dwi/tractography/algorithms/tensor_prob.h b/cpp/core/dwi/tractography/algorithms/tensor_prob.h similarity index 100% rename from src/dwi/tractography/algorithms/tensor_prob.h rename to cpp/core/dwi/tractography/algorithms/tensor_prob.h diff --git a/src/dwi/tractography/connectome/connectome.cpp b/cpp/core/dwi/tractography/connectome/connectome.cpp similarity index 100% rename from src/dwi/tractography/connectome/connectome.cpp rename to cpp/core/dwi/tractography/connectome/connectome.cpp diff --git a/src/dwi/tractography/connectome/connectome.h b/cpp/core/dwi/tractography/connectome/connectome.h similarity index 100% rename from src/dwi/tractography/connectome/connectome.h rename to cpp/core/dwi/tractography/connectome/connectome.h diff --git a/src/dwi/tractography/connectome/exemplar.cpp b/cpp/core/dwi/tractography/connectome/exemplar.cpp similarity index 100% rename from src/dwi/tractography/connectome/exemplar.cpp rename to cpp/core/dwi/tractography/connectome/exemplar.cpp diff --git a/src/dwi/tractography/connectome/exemplar.h b/cpp/core/dwi/tractography/connectome/exemplar.h similarity index 100% rename from src/dwi/tractography/connectome/exemplar.h rename to cpp/core/dwi/tractography/connectome/exemplar.h diff --git a/src/dwi/tractography/connectome/extract.cpp b/cpp/core/dwi/tractography/connectome/extract.cpp similarity index 100% rename from src/dwi/tractography/connectome/extract.cpp rename to cpp/core/dwi/tractography/connectome/extract.cpp diff --git a/src/dwi/tractography/connectome/extract.h b/cpp/core/dwi/tractography/connectome/extract.h similarity index 100% rename from src/dwi/tractography/connectome/extract.h rename to cpp/core/dwi/tractography/connectome/extract.h diff --git a/src/dwi/tractography/connectome/mapped_track.h b/cpp/core/dwi/tractography/connectome/mapped_track.h similarity index 100% rename from src/dwi/tractography/connectome/mapped_track.h rename to cpp/core/dwi/tractography/connectome/mapped_track.h diff --git a/src/dwi/tractography/connectome/mapper.h b/cpp/core/dwi/tractography/connectome/mapper.h similarity index 100% rename from src/dwi/tractography/connectome/mapper.h rename to cpp/core/dwi/tractography/connectome/mapper.h diff --git a/src/dwi/tractography/connectome/matrix.cpp b/cpp/core/dwi/tractography/connectome/matrix.cpp similarity index 100% rename from src/dwi/tractography/connectome/matrix.cpp rename to cpp/core/dwi/tractography/connectome/matrix.cpp diff --git a/src/dwi/tractography/connectome/matrix.h b/cpp/core/dwi/tractography/connectome/matrix.h similarity index 100% rename from src/dwi/tractography/connectome/matrix.h rename to cpp/core/dwi/tractography/connectome/matrix.h diff --git a/src/dwi/tractography/connectome/metric.h b/cpp/core/dwi/tractography/connectome/metric.h similarity index 100% rename from src/dwi/tractography/connectome/metric.h rename to cpp/core/dwi/tractography/connectome/metric.h diff --git a/src/dwi/tractography/connectome/streamline.h b/cpp/core/dwi/tractography/connectome/streamline.h similarity index 100% rename from src/dwi/tractography/connectome/streamline.h rename to cpp/core/dwi/tractography/connectome/streamline.h diff --git a/src/dwi/tractography/connectome/tck2nodes.cpp b/cpp/core/dwi/tractography/connectome/tck2nodes.cpp similarity index 100% rename from src/dwi/tractography/connectome/tck2nodes.cpp rename to cpp/core/dwi/tractography/connectome/tck2nodes.cpp diff --git a/src/dwi/tractography/connectome/tck2nodes.h b/cpp/core/dwi/tractography/connectome/tck2nodes.h similarity index 100% rename from src/dwi/tractography/connectome/tck2nodes.h rename to cpp/core/dwi/tractography/connectome/tck2nodes.h diff --git a/src/dwi/tractography/editing/editing.cpp b/cpp/core/dwi/tractography/editing/editing.cpp similarity index 100% rename from src/dwi/tractography/editing/editing.cpp rename to cpp/core/dwi/tractography/editing/editing.cpp diff --git a/src/dwi/tractography/editing/editing.h b/cpp/core/dwi/tractography/editing/editing.h similarity index 100% rename from src/dwi/tractography/editing/editing.h rename to cpp/core/dwi/tractography/editing/editing.h diff --git a/src/dwi/tractography/editing/loader.h b/cpp/core/dwi/tractography/editing/loader.h similarity index 100% rename from src/dwi/tractography/editing/loader.h rename to cpp/core/dwi/tractography/editing/loader.h diff --git a/src/dwi/tractography/editing/receiver.cpp b/cpp/core/dwi/tractography/editing/receiver.cpp similarity index 100% rename from src/dwi/tractography/editing/receiver.cpp rename to cpp/core/dwi/tractography/editing/receiver.cpp diff --git a/src/dwi/tractography/editing/receiver.h b/cpp/core/dwi/tractography/editing/receiver.h similarity index 100% rename from src/dwi/tractography/editing/receiver.h rename to cpp/core/dwi/tractography/editing/receiver.h diff --git a/src/dwi/tractography/editing/worker.cpp b/cpp/core/dwi/tractography/editing/worker.cpp similarity index 100% rename from src/dwi/tractography/editing/worker.cpp rename to cpp/core/dwi/tractography/editing/worker.cpp diff --git a/src/dwi/tractography/editing/worker.h b/cpp/core/dwi/tractography/editing/worker.h similarity index 100% rename from src/dwi/tractography/editing/worker.h rename to cpp/core/dwi/tractography/editing/worker.h diff --git a/src/dwi/tractography/file.h b/cpp/core/dwi/tractography/file.h similarity index 100% rename from src/dwi/tractography/file.h rename to cpp/core/dwi/tractography/file.h diff --git a/src/dwi/tractography/file_base.cpp b/cpp/core/dwi/tractography/file_base.cpp similarity index 100% rename from src/dwi/tractography/file_base.cpp rename to cpp/core/dwi/tractography/file_base.cpp diff --git a/src/dwi/tractography/file_base.h b/cpp/core/dwi/tractography/file_base.h similarity index 100% rename from src/dwi/tractography/file_base.h rename to cpp/core/dwi/tractography/file_base.h diff --git a/src/dwi/tractography/handlers/streamline2.h b/cpp/core/dwi/tractography/handlers/streamline2.h similarity index 100% rename from src/dwi/tractography/handlers/streamline2.h rename to cpp/core/dwi/tractography/handlers/streamline2.h diff --git a/src/dwi/tractography/mapping/buffer_scratch_dump.h b/cpp/core/dwi/tractography/mapping/buffer_scratch_dump.h similarity index 100% rename from src/dwi/tractography/mapping/buffer_scratch_dump.h rename to cpp/core/dwi/tractography/mapping/buffer_scratch_dump.h diff --git a/src/dwi/tractography/mapping/fixel_td_map.cpp b/cpp/core/dwi/tractography/mapping/fixel_td_map.cpp similarity index 100% rename from src/dwi/tractography/mapping/fixel_td_map.cpp rename to cpp/core/dwi/tractography/mapping/fixel_td_map.cpp diff --git a/src/dwi/tractography/mapping/fixel_td_map.h b/cpp/core/dwi/tractography/mapping/fixel_td_map.h similarity index 100% rename from src/dwi/tractography/mapping/fixel_td_map.h rename to cpp/core/dwi/tractography/mapping/fixel_td_map.h diff --git a/src/dwi/tractography/mapping/gaussian/mapper.cpp b/cpp/core/dwi/tractography/mapping/gaussian/mapper.cpp similarity index 100% rename from src/dwi/tractography/mapping/gaussian/mapper.cpp rename to cpp/core/dwi/tractography/mapping/gaussian/mapper.cpp diff --git a/src/dwi/tractography/mapping/gaussian/mapper.h b/cpp/core/dwi/tractography/mapping/gaussian/mapper.h similarity index 100% rename from src/dwi/tractography/mapping/gaussian/mapper.h rename to cpp/core/dwi/tractography/mapping/gaussian/mapper.h diff --git a/src/dwi/tractography/mapping/gaussian/voxel.h b/cpp/core/dwi/tractography/mapping/gaussian/voxel.h similarity index 100% rename from src/dwi/tractography/mapping/gaussian/voxel.h rename to cpp/core/dwi/tractography/mapping/gaussian/voxel.h diff --git a/src/dwi/tractography/mapping/loader.h b/cpp/core/dwi/tractography/mapping/loader.h similarity index 100% rename from src/dwi/tractography/mapping/loader.h rename to cpp/core/dwi/tractography/mapping/loader.h diff --git a/src/dwi/tractography/mapping/mapper.cpp b/cpp/core/dwi/tractography/mapping/mapper.cpp similarity index 100% rename from src/dwi/tractography/mapping/mapper.cpp rename to cpp/core/dwi/tractography/mapping/mapper.cpp diff --git a/src/dwi/tractography/mapping/mapper.h b/cpp/core/dwi/tractography/mapping/mapper.h similarity index 100% rename from src/dwi/tractography/mapping/mapper.h rename to cpp/core/dwi/tractography/mapping/mapper.h diff --git a/src/dwi/tractography/mapping/mapper_plugins.cpp b/cpp/core/dwi/tractography/mapping/mapper_plugins.cpp similarity index 100% rename from src/dwi/tractography/mapping/mapper_plugins.cpp rename to cpp/core/dwi/tractography/mapping/mapper_plugins.cpp diff --git a/src/dwi/tractography/mapping/mapper_plugins.h b/cpp/core/dwi/tractography/mapping/mapper_plugins.h similarity index 100% rename from src/dwi/tractography/mapping/mapper_plugins.h rename to cpp/core/dwi/tractography/mapping/mapper_plugins.h diff --git a/src/dwi/tractography/mapping/mapping.cpp b/cpp/core/dwi/tractography/mapping/mapping.cpp similarity index 100% rename from src/dwi/tractography/mapping/mapping.cpp rename to cpp/core/dwi/tractography/mapping/mapping.cpp diff --git a/src/dwi/tractography/mapping/mapping.h b/cpp/core/dwi/tractography/mapping/mapping.h similarity index 100% rename from src/dwi/tractography/mapping/mapping.h rename to cpp/core/dwi/tractography/mapping/mapping.h diff --git a/src/dwi/tractography/mapping/twi_stats.cpp b/cpp/core/dwi/tractography/mapping/twi_stats.cpp similarity index 100% rename from src/dwi/tractography/mapping/twi_stats.cpp rename to cpp/core/dwi/tractography/mapping/twi_stats.cpp diff --git a/src/dwi/tractography/mapping/twi_stats.h b/cpp/core/dwi/tractography/mapping/twi_stats.h similarity index 100% rename from src/dwi/tractography/mapping/twi_stats.h rename to cpp/core/dwi/tractography/mapping/twi_stats.h diff --git a/src/dwi/tractography/mapping/voxel.cpp b/cpp/core/dwi/tractography/mapping/voxel.cpp similarity index 100% rename from src/dwi/tractography/mapping/voxel.cpp rename to cpp/core/dwi/tractography/mapping/voxel.cpp diff --git a/src/dwi/tractography/mapping/voxel.h b/cpp/core/dwi/tractography/mapping/voxel.h similarity index 100% rename from src/dwi/tractography/mapping/voxel.h rename to cpp/core/dwi/tractography/mapping/voxel.h diff --git a/src/dwi/tractography/mapping/writer.cpp b/cpp/core/dwi/tractography/mapping/writer.cpp similarity index 100% rename from src/dwi/tractography/mapping/writer.cpp rename to cpp/core/dwi/tractography/mapping/writer.cpp diff --git a/src/dwi/tractography/mapping/writer.h b/cpp/core/dwi/tractography/mapping/writer.h similarity index 100% rename from src/dwi/tractography/mapping/writer.h rename to cpp/core/dwi/tractography/mapping/writer.h diff --git a/src/dwi/tractography/properties.cpp b/cpp/core/dwi/tractography/properties.cpp similarity index 100% rename from src/dwi/tractography/properties.cpp rename to cpp/core/dwi/tractography/properties.cpp diff --git a/src/dwi/tractography/properties.h b/cpp/core/dwi/tractography/properties.h similarity index 100% rename from src/dwi/tractography/properties.h rename to cpp/core/dwi/tractography/properties.h diff --git a/src/dwi/tractography/resampling/arc.cpp b/cpp/core/dwi/tractography/resampling/arc.cpp similarity index 100% rename from src/dwi/tractography/resampling/arc.cpp rename to cpp/core/dwi/tractography/resampling/arc.cpp diff --git a/src/dwi/tractography/resampling/arc.h b/cpp/core/dwi/tractography/resampling/arc.h similarity index 100% rename from src/dwi/tractography/resampling/arc.h rename to cpp/core/dwi/tractography/resampling/arc.h diff --git a/src/dwi/tractography/resampling/downsampler.cpp b/cpp/core/dwi/tractography/resampling/downsampler.cpp similarity index 100% rename from src/dwi/tractography/resampling/downsampler.cpp rename to cpp/core/dwi/tractography/resampling/downsampler.cpp diff --git a/src/dwi/tractography/resampling/downsampler.h b/cpp/core/dwi/tractography/resampling/downsampler.h similarity index 100% rename from src/dwi/tractography/resampling/downsampler.h rename to cpp/core/dwi/tractography/resampling/downsampler.h diff --git a/src/dwi/tractography/resampling/endpoints.cpp b/cpp/core/dwi/tractography/resampling/endpoints.cpp similarity index 100% rename from src/dwi/tractography/resampling/endpoints.cpp rename to cpp/core/dwi/tractography/resampling/endpoints.cpp diff --git a/src/dwi/tractography/resampling/endpoints.h b/cpp/core/dwi/tractography/resampling/endpoints.h similarity index 100% rename from src/dwi/tractography/resampling/endpoints.h rename to cpp/core/dwi/tractography/resampling/endpoints.h diff --git a/src/dwi/tractography/resampling/fixed_num_points.cpp b/cpp/core/dwi/tractography/resampling/fixed_num_points.cpp similarity index 100% rename from src/dwi/tractography/resampling/fixed_num_points.cpp rename to cpp/core/dwi/tractography/resampling/fixed_num_points.cpp diff --git a/src/dwi/tractography/resampling/fixed_num_points.h b/cpp/core/dwi/tractography/resampling/fixed_num_points.h similarity index 100% rename from src/dwi/tractography/resampling/fixed_num_points.h rename to cpp/core/dwi/tractography/resampling/fixed_num_points.h diff --git a/src/dwi/tractography/resampling/fixed_step_size.cpp b/cpp/core/dwi/tractography/resampling/fixed_step_size.cpp similarity index 100% rename from src/dwi/tractography/resampling/fixed_step_size.cpp rename to cpp/core/dwi/tractography/resampling/fixed_step_size.cpp diff --git a/src/dwi/tractography/resampling/fixed_step_size.h b/cpp/core/dwi/tractography/resampling/fixed_step_size.h similarity index 100% rename from src/dwi/tractography/resampling/fixed_step_size.h rename to cpp/core/dwi/tractography/resampling/fixed_step_size.h diff --git a/src/dwi/tractography/resampling/resampling.cpp b/cpp/core/dwi/tractography/resampling/resampling.cpp similarity index 100% rename from src/dwi/tractography/resampling/resampling.cpp rename to cpp/core/dwi/tractography/resampling/resampling.cpp diff --git a/src/dwi/tractography/resampling/resampling.h b/cpp/core/dwi/tractography/resampling/resampling.h similarity index 100% rename from src/dwi/tractography/resampling/resampling.h rename to cpp/core/dwi/tractography/resampling/resampling.h diff --git a/src/dwi/tractography/resampling/upsampler.cpp b/cpp/core/dwi/tractography/resampling/upsampler.cpp similarity index 100% rename from src/dwi/tractography/resampling/upsampler.cpp rename to cpp/core/dwi/tractography/resampling/upsampler.cpp diff --git a/src/dwi/tractography/resampling/upsampler.h b/cpp/core/dwi/tractography/resampling/upsampler.h similarity index 100% rename from src/dwi/tractography/resampling/upsampler.h rename to cpp/core/dwi/tractography/resampling/upsampler.h diff --git a/src/dwi/tractography/rng.cpp b/cpp/core/dwi/tractography/rng.cpp similarity index 100% rename from src/dwi/tractography/rng.cpp rename to cpp/core/dwi/tractography/rng.cpp diff --git a/src/dwi/tractography/rng.h b/cpp/core/dwi/tractography/rng.h similarity index 100% rename from src/dwi/tractography/rng.h rename to cpp/core/dwi/tractography/rng.h diff --git a/src/dwi/tractography/roi.cpp b/cpp/core/dwi/tractography/roi.cpp similarity index 100% rename from src/dwi/tractography/roi.cpp rename to cpp/core/dwi/tractography/roi.cpp diff --git a/src/dwi/tractography/roi.h b/cpp/core/dwi/tractography/roi.h similarity index 100% rename from src/dwi/tractography/roi.h rename to cpp/core/dwi/tractography/roi.h diff --git a/src/dwi/tractography/scalar_file.h b/cpp/core/dwi/tractography/scalar_file.h similarity index 100% rename from src/dwi/tractography/scalar_file.h rename to cpp/core/dwi/tractography/scalar_file.h diff --git a/src/dwi/tractography/seeding/base.h b/cpp/core/dwi/tractography/seeding/base.h similarity index 100% rename from src/dwi/tractography/seeding/base.h rename to cpp/core/dwi/tractography/seeding/base.h diff --git a/src/dwi/tractography/seeding/basic.cpp b/cpp/core/dwi/tractography/seeding/basic.cpp similarity index 100% rename from src/dwi/tractography/seeding/basic.cpp rename to cpp/core/dwi/tractography/seeding/basic.cpp diff --git a/src/dwi/tractography/seeding/basic.h b/cpp/core/dwi/tractography/seeding/basic.h similarity index 100% rename from src/dwi/tractography/seeding/basic.h rename to cpp/core/dwi/tractography/seeding/basic.h diff --git a/src/dwi/tractography/seeding/dynamic.cpp b/cpp/core/dwi/tractography/seeding/dynamic.cpp similarity index 100% rename from src/dwi/tractography/seeding/dynamic.cpp rename to cpp/core/dwi/tractography/seeding/dynamic.cpp diff --git a/src/dwi/tractography/seeding/dynamic.h b/cpp/core/dwi/tractography/seeding/dynamic.h similarity index 100% rename from src/dwi/tractography/seeding/dynamic.h rename to cpp/core/dwi/tractography/seeding/dynamic.h diff --git a/src/dwi/tractography/seeding/gmwmi.cpp b/cpp/core/dwi/tractography/seeding/gmwmi.cpp similarity index 100% rename from src/dwi/tractography/seeding/gmwmi.cpp rename to cpp/core/dwi/tractography/seeding/gmwmi.cpp diff --git a/src/dwi/tractography/seeding/gmwmi.h b/cpp/core/dwi/tractography/seeding/gmwmi.h similarity index 100% rename from src/dwi/tractography/seeding/gmwmi.h rename to cpp/core/dwi/tractography/seeding/gmwmi.h diff --git a/src/dwi/tractography/seeding/list.cpp b/cpp/core/dwi/tractography/seeding/list.cpp similarity index 100% rename from src/dwi/tractography/seeding/list.cpp rename to cpp/core/dwi/tractography/seeding/list.cpp diff --git a/src/dwi/tractography/seeding/list.h b/cpp/core/dwi/tractography/seeding/list.h similarity index 100% rename from src/dwi/tractography/seeding/list.h rename to cpp/core/dwi/tractography/seeding/list.h diff --git a/src/dwi/tractography/seeding/seeding.cpp b/cpp/core/dwi/tractography/seeding/seeding.cpp similarity index 100% rename from src/dwi/tractography/seeding/seeding.cpp rename to cpp/core/dwi/tractography/seeding/seeding.cpp diff --git a/src/dwi/tractography/seeding/seeding.h b/cpp/core/dwi/tractography/seeding/seeding.h similarity index 100% rename from src/dwi/tractography/seeding/seeding.h rename to cpp/core/dwi/tractography/seeding/seeding.h diff --git a/src/dwi/tractography/streamline.h b/cpp/core/dwi/tractography/streamline.h similarity index 100% rename from src/dwi/tractography/streamline.h rename to cpp/core/dwi/tractography/streamline.h diff --git a/src/dwi/tractography/tracking/early_exit.cpp b/cpp/core/dwi/tractography/tracking/early_exit.cpp similarity index 100% rename from src/dwi/tractography/tracking/early_exit.cpp rename to cpp/core/dwi/tractography/tracking/early_exit.cpp diff --git a/src/dwi/tractography/tracking/early_exit.h b/cpp/core/dwi/tractography/tracking/early_exit.h similarity index 100% rename from src/dwi/tractography/tracking/early_exit.h rename to cpp/core/dwi/tractography/tracking/early_exit.h diff --git a/src/dwi/tractography/tracking/exec.h b/cpp/core/dwi/tractography/tracking/exec.h similarity index 100% rename from src/dwi/tractography/tracking/exec.h rename to cpp/core/dwi/tractography/tracking/exec.h diff --git a/src/dwi/tractography/tracking/generated_track.h b/cpp/core/dwi/tractography/tracking/generated_track.h similarity index 100% rename from src/dwi/tractography/tracking/generated_track.h rename to cpp/core/dwi/tractography/tracking/generated_track.h diff --git a/src/dwi/tractography/tracking/method.cpp b/cpp/core/dwi/tractography/tracking/method.cpp similarity index 100% rename from src/dwi/tractography/tracking/method.cpp rename to cpp/core/dwi/tractography/tracking/method.cpp diff --git a/src/dwi/tractography/tracking/method.h b/cpp/core/dwi/tractography/tracking/method.h similarity index 100% rename from src/dwi/tractography/tracking/method.h rename to cpp/core/dwi/tractography/tracking/method.h diff --git a/src/dwi/tractography/tracking/shared.cpp b/cpp/core/dwi/tractography/tracking/shared.cpp similarity index 100% rename from src/dwi/tractography/tracking/shared.cpp rename to cpp/core/dwi/tractography/tracking/shared.cpp diff --git a/src/dwi/tractography/tracking/shared.h b/cpp/core/dwi/tractography/tracking/shared.h similarity index 100% rename from src/dwi/tractography/tracking/shared.h rename to cpp/core/dwi/tractography/tracking/shared.h diff --git a/src/dwi/tractography/tracking/tractography.cpp b/cpp/core/dwi/tractography/tracking/tractography.cpp similarity index 100% rename from src/dwi/tractography/tracking/tractography.cpp rename to cpp/core/dwi/tractography/tracking/tractography.cpp diff --git a/src/dwi/tractography/tracking/tractography.h b/cpp/core/dwi/tractography/tracking/tractography.h similarity index 100% rename from src/dwi/tractography/tracking/tractography.h rename to cpp/core/dwi/tractography/tracking/tractography.h diff --git a/src/dwi/tractography/tracking/types.h b/cpp/core/dwi/tractography/tracking/types.h similarity index 100% rename from src/dwi/tractography/tracking/types.h rename to cpp/core/dwi/tractography/tracking/types.h diff --git a/src/dwi/tractography/tracking/write_kernel.cpp b/cpp/core/dwi/tractography/tracking/write_kernel.cpp similarity index 100% rename from src/dwi/tractography/tracking/write_kernel.cpp rename to cpp/core/dwi/tractography/tracking/write_kernel.cpp diff --git a/src/dwi/tractography/tracking/write_kernel.h b/cpp/core/dwi/tractography/tracking/write_kernel.h similarity index 100% rename from src/dwi/tractography/tracking/write_kernel.h rename to cpp/core/dwi/tractography/tracking/write_kernel.h diff --git a/src/dwi/tractography/weights.cpp b/cpp/core/dwi/tractography/weights.cpp similarity index 100% rename from src/dwi/tractography/weights.cpp rename to cpp/core/dwi/tractography/weights.cpp diff --git a/src/dwi/tractography/weights.h b/cpp/core/dwi/tractography/weights.h similarity index 100% rename from src/dwi/tractography/weights.h rename to cpp/core/dwi/tractography/weights.h diff --git a/core/eigen_plugins/array.h b/cpp/core/eigen_plugins/array.h similarity index 100% rename from core/eigen_plugins/array.h rename to cpp/core/eigen_plugins/array.h diff --git a/core/eigen_plugins/dense_base.h b/cpp/core/eigen_plugins/dense_base.h similarity index 100% rename from core/eigen_plugins/dense_base.h rename to cpp/core/eigen_plugins/dense_base.h diff --git a/core/eigen_plugins/matrix.h b/cpp/core/eigen_plugins/matrix.h similarity index 100% rename from core/eigen_plugins/matrix.h rename to cpp/core/eigen_plugins/matrix.h diff --git a/core/exception.cpp b/cpp/core/exception.cpp similarity index 100% rename from core/exception.cpp rename to cpp/core/exception.cpp diff --git a/core/exception.h b/cpp/core/exception.h similarity index 100% rename from core/exception.h rename to cpp/core/exception.h diff --git a/cpp/core/executable_version.cpp.in b/cpp/core/executable_version.cpp.in new file mode 100644 index 0000000000..8f9ce69bca --- /dev/null +++ b/cpp/core/executable_version.cpp.in @@ -0,0 +1,5 @@ +#include "executable_version.h" + +namespace MR::App { +const std::string mrtrix_executable_version = "@MRTRIX_VERSION@"; +} diff --git a/src/exec_version.h b/cpp/core/executable_version.h similarity index 88% rename from src/exec_version.h rename to cpp/core/executable_version.h index a5533b4271..ca85af1c7f 100644 --- a/src/exec_version.h +++ b/cpp/core/executable_version.h @@ -15,7 +15,8 @@ */ #pragma once +#include namespace MR::App { -void set_executable_uses_mrtrix_version(); -} +extern const std::string mrtrix_executable_version; +} // namespace MR::App diff --git a/core/fetch_store.cpp b/cpp/core/fetch_store.cpp similarity index 100% rename from core/fetch_store.cpp rename to cpp/core/fetch_store.cpp diff --git a/core/fetch_store.h b/cpp/core/fetch_store.h similarity index 100% rename from core/fetch_store.h rename to cpp/core/fetch_store.h diff --git a/core/file/config.cpp b/cpp/core/file/config.cpp similarity index 100% rename from core/file/config.cpp rename to cpp/core/file/config.cpp diff --git a/core/file/config.h b/cpp/core/file/config.h similarity index 100% rename from core/file/config.h rename to cpp/core/file/config.h diff --git a/core/file/copy.h b/cpp/core/file/copy.h similarity index 100% rename from core/file/copy.h rename to cpp/core/file/copy.h diff --git a/core/file/dicom/csa_entry.h b/cpp/core/file/dicom/csa_entry.h similarity index 100% rename from core/file/dicom/csa_entry.h rename to cpp/core/file/dicom/csa_entry.h diff --git a/core/file/dicom/definitions.h b/cpp/core/file/dicom/definitions.h similarity index 100% rename from core/file/dicom/definitions.h rename to cpp/core/file/dicom/definitions.h diff --git a/core/file/dicom/dict.cpp b/cpp/core/file/dicom/dict.cpp similarity index 100% rename from core/file/dicom/dict.cpp rename to cpp/core/file/dicom/dict.cpp diff --git a/core/file/dicom/element.cpp b/cpp/core/file/dicom/element.cpp similarity index 100% rename from core/file/dicom/element.cpp rename to cpp/core/file/dicom/element.cpp diff --git a/core/file/dicom/element.h b/cpp/core/file/dicom/element.h similarity index 100% rename from core/file/dicom/element.h rename to cpp/core/file/dicom/element.h diff --git a/core/file/dicom/image.cpp b/cpp/core/file/dicom/image.cpp similarity index 100% rename from core/file/dicom/image.cpp rename to cpp/core/file/dicom/image.cpp diff --git a/core/file/dicom/image.h b/cpp/core/file/dicom/image.h similarity index 100% rename from core/file/dicom/image.h rename to cpp/core/file/dicom/image.h diff --git a/core/file/dicom/mapper.cpp b/cpp/core/file/dicom/mapper.cpp similarity index 100% rename from core/file/dicom/mapper.cpp rename to cpp/core/file/dicom/mapper.cpp diff --git a/core/file/dicom/mapper.h b/cpp/core/file/dicom/mapper.h similarity index 100% rename from core/file/dicom/mapper.h rename to cpp/core/file/dicom/mapper.h diff --git a/core/file/dicom/patient.cpp b/cpp/core/file/dicom/patient.cpp similarity index 100% rename from core/file/dicom/patient.cpp rename to cpp/core/file/dicom/patient.cpp diff --git a/core/file/dicom/patient.h b/cpp/core/file/dicom/patient.h similarity index 100% rename from core/file/dicom/patient.h rename to cpp/core/file/dicom/patient.h diff --git a/core/file/dicom/quick_scan.cpp b/cpp/core/file/dicom/quick_scan.cpp similarity index 100% rename from core/file/dicom/quick_scan.cpp rename to cpp/core/file/dicom/quick_scan.cpp diff --git a/core/file/dicom/quick_scan.h b/cpp/core/file/dicom/quick_scan.h similarity index 100% rename from core/file/dicom/quick_scan.h rename to cpp/core/file/dicom/quick_scan.h diff --git a/core/file/dicom/select_cmdline.cpp b/cpp/core/file/dicom/select_cmdline.cpp similarity index 100% rename from core/file/dicom/select_cmdline.cpp rename to cpp/core/file/dicom/select_cmdline.cpp diff --git a/core/file/dicom/series.cpp b/cpp/core/file/dicom/series.cpp similarity index 100% rename from core/file/dicom/series.cpp rename to cpp/core/file/dicom/series.cpp diff --git a/core/file/dicom/series.h b/cpp/core/file/dicom/series.h similarity index 100% rename from core/file/dicom/series.h rename to cpp/core/file/dicom/series.h diff --git a/core/file/dicom/study.cpp b/cpp/core/file/dicom/study.cpp similarity index 100% rename from core/file/dicom/study.cpp rename to cpp/core/file/dicom/study.cpp diff --git a/core/file/dicom/study.h b/cpp/core/file/dicom/study.h similarity index 100% rename from core/file/dicom/study.h rename to cpp/core/file/dicom/study.h diff --git a/core/file/dicom/tree.cpp b/cpp/core/file/dicom/tree.cpp similarity index 100% rename from core/file/dicom/tree.cpp rename to cpp/core/file/dicom/tree.cpp diff --git a/core/file/dicom/tree.h b/cpp/core/file/dicom/tree.h similarity index 100% rename from core/file/dicom/tree.h rename to cpp/core/file/dicom/tree.h diff --git a/core/file/entry.h b/cpp/core/file/entry.h similarity index 100% rename from core/file/entry.h rename to cpp/core/file/entry.h diff --git a/core/file/gz.h b/cpp/core/file/gz.h similarity index 100% rename from core/file/gz.h rename to cpp/core/file/gz.h diff --git a/core/file/json_utils.cpp b/cpp/core/file/json_utils.cpp similarity index 100% rename from core/file/json_utils.cpp rename to cpp/core/file/json_utils.cpp diff --git a/core/file/json_utils.h b/cpp/core/file/json_utils.h similarity index 100% rename from core/file/json_utils.h rename to cpp/core/file/json_utils.h diff --git a/core/file/key_value.cpp b/cpp/core/file/key_value.cpp similarity index 100% rename from core/file/key_value.cpp rename to cpp/core/file/key_value.cpp diff --git a/core/file/key_value.h b/cpp/core/file/key_value.h similarity index 100% rename from core/file/key_value.h rename to cpp/core/file/key_value.h diff --git a/core/file/matrix.h b/cpp/core/file/matrix.h similarity index 100% rename from core/file/matrix.h rename to cpp/core/file/matrix.h diff --git a/core/file/mgh.cpp b/cpp/core/file/mgh.cpp similarity index 100% rename from core/file/mgh.cpp rename to cpp/core/file/mgh.cpp diff --git a/core/file/mgh.h b/cpp/core/file/mgh.h similarity index 100% rename from core/file/mgh.h rename to cpp/core/file/mgh.h diff --git a/core/file/mmap.cpp b/cpp/core/file/mmap.cpp similarity index 100% rename from core/file/mmap.cpp rename to cpp/core/file/mmap.cpp diff --git a/core/file/mmap.h b/cpp/core/file/mmap.h similarity index 100% rename from core/file/mmap.h rename to cpp/core/file/mmap.h diff --git a/core/file/name_parser.cpp b/cpp/core/file/name_parser.cpp similarity index 100% rename from core/file/name_parser.cpp rename to cpp/core/file/name_parser.cpp diff --git a/core/file/name_parser.h b/cpp/core/file/name_parser.h similarity index 100% rename from core/file/name_parser.h rename to cpp/core/file/name_parser.h diff --git a/core/file/nifti_utils.cpp b/cpp/core/file/nifti_utils.cpp similarity index 100% rename from core/file/nifti_utils.cpp rename to cpp/core/file/nifti_utils.cpp diff --git a/core/file/nifti_utils.h b/cpp/core/file/nifti_utils.h similarity index 100% rename from core/file/nifti_utils.h rename to cpp/core/file/nifti_utils.h diff --git a/core/file/npy.cpp b/cpp/core/file/npy.cpp similarity index 100% rename from core/file/npy.cpp rename to cpp/core/file/npy.cpp diff --git a/core/file/npy.h b/cpp/core/file/npy.h similarity index 100% rename from core/file/npy.h rename to cpp/core/file/npy.h diff --git a/core/file/ofstream.cpp b/cpp/core/file/ofstream.cpp similarity index 100% rename from core/file/ofstream.cpp rename to cpp/core/file/ofstream.cpp diff --git a/core/file/ofstream.h b/cpp/core/file/ofstream.h similarity index 100% rename from core/file/ofstream.h rename to cpp/core/file/ofstream.h diff --git a/core/file/path.h b/cpp/core/file/path.h similarity index 100% rename from core/file/path.h rename to cpp/core/file/path.h diff --git a/core/file/png.cpp b/cpp/core/file/png.cpp similarity index 100% rename from core/file/png.cpp rename to cpp/core/file/png.cpp diff --git a/core/file/png.h b/cpp/core/file/png.h similarity index 100% rename from core/file/png.h rename to cpp/core/file/png.h diff --git a/core/file/pyconfig.h b/cpp/core/file/pyconfig.h similarity index 100% rename from core/file/pyconfig.h rename to cpp/core/file/pyconfig.h diff --git a/core/file/utils.cpp b/cpp/core/file/utils.cpp similarity index 100% rename from core/file/utils.cpp rename to cpp/core/file/utils.cpp diff --git a/core/file/utils.h b/cpp/core/file/utils.h similarity index 100% rename from core/file/utils.h rename to cpp/core/file/utils.h diff --git a/core/filter/base.h b/cpp/core/filter/base.h similarity index 100% rename from core/filter/base.h rename to cpp/core/filter/base.h diff --git a/core/filter/connected_components.cpp b/cpp/core/filter/connected_components.cpp similarity index 100% rename from core/filter/connected_components.cpp rename to cpp/core/filter/connected_components.cpp diff --git a/core/filter/connected_components.h b/cpp/core/filter/connected_components.h similarity index 100% rename from core/filter/connected_components.h rename to cpp/core/filter/connected_components.h diff --git a/core/filter/dilate.h b/cpp/core/filter/dilate.h similarity index 100% rename from core/filter/dilate.h rename to cpp/core/filter/dilate.h diff --git a/core/filter/erode.h b/cpp/core/filter/erode.h similarity index 100% rename from core/filter/erode.h rename to cpp/core/filter/erode.h diff --git a/core/filter/fill.h b/cpp/core/filter/fill.h similarity index 100% rename from core/filter/fill.h rename to cpp/core/filter/fill.h diff --git a/core/filter/gradient.h b/cpp/core/filter/gradient.h similarity index 100% rename from core/filter/gradient.h rename to cpp/core/filter/gradient.h diff --git a/core/filter/mask_clean.h b/cpp/core/filter/mask_clean.h similarity index 100% rename from core/filter/mask_clean.h rename to cpp/core/filter/mask_clean.h diff --git a/core/filter/median.h b/cpp/core/filter/median.h similarity index 100% rename from core/filter/median.h rename to cpp/core/filter/median.h diff --git a/core/filter/normalise.h b/cpp/core/filter/normalise.h similarity index 100% rename from core/filter/normalise.h rename to cpp/core/filter/normalise.h diff --git a/core/filter/optimal_threshold.h b/cpp/core/filter/optimal_threshold.h similarity index 100% rename from core/filter/optimal_threshold.h rename to cpp/core/filter/optimal_threshold.h diff --git a/core/filter/resize.h b/cpp/core/filter/resize.h similarity index 100% rename from core/filter/resize.h rename to cpp/core/filter/resize.h diff --git a/core/filter/reslice.h b/cpp/core/filter/reslice.h similarity index 100% rename from core/filter/reslice.h rename to cpp/core/filter/reslice.h diff --git a/core/filter/smooth.h b/cpp/core/filter/smooth.h similarity index 100% rename from core/filter/smooth.h rename to cpp/core/filter/smooth.h diff --git a/core/filter/warp.h b/cpp/core/filter/warp.h similarity index 100% rename from core/filter/warp.h rename to cpp/core/filter/warp.h diff --git a/core/filter/zclean.h b/cpp/core/filter/zclean.h similarity index 100% rename from core/filter/zclean.h rename to cpp/core/filter/zclean.h diff --git a/src/fixel/filter/base.h b/cpp/core/fixel/filter/base.h similarity index 100% rename from src/fixel/filter/base.h rename to cpp/core/fixel/filter/base.h diff --git a/src/fixel/filter/connect.cpp b/cpp/core/fixel/filter/connect.cpp similarity index 100% rename from src/fixel/filter/connect.cpp rename to cpp/core/fixel/filter/connect.cpp diff --git a/src/fixel/filter/connect.h b/cpp/core/fixel/filter/connect.h similarity index 100% rename from src/fixel/filter/connect.h rename to cpp/core/fixel/filter/connect.h diff --git a/src/fixel/filter/smooth.cpp b/cpp/core/fixel/filter/smooth.cpp similarity index 100% rename from src/fixel/filter/smooth.cpp rename to cpp/core/fixel/filter/smooth.cpp diff --git a/src/fixel/filter/smooth.h b/cpp/core/fixel/filter/smooth.h similarity index 100% rename from src/fixel/filter/smooth.h rename to cpp/core/fixel/filter/smooth.h diff --git a/core/fixel/fixel.cpp b/cpp/core/fixel/fixel.cpp similarity index 97% rename from core/fixel/fixel.cpp rename to cpp/core/fixel/fixel.cpp index 74e75defe9..e5c8f9c085 100644 --- a/core/fixel/fixel.cpp +++ b/cpp/core/fixel/fixel.cpp @@ -15,7 +15,7 @@ */ #include "fixel/fixel.h" -#include "version.h" +#include "mrtrix_version.h" namespace MR::Fixel { diff --git a/core/fixel/fixel.h b/cpp/core/fixel/fixel.h similarity index 100% rename from core/fixel/fixel.h rename to cpp/core/fixel/fixel.h diff --git a/core/fixel/helpers.h b/cpp/core/fixel/helpers.h similarity index 100% rename from core/fixel/helpers.h rename to cpp/core/fixel/helpers.h diff --git a/src/fixel/index_remapper.cpp b/cpp/core/fixel/index_remapper.cpp similarity index 100% rename from src/fixel/index_remapper.cpp rename to cpp/core/fixel/index_remapper.cpp diff --git a/src/fixel/index_remapper.h b/cpp/core/fixel/index_remapper.h similarity index 100% rename from src/fixel/index_remapper.h rename to cpp/core/fixel/index_remapper.h diff --git a/core/fixel/legacy/fixel_metric.h b/cpp/core/fixel/legacy/fixel_metric.h similarity index 100% rename from core/fixel/legacy/fixel_metric.h rename to cpp/core/fixel/legacy/fixel_metric.h diff --git a/core/fixel/legacy/image.h b/cpp/core/fixel/legacy/image.h similarity index 100% rename from core/fixel/legacy/image.h rename to cpp/core/fixel/legacy/image.h diff --git a/core/fixel/legacy/keys.h b/cpp/core/fixel/legacy/keys.h similarity index 100% rename from core/fixel/legacy/keys.h rename to cpp/core/fixel/legacy/keys.h diff --git a/core/fixel/loop.h b/cpp/core/fixel/loop.h similarity index 100% rename from core/fixel/loop.h rename to cpp/core/fixel/loop.h diff --git a/src/fixel/matrix.cpp b/cpp/core/fixel/matrix.cpp similarity index 100% rename from src/fixel/matrix.cpp rename to cpp/core/fixel/matrix.cpp diff --git a/src/fixel/matrix.h b/cpp/core/fixel/matrix.h similarity index 100% rename from src/fixel/matrix.h rename to cpp/core/fixel/matrix.h diff --git a/core/formats/dicom.cpp b/cpp/core/formats/dicom.cpp similarity index 100% rename from core/formats/dicom.cpp rename to cpp/core/formats/dicom.cpp diff --git a/core/formats/list.cpp b/cpp/core/formats/list.cpp similarity index 100% rename from core/formats/list.cpp rename to cpp/core/formats/list.cpp diff --git a/core/formats/list.h b/cpp/core/formats/list.h similarity index 100% rename from core/formats/list.h rename to cpp/core/formats/list.h diff --git a/core/formats/mgh.cpp b/cpp/core/formats/mgh.cpp similarity index 100% rename from core/formats/mgh.cpp rename to cpp/core/formats/mgh.cpp diff --git a/core/formats/mgz.cpp b/cpp/core/formats/mgz.cpp similarity index 100% rename from core/formats/mgz.cpp rename to cpp/core/formats/mgz.cpp diff --git a/core/formats/mri.cpp b/cpp/core/formats/mri.cpp similarity index 100% rename from core/formats/mri.cpp rename to cpp/core/formats/mri.cpp diff --git a/core/formats/mrtrix.cpp b/cpp/core/formats/mrtrix.cpp similarity index 100% rename from core/formats/mrtrix.cpp rename to cpp/core/formats/mrtrix.cpp diff --git a/core/formats/mrtrix_gz.cpp b/cpp/core/formats/mrtrix_gz.cpp similarity index 100% rename from core/formats/mrtrix_gz.cpp rename to cpp/core/formats/mrtrix_gz.cpp diff --git a/core/formats/mrtrix_sparse_legacy.cpp b/cpp/core/formats/mrtrix_sparse_legacy.cpp similarity index 100% rename from core/formats/mrtrix_sparse_legacy.cpp rename to cpp/core/formats/mrtrix_sparse_legacy.cpp diff --git a/core/formats/mrtrix_utils.cpp b/cpp/core/formats/mrtrix_utils.cpp similarity index 100% rename from core/formats/mrtrix_utils.cpp rename to cpp/core/formats/mrtrix_utils.cpp diff --git a/core/formats/mrtrix_utils.h b/cpp/core/formats/mrtrix_utils.h similarity index 100% rename from core/formats/mrtrix_utils.h rename to cpp/core/formats/mrtrix_utils.h diff --git a/core/formats/nifti1.cpp b/cpp/core/formats/nifti1.cpp similarity index 100% rename from core/formats/nifti1.cpp rename to cpp/core/formats/nifti1.cpp diff --git a/core/formats/nifti1_gz.cpp b/cpp/core/formats/nifti1_gz.cpp similarity index 100% rename from core/formats/nifti1_gz.cpp rename to cpp/core/formats/nifti1_gz.cpp diff --git a/core/formats/nifti2.cpp b/cpp/core/formats/nifti2.cpp similarity index 100% rename from core/formats/nifti2.cpp rename to cpp/core/formats/nifti2.cpp diff --git a/core/formats/nifti2_gz.cpp b/cpp/core/formats/nifti2_gz.cpp similarity index 100% rename from core/formats/nifti2_gz.cpp rename to cpp/core/formats/nifti2_gz.cpp diff --git a/core/formats/par.cpp b/cpp/core/formats/par.cpp similarity index 100% rename from core/formats/par.cpp rename to cpp/core/formats/par.cpp diff --git a/core/formats/pipe.cpp b/cpp/core/formats/pipe.cpp similarity index 100% rename from core/formats/pipe.cpp rename to cpp/core/formats/pipe.cpp diff --git a/core/formats/png.cpp b/cpp/core/formats/png.cpp similarity index 100% rename from core/formats/png.cpp rename to cpp/core/formats/png.cpp diff --git a/core/formats/ram.cpp b/cpp/core/formats/ram.cpp similarity index 100% rename from core/formats/ram.cpp rename to cpp/core/formats/ram.cpp diff --git a/core/formats/xds.cpp b/cpp/core/formats/xds.cpp similarity index 100% rename from core/formats/xds.cpp rename to cpp/core/formats/xds.cpp diff --git a/core/half.h b/cpp/core/half.h similarity index 100% rename from core/half.h rename to cpp/core/half.h diff --git a/core/header.cpp b/cpp/core/header.cpp similarity index 100% rename from core/header.cpp rename to cpp/core/header.cpp diff --git a/core/header.h b/cpp/core/header.h similarity index 100% rename from core/header.h rename to cpp/core/header.h diff --git a/core/image.cpp b/cpp/core/image.cpp similarity index 100% rename from core/image.cpp rename to cpp/core/image.cpp diff --git a/core/image.h b/cpp/core/image.h similarity index 100% rename from core/image.h rename to cpp/core/image.h diff --git a/core/image_diff.h b/cpp/core/image_diff.h similarity index 100% rename from core/image_diff.h rename to cpp/core/image_diff.h diff --git a/core/image_helpers.h b/cpp/core/image_helpers.h similarity index 100% rename from core/image_helpers.h rename to cpp/core/image_helpers.h diff --git a/core/image_io/base.cpp b/cpp/core/image_io/base.cpp similarity index 100% rename from core/image_io/base.cpp rename to cpp/core/image_io/base.cpp diff --git a/core/image_io/base.h b/cpp/core/image_io/base.h similarity index 100% rename from core/image_io/base.h rename to cpp/core/image_io/base.h diff --git a/core/image_io/default.cpp b/cpp/core/image_io/default.cpp similarity index 100% rename from core/image_io/default.cpp rename to cpp/core/image_io/default.cpp diff --git a/core/image_io/default.h b/cpp/core/image_io/default.h similarity index 100% rename from core/image_io/default.h rename to cpp/core/image_io/default.h diff --git a/core/image_io/gz.cpp b/cpp/core/image_io/gz.cpp similarity index 100% rename from core/image_io/gz.cpp rename to cpp/core/image_io/gz.cpp diff --git a/core/image_io/gz.h b/cpp/core/image_io/gz.h similarity index 100% rename from core/image_io/gz.h rename to cpp/core/image_io/gz.h diff --git a/core/image_io/mosaic.cpp b/cpp/core/image_io/mosaic.cpp similarity index 100% rename from core/image_io/mosaic.cpp rename to cpp/core/image_io/mosaic.cpp diff --git a/core/image_io/mosaic.h b/cpp/core/image_io/mosaic.h similarity index 100% rename from core/image_io/mosaic.h rename to cpp/core/image_io/mosaic.h diff --git a/core/image_io/pipe.cpp b/cpp/core/image_io/pipe.cpp similarity index 100% rename from core/image_io/pipe.cpp rename to cpp/core/image_io/pipe.cpp diff --git a/core/image_io/pipe.h b/cpp/core/image_io/pipe.h similarity index 100% rename from core/image_io/pipe.h rename to cpp/core/image_io/pipe.h diff --git a/core/image_io/png.cpp b/cpp/core/image_io/png.cpp similarity index 100% rename from core/image_io/png.cpp rename to cpp/core/image_io/png.cpp diff --git a/core/image_io/png.h b/cpp/core/image_io/png.h similarity index 100% rename from core/image_io/png.h rename to cpp/core/image_io/png.h diff --git a/core/image_io/ram.cpp b/cpp/core/image_io/ram.cpp similarity index 100% rename from core/image_io/ram.cpp rename to cpp/core/image_io/ram.cpp diff --git a/core/image_io/ram.h b/cpp/core/image_io/ram.h similarity index 100% rename from core/image_io/ram.h rename to cpp/core/image_io/ram.h diff --git a/core/image_io/scratch.cpp b/cpp/core/image_io/scratch.cpp similarity index 100% rename from core/image_io/scratch.cpp rename to cpp/core/image_io/scratch.cpp diff --git a/core/image_io/scratch.h b/cpp/core/image_io/scratch.h similarity index 100% rename from core/image_io/scratch.h rename to cpp/core/image_io/scratch.h diff --git a/core/image_io/sparse.cpp b/cpp/core/image_io/sparse.cpp similarity index 100% rename from core/image_io/sparse.cpp rename to cpp/core/image_io/sparse.cpp diff --git a/core/image_io/sparse.h b/cpp/core/image_io/sparse.h similarity index 100% rename from core/image_io/sparse.h rename to cpp/core/image_io/sparse.h diff --git a/core/image_io/variable_scaling.cpp b/cpp/core/image_io/variable_scaling.cpp similarity index 100% rename from core/image_io/variable_scaling.cpp rename to cpp/core/image_io/variable_scaling.cpp diff --git a/core/image_io/variable_scaling.h b/cpp/core/image_io/variable_scaling.h similarity index 100% rename from core/image_io/variable_scaling.h rename to cpp/core/image_io/variable_scaling.h diff --git a/core/interp/base.h b/cpp/core/interp/base.h similarity index 100% rename from core/interp/base.h rename to cpp/core/interp/base.h diff --git a/core/interp/cubic.h b/cpp/core/interp/cubic.h similarity index 100% rename from core/interp/cubic.h rename to cpp/core/interp/cubic.h diff --git a/core/interp/linear.h b/cpp/core/interp/linear.h similarity index 100% rename from core/interp/linear.h rename to cpp/core/interp/linear.h diff --git a/core/interp/masked.h b/cpp/core/interp/masked.h similarity index 100% rename from core/interp/masked.h rename to cpp/core/interp/masked.h diff --git a/core/interp/nearest.h b/cpp/core/interp/nearest.h similarity index 100% rename from core/interp/nearest.h rename to cpp/core/interp/nearest.h diff --git a/core/interp/sinc.h b/cpp/core/interp/sinc.h similarity index 100% rename from core/interp/sinc.h rename to cpp/core/interp/sinc.h diff --git a/core/math/SH.cpp b/cpp/core/math/SH.cpp similarity index 97% rename from core/math/SH.cpp rename to cpp/core/math/SH.cpp index 616c6eff14..053c1de7ea 100644 --- a/core/math/SH.cpp +++ b/cpp/core/math/SH.cpp @@ -15,7 +15,7 @@ */ #include "math/SH.h" -#include "version.h" +#include "mrtrix_version.h" namespace MR::Math::SH { diff --git a/core/math/SH.h b/cpp/core/math/SH.h similarity index 100% rename from core/math/SH.h rename to cpp/core/math/SH.h diff --git a/core/math/Sn_scale_estimator.h b/cpp/core/math/Sn_scale_estimator.h similarity index 100% rename from core/math/Sn_scale_estimator.h rename to cpp/core/math/Sn_scale_estimator.h diff --git a/core/math/ZSH.h b/cpp/core/math/ZSH.h similarity index 100% rename from core/math/ZSH.h rename to cpp/core/math/ZSH.h diff --git a/core/math/average_space.cpp b/cpp/core/math/average_space.cpp similarity index 100% rename from core/math/average_space.cpp rename to cpp/core/math/average_space.cpp diff --git a/core/math/average_space.h b/cpp/core/math/average_space.h similarity index 100% rename from core/math/average_space.h rename to cpp/core/math/average_space.h diff --git a/core/math/bessel.cpp b/cpp/core/math/bessel.cpp similarity index 100% rename from core/math/bessel.cpp rename to cpp/core/math/bessel.cpp diff --git a/core/math/bessel.h b/cpp/core/math/bessel.h similarity index 100% rename from core/math/bessel.h rename to cpp/core/math/bessel.h diff --git a/core/math/betainc.cpp b/cpp/core/math/betainc.cpp similarity index 100% rename from core/math/betainc.cpp rename to cpp/core/math/betainc.cpp diff --git a/core/math/betainc.h b/cpp/core/math/betainc.h similarity index 100% rename from core/math/betainc.h rename to cpp/core/math/betainc.h diff --git a/core/math/cauchy.h b/cpp/core/math/cauchy.h similarity index 100% rename from core/math/cauchy.h rename to cpp/core/math/cauchy.h diff --git a/core/math/chebyshev.h b/cpp/core/math/chebyshev.h similarity index 100% rename from core/math/chebyshev.h rename to cpp/core/math/chebyshev.h diff --git a/core/math/check_gradient.h b/cpp/core/math/check_gradient.h similarity index 100% rename from core/math/check_gradient.h rename to cpp/core/math/check_gradient.h diff --git a/core/math/condition_number.cpp b/cpp/core/math/condition_number.cpp similarity index 100% rename from core/math/condition_number.cpp rename to cpp/core/math/condition_number.cpp diff --git a/core/math/condition_number.h b/cpp/core/math/condition_number.h similarity index 100% rename from core/math/condition_number.h rename to cpp/core/math/condition_number.h diff --git a/core/math/constrained_least_squares.h b/cpp/core/math/constrained_least_squares.h similarity index 100% rename from core/math/constrained_least_squares.h rename to cpp/core/math/constrained_least_squares.h diff --git a/core/math/cubic_spline.h b/cpp/core/math/cubic_spline.h similarity index 100% rename from core/math/cubic_spline.h rename to cpp/core/math/cubic_spline.h diff --git a/core/math/erfinv.cpp b/cpp/core/math/erfinv.cpp similarity index 100% rename from core/math/erfinv.cpp rename to cpp/core/math/erfinv.cpp diff --git a/core/math/erfinv.h b/cpp/core/math/erfinv.h similarity index 100% rename from core/math/erfinv.h rename to cpp/core/math/erfinv.h diff --git a/core/math/factorial.h b/cpp/core/math/factorial.h similarity index 100% rename from core/math/factorial.h rename to cpp/core/math/factorial.h diff --git a/core/math/fft.h b/cpp/core/math/fft.h similarity index 100% rename from core/math/fft.h rename to cpp/core/math/fft.h diff --git a/core/math/gaussian.h b/cpp/core/math/gaussian.h similarity index 100% rename from core/math/gaussian.h rename to cpp/core/math/gaussian.h diff --git a/core/math/golden_section_search.h b/cpp/core/math/golden_section_search.h similarity index 100% rename from core/math/golden_section_search.h rename to cpp/core/math/golden_section_search.h diff --git a/core/math/gradient_descent.h b/cpp/core/math/gradient_descent.h similarity index 100% rename from core/math/gradient_descent.h rename to cpp/core/math/gradient_descent.h diff --git a/core/math/gradient_descent_bb.h b/cpp/core/math/gradient_descent_bb.h similarity index 100% rename from core/math/gradient_descent_bb.h rename to cpp/core/math/gradient_descent_bb.h diff --git a/core/math/hermite.h b/cpp/core/math/hermite.h similarity index 100% rename from core/math/hermite.h rename to cpp/core/math/hermite.h diff --git a/core/math/least_squares.h b/cpp/core/math/least_squares.h similarity index 100% rename from core/math/least_squares.h rename to cpp/core/math/least_squares.h diff --git a/core/math/legendre.h b/cpp/core/math/legendre.h similarity index 100% rename from core/math/legendre.h rename to cpp/core/math/legendre.h diff --git a/core/math/math.h b/cpp/core/math/math.h similarity index 100% rename from core/math/math.h rename to cpp/core/math/math.h diff --git a/core/math/median.h b/cpp/core/math/median.h similarity index 100% rename from core/math/median.h rename to cpp/core/math/median.h diff --git a/core/math/polynomial.h b/cpp/core/math/polynomial.h similarity index 100% rename from core/math/polynomial.h rename to cpp/core/math/polynomial.h diff --git a/core/math/quadratic_line_search.h b/cpp/core/math/quadratic_line_search.h similarity index 100% rename from core/math/quadratic_line_search.h rename to cpp/core/math/quadratic_line_search.h diff --git a/core/math/rician.h b/cpp/core/math/rician.h similarity index 100% rename from core/math/rician.h rename to cpp/core/math/rician.h diff --git a/core/math/rng.h b/cpp/core/math/rng.h similarity index 100% rename from core/math/rng.h rename to cpp/core/math/rng.h diff --git a/core/math/sech.h b/cpp/core/math/sech.h similarity index 100% rename from core/math/sech.h rename to cpp/core/math/sech.h diff --git a/core/math/sinc.h b/cpp/core/math/sinc.h similarity index 100% rename from core/math/sinc.h rename to cpp/core/math/sinc.h diff --git a/core/math/sphere.h b/cpp/core/math/sphere.h similarity index 100% rename from core/math/sphere.h rename to cpp/core/math/sphere.h diff --git a/core/math/stats/fwe.cpp b/cpp/core/math/stats/fwe.cpp similarity index 100% rename from core/math/stats/fwe.cpp rename to cpp/core/math/stats/fwe.cpp diff --git a/core/math/stats/fwe.h b/cpp/core/math/stats/fwe.h similarity index 100% rename from core/math/stats/fwe.h rename to cpp/core/math/stats/fwe.h diff --git a/core/math/stats/glm.cpp b/cpp/core/math/stats/glm.cpp similarity index 100% rename from core/math/stats/glm.cpp rename to cpp/core/math/stats/glm.cpp diff --git a/core/math/stats/glm.h b/cpp/core/math/stats/glm.h similarity index 100% rename from core/math/stats/glm.h rename to cpp/core/math/stats/glm.h diff --git a/core/math/stats/import.cpp b/cpp/core/math/stats/import.cpp similarity index 100% rename from core/math/stats/import.cpp rename to cpp/core/math/stats/import.cpp diff --git a/core/math/stats/import.h b/cpp/core/math/stats/import.h similarity index 100% rename from core/math/stats/import.h rename to cpp/core/math/stats/import.h diff --git a/core/math/stats/shuffle.cpp b/cpp/core/math/stats/shuffle.cpp similarity index 100% rename from core/math/stats/shuffle.cpp rename to cpp/core/math/stats/shuffle.cpp diff --git a/core/math/stats/shuffle.h b/cpp/core/math/stats/shuffle.h similarity index 100% rename from core/math/stats/shuffle.h rename to cpp/core/math/stats/shuffle.h diff --git a/core/math/stats/typedefs.h b/cpp/core/math/stats/typedefs.h similarity index 100% rename from core/math/stats/typedefs.h rename to cpp/core/math/stats/typedefs.h diff --git a/core/math/welch_satterthwaite.h b/cpp/core/math/welch_satterthwaite.h similarity index 100% rename from core/math/welch_satterthwaite.h rename to cpp/core/math/welch_satterthwaite.h diff --git a/core/math/zstatistic.cpp b/cpp/core/math/zstatistic.cpp similarity index 100% rename from core/math/zstatistic.cpp rename to cpp/core/math/zstatistic.cpp diff --git a/core/math/zstatistic.h b/cpp/core/math/zstatistic.h similarity index 100% rename from core/math/zstatistic.h rename to cpp/core/math/zstatistic.h diff --git a/core/memory.h b/cpp/core/memory.h similarity index 100% rename from core/memory.h rename to cpp/core/memory.h diff --git a/src/min_mem_array.h b/cpp/core/min_mem_array.h similarity index 100% rename from src/min_mem_array.h rename to cpp/core/min_mem_array.h diff --git a/core/misc/bitset.cpp b/cpp/core/misc/bitset.cpp similarity index 100% rename from core/misc/bitset.cpp rename to cpp/core/misc/bitset.cpp diff --git a/core/misc/bitset.h b/cpp/core/misc/bitset.h similarity index 100% rename from core/misc/bitset.h rename to cpp/core/misc/bitset.h diff --git a/core/misc/voxel2vector.h b/cpp/core/misc/voxel2vector.h similarity index 100% rename from core/misc/voxel2vector.h rename to cpp/core/misc/voxel2vector.h diff --git a/core/mrtrix.cpp b/cpp/core/mrtrix.cpp similarity index 100% rename from core/mrtrix.cpp rename to cpp/core/mrtrix.cpp diff --git a/core/mrtrix.h b/cpp/core/mrtrix.h similarity index 100% rename from core/mrtrix.h rename to cpp/core/mrtrix.h diff --git a/cpp/core/mrtrix_version.cpp.in b/cpp/core/mrtrix_version.cpp.in new file mode 100644 index 0000000000..87d2935f92 --- /dev/null +++ b/cpp/core/mrtrix_version.cpp.in @@ -0,0 +1,7 @@ +#include "mrtrix_version.h" +#include + +namespace MR::App { +const std::string mrtrix_version = "@MRTRIX_VERSION@"; +const std::string build_date = __DATE__; +} diff --git a/cpp/core/mrtrix_version.h b/cpp/core/mrtrix_version.h new file mode 100644 index 0000000000..c765871502 --- /dev/null +++ b/cpp/core/mrtrix_version.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2008-2024 the MRtrix3 contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Covered Software is provided under this License on an "as is" + * basis, without warranty of any kind, either expressed, implied, or + * statutory, including, without limitation, warranties that the + * Covered Software is free of defects, merchantable, fit for a + * particular purpose or non-infringing. + * See the Mozilla Public License v. 2.0 for more details. + * + * For more details, see http://www.mrtrix.org/. + */ + +#pragma once +#include + +namespace MR::App { +extern const std::string mrtrix_version; +extern const std::string build_date; +} // namespace MR::App diff --git a/core/mutexprotected.h b/cpp/core/mutexprotected.h similarity index 100% rename from core/mutexprotected.h rename to cpp/core/mutexprotected.h diff --git a/core/ordered_thread_queue.h b/cpp/core/ordered_thread_queue.h similarity index 100% rename from core/ordered_thread_queue.h rename to cpp/core/ordered_thread_queue.h diff --git a/core/phase_encoding.cpp b/cpp/core/phase_encoding.cpp similarity index 100% rename from core/phase_encoding.cpp rename to cpp/core/phase_encoding.cpp diff --git a/core/phase_encoding.h b/cpp/core/phase_encoding.h similarity index 100% rename from core/phase_encoding.h rename to cpp/core/phase_encoding.h diff --git a/core/progressbar.cpp b/cpp/core/progressbar.cpp similarity index 100% rename from core/progressbar.cpp rename to cpp/core/progressbar.cpp diff --git a/core/progressbar.h b/cpp/core/progressbar.h similarity index 100% rename from core/progressbar.h rename to cpp/core/progressbar.h diff --git a/core/raw.h b/cpp/core/raw.h similarity index 100% rename from core/raw.h rename to cpp/core/raw.h diff --git a/src/registration/linear.cpp b/cpp/core/registration/linear.cpp similarity index 100% rename from src/registration/linear.cpp rename to cpp/core/registration/linear.cpp diff --git a/src/registration/linear.h b/cpp/core/registration/linear.h similarity index 100% rename from src/registration/linear.h rename to cpp/core/registration/linear.h diff --git a/src/registration/metric/cc_helper.h b/cpp/core/registration/metric/cc_helper.h similarity index 100% rename from src/registration/metric/cc_helper.h rename to cpp/core/registration/metric/cc_helper.h diff --git a/src/registration/metric/cross_correlation.h b/cpp/core/registration/metric/cross_correlation.h similarity index 100% rename from src/registration/metric/cross_correlation.h rename to cpp/core/registration/metric/cross_correlation.h diff --git a/src/registration/metric/demons.h b/cpp/core/registration/metric/demons.h similarity index 100% rename from src/registration/metric/demons.h rename to cpp/core/registration/metric/demons.h diff --git a/src/registration/metric/demons4D.h b/cpp/core/registration/metric/demons4D.h similarity index 100% rename from src/registration/metric/demons4D.h rename to cpp/core/registration/metric/demons4D.h diff --git a/src/registration/metric/demons_cc.h b/cpp/core/registration/metric/demons_cc.h similarity index 100% rename from src/registration/metric/demons_cc.h rename to cpp/core/registration/metric/demons_cc.h diff --git a/src/registration/metric/difference_robust.h b/cpp/core/registration/metric/difference_robust.h similarity index 100% rename from src/registration/metric/difference_robust.h rename to cpp/core/registration/metric/difference_robust.h diff --git a/src/registration/metric/evaluate.h b/cpp/core/registration/metric/evaluate.h similarity index 100% rename from src/registration/metric/evaluate.h rename to cpp/core/registration/metric/evaluate.h diff --git a/src/registration/metric/linear_base.h b/cpp/core/registration/metric/linear_base.h similarity index 100% rename from src/registration/metric/linear_base.h rename to cpp/core/registration/metric/linear_base.h diff --git a/src/registration/metric/local_cross_correlation.h b/cpp/core/registration/metric/local_cross_correlation.h similarity index 100% rename from src/registration/metric/local_cross_correlation.h rename to cpp/core/registration/metric/local_cross_correlation.h diff --git a/src/registration/metric/mean_squared.h b/cpp/core/registration/metric/mean_squared.h similarity index 100% rename from src/registration/metric/mean_squared.h rename to cpp/core/registration/metric/mean_squared.h diff --git a/src/registration/metric/params.h b/cpp/core/registration/metric/params.h similarity index 100% rename from src/registration/metric/params.h rename to cpp/core/registration/metric/params.h diff --git a/src/registration/metric/robust_estimators.h b/cpp/core/registration/metric/robust_estimators.h similarity index 100% rename from src/registration/metric/robust_estimators.h rename to cpp/core/registration/metric/robust_estimators.h diff --git a/src/registration/metric/thread_kernel.h b/cpp/core/registration/metric/thread_kernel.h similarity index 100% rename from src/registration/metric/thread_kernel.h rename to cpp/core/registration/metric/thread_kernel.h diff --git a/src/registration/multi_contrast.cpp b/cpp/core/registration/multi_contrast.cpp similarity index 100% rename from src/registration/multi_contrast.cpp rename to cpp/core/registration/multi_contrast.cpp diff --git a/src/registration/multi_contrast.h b/cpp/core/registration/multi_contrast.h similarity index 100% rename from src/registration/multi_contrast.h rename to cpp/core/registration/multi_contrast.h diff --git a/src/registration/multi_resolution_lmax.h b/cpp/core/registration/multi_resolution_lmax.h similarity index 100% rename from src/registration/multi_resolution_lmax.h rename to cpp/core/registration/multi_resolution_lmax.h diff --git a/src/registration/nonlinear.cpp b/cpp/core/registration/nonlinear.cpp similarity index 100% rename from src/registration/nonlinear.cpp rename to cpp/core/registration/nonlinear.cpp diff --git a/src/registration/nonlinear.h b/cpp/core/registration/nonlinear.h similarity index 100% rename from src/registration/nonlinear.h rename to cpp/core/registration/nonlinear.h diff --git a/src/registration/shared.h b/cpp/core/registration/shared.h similarity index 100% rename from src/registration/shared.h rename to cpp/core/registration/shared.h diff --git a/src/registration/transform/affine.cpp b/cpp/core/registration/transform/affine.cpp similarity index 100% rename from src/registration/transform/affine.cpp rename to cpp/core/registration/transform/affine.cpp diff --git a/src/registration/transform/affine.h b/cpp/core/registration/transform/affine.h similarity index 100% rename from src/registration/transform/affine.h rename to cpp/core/registration/transform/affine.h diff --git a/src/registration/transform/base.cpp b/cpp/core/registration/transform/base.cpp similarity index 100% rename from src/registration/transform/base.cpp rename to cpp/core/registration/transform/base.cpp diff --git a/src/registration/transform/base.h b/cpp/core/registration/transform/base.h similarity index 100% rename from src/registration/transform/base.h rename to cpp/core/registration/transform/base.h diff --git a/src/registration/transform/convergence_check.cpp b/cpp/core/registration/transform/convergence_check.cpp similarity index 100% rename from src/registration/transform/convergence_check.cpp rename to cpp/core/registration/transform/convergence_check.cpp diff --git a/src/registration/transform/convergence_check.h b/cpp/core/registration/transform/convergence_check.h similarity index 100% rename from src/registration/transform/convergence_check.h rename to cpp/core/registration/transform/convergence_check.h diff --git a/src/registration/transform/initialiser.cpp b/cpp/core/registration/transform/initialiser.cpp similarity index 100% rename from src/registration/transform/initialiser.cpp rename to cpp/core/registration/transform/initialiser.cpp diff --git a/src/registration/transform/initialiser.h b/cpp/core/registration/transform/initialiser.h similarity index 100% rename from src/registration/transform/initialiser.h rename to cpp/core/registration/transform/initialiser.h diff --git a/src/registration/transform/initialiser_helpers.cpp b/cpp/core/registration/transform/initialiser_helpers.cpp similarity index 100% rename from src/registration/transform/initialiser_helpers.cpp rename to cpp/core/registration/transform/initialiser_helpers.cpp diff --git a/src/registration/transform/initialiser_helpers.h b/cpp/core/registration/transform/initialiser_helpers.h similarity index 100% rename from src/registration/transform/initialiser_helpers.h rename to cpp/core/registration/transform/initialiser_helpers.h diff --git a/src/registration/transform/reorient.cpp b/cpp/core/registration/transform/reorient.cpp similarity index 100% rename from src/registration/transform/reorient.cpp rename to cpp/core/registration/transform/reorient.cpp diff --git a/src/registration/transform/reorient.h b/cpp/core/registration/transform/reorient.h similarity index 100% rename from src/registration/transform/reorient.h rename to cpp/core/registration/transform/reorient.h diff --git a/src/registration/transform/rigid.cpp b/cpp/core/registration/transform/rigid.cpp similarity index 100% rename from src/registration/transform/rigid.cpp rename to cpp/core/registration/transform/rigid.cpp diff --git a/src/registration/transform/rigid.h b/cpp/core/registration/transform/rigid.h similarity index 100% rename from src/registration/transform/rigid.h rename to cpp/core/registration/transform/rigid.h diff --git a/src/registration/transform/search.h b/cpp/core/registration/transform/search.h similarity index 100% rename from src/registration/transform/search.h rename to cpp/core/registration/transform/search.h diff --git a/src/registration/warp/compose.h b/cpp/core/registration/warp/compose.h similarity index 100% rename from src/registration/warp/compose.h rename to cpp/core/registration/warp/compose.h diff --git a/src/registration/warp/convert.h b/cpp/core/registration/warp/convert.h similarity index 100% rename from src/registration/warp/convert.h rename to cpp/core/registration/warp/convert.h diff --git a/src/registration/warp/helpers.h b/cpp/core/registration/warp/helpers.h similarity index 100% rename from src/registration/warp/helpers.h rename to cpp/core/registration/warp/helpers.h diff --git a/src/registration/warp/invert.h b/cpp/core/registration/warp/invert.h similarity index 100% rename from src/registration/warp/invert.h rename to cpp/core/registration/warp/invert.h diff --git a/core/signal_handler.cpp b/cpp/core/signal_handler.cpp similarity index 100% rename from core/signal_handler.cpp rename to cpp/core/signal_handler.cpp diff --git a/core/signal_handler.h b/cpp/core/signal_handler.h similarity index 100% rename from core/signal_handler.h rename to cpp/core/signal_handler.h diff --git a/core/signals.h b/cpp/core/signals.h similarity index 100% rename from core/signals.h rename to cpp/core/signals.h diff --git a/core/stats.cpp b/cpp/core/stats.cpp similarity index 100% rename from core/stats.cpp rename to cpp/core/stats.cpp diff --git a/core/stats.h b/cpp/core/stats.h similarity index 100% rename from core/stats.h rename to cpp/core/stats.h diff --git a/src/stats/cfe.cpp b/cpp/core/stats/cfe.cpp similarity index 100% rename from src/stats/cfe.cpp rename to cpp/core/stats/cfe.cpp diff --git a/src/stats/cfe.h b/cpp/core/stats/cfe.h similarity index 100% rename from src/stats/cfe.h rename to cpp/core/stats/cfe.h diff --git a/src/stats/cluster.cpp b/cpp/core/stats/cluster.cpp similarity index 100% rename from src/stats/cluster.cpp rename to cpp/core/stats/cluster.cpp diff --git a/src/stats/cluster.h b/cpp/core/stats/cluster.h similarity index 100% rename from src/stats/cluster.h rename to cpp/core/stats/cluster.h diff --git a/src/stats/enhance.h b/cpp/core/stats/enhance.h similarity index 100% rename from src/stats/enhance.h rename to cpp/core/stats/enhance.h diff --git a/src/stats/permtest.cpp b/cpp/core/stats/permtest.cpp similarity index 100% rename from src/stats/permtest.cpp rename to cpp/core/stats/permtest.cpp diff --git a/src/stats/permtest.h b/cpp/core/stats/permtest.h similarity index 100% rename from src/stats/permtest.h rename to cpp/core/stats/permtest.h diff --git a/src/stats/tfce.cpp b/cpp/core/stats/tfce.cpp similarity index 100% rename from src/stats/tfce.cpp rename to cpp/core/stats/tfce.cpp diff --git a/src/stats/tfce.h b/cpp/core/stats/tfce.h similarity index 100% rename from src/stats/tfce.h rename to cpp/core/stats/tfce.h diff --git a/core/stride.cpp b/cpp/core/stride.cpp similarity index 100% rename from core/stride.cpp rename to cpp/core/stride.cpp diff --git a/core/stride.h b/cpp/core/stride.h similarity index 100% rename from core/stride.h rename to cpp/core/stride.h diff --git a/src/surface/algo/image2mesh.h b/cpp/core/surface/algo/image2mesh.h similarity index 100% rename from src/surface/algo/image2mesh.h rename to cpp/core/surface/algo/image2mesh.h diff --git a/src/surface/algo/mesh2image.cpp b/cpp/core/surface/algo/mesh2image.cpp similarity index 100% rename from src/surface/algo/mesh2image.cpp rename to cpp/core/surface/algo/mesh2image.cpp diff --git a/src/surface/algo/mesh2image.h b/cpp/core/surface/algo/mesh2image.h similarity index 100% rename from src/surface/algo/mesh2image.h rename to cpp/core/surface/algo/mesh2image.h diff --git a/src/surface/filter/base.cpp b/cpp/core/surface/filter/base.cpp similarity index 100% rename from src/surface/filter/base.cpp rename to cpp/core/surface/filter/base.cpp diff --git a/src/surface/filter/base.h b/cpp/core/surface/filter/base.h similarity index 100% rename from src/surface/filter/base.h rename to cpp/core/surface/filter/base.h diff --git a/src/surface/filter/smooth.cpp b/cpp/core/surface/filter/smooth.cpp similarity index 100% rename from src/surface/filter/smooth.cpp rename to cpp/core/surface/filter/smooth.cpp diff --git a/src/surface/filter/smooth.h b/cpp/core/surface/filter/smooth.h similarity index 100% rename from src/surface/filter/smooth.h rename to cpp/core/surface/filter/smooth.h diff --git a/src/surface/filter/vertex_transform.cpp b/cpp/core/surface/filter/vertex_transform.cpp similarity index 100% rename from src/surface/filter/vertex_transform.cpp rename to cpp/core/surface/filter/vertex_transform.cpp diff --git a/src/surface/filter/vertex_transform.h b/cpp/core/surface/filter/vertex_transform.h similarity index 100% rename from src/surface/filter/vertex_transform.h rename to cpp/core/surface/filter/vertex_transform.h diff --git a/src/surface/freesurfer.cpp b/cpp/core/surface/freesurfer.cpp similarity index 100% rename from src/surface/freesurfer.cpp rename to cpp/core/surface/freesurfer.cpp diff --git a/src/surface/freesurfer.h b/cpp/core/surface/freesurfer.h similarity index 100% rename from src/surface/freesurfer.h rename to cpp/core/surface/freesurfer.h diff --git a/src/surface/mesh.cpp b/cpp/core/surface/mesh.cpp similarity index 100% rename from src/surface/mesh.cpp rename to cpp/core/surface/mesh.cpp diff --git a/src/surface/mesh.h b/cpp/core/surface/mesh.h similarity index 100% rename from src/surface/mesh.h rename to cpp/core/surface/mesh.h diff --git a/src/surface/mesh_multi.cpp b/cpp/core/surface/mesh_multi.cpp similarity index 100% rename from src/surface/mesh_multi.cpp rename to cpp/core/surface/mesh_multi.cpp diff --git a/src/surface/mesh_multi.h b/cpp/core/surface/mesh_multi.h similarity index 100% rename from src/surface/mesh_multi.h rename to cpp/core/surface/mesh_multi.h diff --git a/src/surface/polygon.cpp b/cpp/core/surface/polygon.cpp similarity index 100% rename from src/surface/polygon.cpp rename to cpp/core/surface/polygon.cpp diff --git a/src/surface/polygon.h b/cpp/core/surface/polygon.h similarity index 100% rename from src/surface/polygon.h rename to cpp/core/surface/polygon.h diff --git a/src/surface/scalar.cpp b/cpp/core/surface/scalar.cpp similarity index 100% rename from src/surface/scalar.cpp rename to cpp/core/surface/scalar.cpp diff --git a/src/surface/scalar.h b/cpp/core/surface/scalar.h similarity index 100% rename from src/surface/scalar.h rename to cpp/core/surface/scalar.h diff --git a/src/surface/types.h b/cpp/core/surface/types.h similarity index 100% rename from src/surface/types.h rename to cpp/core/surface/types.h diff --git a/src/surface/utils.h b/cpp/core/surface/utils.h similarity index 100% rename from src/surface/utils.h rename to cpp/core/surface/utils.h diff --git a/core/thread.cpp b/cpp/core/thread.cpp similarity index 100% rename from core/thread.cpp rename to cpp/core/thread.cpp diff --git a/core/thread.h b/cpp/core/thread.h similarity index 100% rename from core/thread.h rename to cpp/core/thread.h diff --git a/core/thread_queue.h b/cpp/core/thread_queue.h similarity index 100% rename from core/thread_queue.h rename to cpp/core/thread_queue.h diff --git a/core/timer.h b/cpp/core/timer.h similarity index 100% rename from core/timer.h rename to cpp/core/timer.h diff --git a/core/transform.h b/cpp/core/transform.h similarity index 100% rename from core/transform.h rename to cpp/core/transform.h diff --git a/core/types.h b/cpp/core/types.h similarity index 100% rename from core/types.h rename to cpp/core/types.h diff --git a/src/wrap_r.h b/cpp/core/wrap_r.h similarity index 100% rename from src/wrap_r.h rename to cpp/core/wrap_r.h diff --git a/cpp/gui/CMakeLists.txt b/cpp/gui/CMakeLists.txt new file mode 100644 index 0000000000..f613d23f8a --- /dev/null +++ b/cpp/gui/CMakeLists.txt @@ -0,0 +1,55 @@ +if(MRTRIX_USE_QT5) + find_package(Qt5 COMPONENTS Core Gui Widgets OpenGL Network REQUIRED) + qt5_add_resources(RCC_SOURCES ${PROJECT_SOURCE_DIR}/icons/icons.qrc) +else() + find_package(Qt6 COMPONENTS Core Gui Widgets OpenGL Network OpenGLWidgets REQUIRED) + qt6_add_resources(RCC_SOURCES ${PROJECT_SOURCE_DIR}/icons/icons.qrc) +endif() +# Explicitly log Qt's location since it's not done automatically by the FindQt module +message(STATUS "Qt${QT_MAJOR_VERSION}_DIR is set to: ${Qt${QT_MAJOR_VERSION}_DIR}") + +find_package(OpenGL REQUIRED) +find_package(Threads REQUIRED) + +file(GLOB_RECURSE GUI_SOURCES *.h *.cpp) + +add_library(mrtrix-gui ${MRTRIX_LIBRARY_TYPE} ${GUI_SOURCES} ${RCC_SOURCES}) +add_library(mrtrix::gui ALIAS mrtrix-gui) + +set_target_properties(mrtrix-gui PROPERTIES + AUTOMOC ON + AUTOUIC ON + LINK_DEPENDS_NO_SHARED ON +) + +if(MRTRIX_USE_PCH) + target_precompile_headers(mrtrix-gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/gui_pch.h) +endif() + +target_include_directories(mrtrix-gui PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_link_libraries(mrtrix-gui PUBLIC + mrtrix::core + Qt${QT_MAJOR_VERSION}::Core + Qt${QT_MAJOR_VERSION}::Gui + Qt${QT_MAJOR_VERSION}::Widgets + Qt${QT_MAJOR_VERSION}::OpenGL + Qt${QT_MAJOR_VERSION}::Network + Threads::Threads + ${OPENGL_LIBRARIES} +) + +if(NOT MRTRIX_USE_QT5) + target_link_libraries(mrtrix-gui PUBLIC Qt6::OpenGLWidgets) +endif() + +set_target_properties(mrtrix-gui PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin +) + +install(TARGETS mrtrix-gui + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) \ No newline at end of file diff --git a/src/gui/color_button.cpp b/cpp/gui/color_button.cpp similarity index 98% rename from src/gui/color_button.cpp rename to cpp/gui/color_button.cpp index b47d9e19ba..20d4a08614 100644 --- a/src/gui/color_button.cpp +++ b/cpp/gui/color_button.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/color_button.h" +#include "color_button.h" QColorButton::QColorButton(QWidget *parent, const char *name) : QPushButton(name, parent) { connect(this, SIGNAL(clicked()), this, SLOT(chooseColor())); diff --git a/src/gui/color_button.h b/cpp/gui/color_button.h similarity index 97% rename from src/gui/color_button.h rename to cpp/gui/color_button.h index c51ed4cb8c..2aa8062f2f 100644 --- a/src/gui/color_button.h +++ b/cpp/gui/color_button.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" class QColorButton : public QPushButton { Q_OBJECT diff --git a/src/gui/crosshair.cpp b/cpp/gui/crosshair.cpp similarity index 97% rename from src/gui/crosshair.cpp rename to cpp/gui/crosshair.cpp index fb0f6b00a7..4019a81e6f 100644 --- a/src/gui/crosshair.cpp +++ b/cpp/gui/crosshair.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/crosshair.h" +#include "crosshair.h" -#include "gui/projection.h" +#include "projection.h" namespace MR::GUI { diff --git a/src/gui/crosshair.h b/cpp/gui/crosshair.h similarity index 94% rename from src/gui/crosshair.h rename to cpp/gui/crosshair.h index 6c3582e487..c6dac8865d 100644 --- a/src/gui/crosshair.h +++ b/cpp/gui/crosshair.h @@ -18,8 +18,8 @@ #include "types.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/shader.h" +#include "opengl/glutils.h" +#include "opengl/shader.h" namespace MR::GUI { diff --git a/src/gui/cursor.cpp b/cpp/gui/cursor.cpp similarity index 98% rename from src/gui/cursor.cpp rename to cpp/gui/cursor.cpp index 45b7fa0dd3..ee3e4b9b16 100644 --- a/src/gui/cursor.cpp +++ b/cpp/gui/cursor.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/cursor.h" +#include "cursor.h" namespace MR::GUI { diff --git a/src/gui/cursor.h b/cpp/gui/cursor.h similarity index 97% rename from src/gui/cursor.h rename to cpp/gui/cursor.h index 897ff8e91c..822a9ac327 100644 --- a/src/gui/cursor.h +++ b/cpp/gui/cursor.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI { class Cursor { diff --git a/src/gui/dialog/dialog.cpp b/cpp/gui/dialog/dialog.cpp similarity index 88% rename from src/gui/dialog/dialog.cpp rename to cpp/gui/dialog/dialog.cpp index cc4b21b773..5874caed88 100644 --- a/src/gui/dialog/dialog.cpp +++ b/cpp/gui/dialog/dialog.cpp @@ -14,17 +14,17 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/dialog.h" +#include "dialog/dialog.h" #include "app.h" #include "exception.h" #include "file/dicom/tree.h" #include "progressbar.h" -#include "gui/dialog/dicom.h" -#include "gui/dialog/file.h" -#include "gui/dialog/progress.h" -#include "gui/dialog/report_exception.h" +#include "dialog/dicom.h" +#include "dialog/file.h" +#include "dialog/progress.h" +#include "dialog/report_exception.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/dialog.h b/cpp/gui/dialog/dialog.h similarity index 100% rename from src/gui/dialog/dialog.h rename to cpp/gui/dialog/dialog.h diff --git a/src/gui/dialog/dicom.cpp b/cpp/gui/dialog/dicom.cpp similarity index 98% rename from src/gui/dialog/dicom.cpp rename to cpp/gui/dialog/dicom.cpp index 083ef2ca5d..55272c8425 100644 --- a/src/gui/dialog/dicom.cpp +++ b/cpp/gui/dialog/dicom.cpp @@ -14,10 +14,10 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/dicom.h" +#include "dialog/dicom.h" +#include "dialog/list.h" #include "file/dicom/tree.h" -#include "gui/dialog/list.h" -#include "gui/gui.h" +#include "gui.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/dicom.h b/cpp/gui/dialog/dicom.h similarity index 96% rename from src/gui/dialog/dicom.h rename to cpp/gui/dialog/dicom.h index 1a4e762cf2..1645919608 100644 --- a/src/gui/dialog/dicom.h +++ b/cpp/gui/dialog/dicom.h @@ -17,7 +17,7 @@ #pragma once #include "file/dicom/tree.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/file.cpp b/cpp/gui/dialog/file.cpp similarity index 98% rename from src/gui/dialog/file.cpp rename to cpp/gui/dialog/file.cpp index fa4572c2a3..628a1ea97f 100644 --- a/src/gui/dialog/file.cpp +++ b/cpp/gui/dialog/file.cpp @@ -17,9 +17,9 @@ #include #include "app.h" +#include "dialog/file.h" #include "formats/list.h" -#include "gui/dialog/file.h" -#include "gui/gui.h" +#include "gui.h" #ifdef MRTRIX_MACOSX #define FILE_DIALOG_OPTIONS QFileDialog::DontUseNativeDialog diff --git a/src/gui/dialog/file.h b/cpp/gui/dialog/file.h similarity index 98% rename from src/gui/dialog/file.h rename to cpp/gui/dialog/file.h index d26862699f..ec0bfd42eb 100644 --- a/src/gui/dialog/file.h +++ b/cpp/gui/dialog/file.h @@ -17,7 +17,7 @@ #pragma once #include "file/path.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog::File { diff --git a/src/gui/dialog/image_properties.cpp b/cpp/gui/dialog/image_properties.cpp similarity index 98% rename from src/gui/dialog/image_properties.cpp rename to cpp/gui/dialog/image_properties.cpp index 1f6634ec62..60905f938c 100644 --- a/src/gui/dialog/image_properties.cpp +++ b/cpp/gui/dialog/image_properties.cpp @@ -14,11 +14,11 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/image_properties.h" +#include "dialog/image_properties.h" +#include "dialog/file.h" +#include "dialog/list.h" #include "dwi/gradient.h" #include "file/matrix.h" -#include "gui/dialog/file.h" -#include "gui/dialog/list.h" #include "header.h" #include "stride.h" diff --git a/src/gui/dialog/image_properties.h b/cpp/gui/dialog/image_properties.h similarity index 97% rename from src/gui/dialog/image_properties.h rename to cpp/gui/dialog/image_properties.h index ef9cfb59f0..b4c0b06f87 100644 --- a/src/gui/dialog/image_properties.h +++ b/cpp/gui/dialog/image_properties.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/opengl/gl.h" #include "header.h" +#include "opengl/glutils.h" namespace MR { class Header; diff --git a/src/gui/dialog/list.cpp b/cpp/gui/dialog/list.cpp similarity index 98% rename from src/gui/dialog/list.cpp rename to cpp/gui/dialog/list.cpp index 4044b1b1b0..8f56dbfd84 100644 --- a/src/gui/dialog/list.cpp +++ b/cpp/gui/dialog/list.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/list.h" +#include "dialog/list.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/list.h b/cpp/gui/dialog/list.h similarity index 97% rename from src/gui/dialog/list.h rename to cpp/gui/dialog/list.h index 03da171263..9cb7b5eb76 100644 --- a/src/gui/dialog/list.h +++ b/cpp/gui/dialog/list.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/gui.h" -#include "gui/opengl/gl.h" +#include "gui.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/opengl.cpp b/cpp/gui/dialog/opengl.cpp similarity index 97% rename from src/gui/dialog/opengl.cpp rename to cpp/gui/dialog/opengl.cpp index 2175040e23..735df1aab0 100644 --- a/src/gui/dialog/opengl.cpp +++ b/cpp/gui/dialog/opengl.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/opengl.h" -#include "gui/dialog/list.h" -#include "gui/opengl/gl.h" +#include "dialog/opengl.h" +#include "dialog/list.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/opengl.h b/cpp/gui/dialog/opengl.h similarity index 96% rename from src/gui/dialog/opengl.h rename to cpp/gui/dialog/opengl.h index 4280825193..e39942e607 100644 --- a/src/gui/dialog/opengl.h +++ b/cpp/gui/dialog/opengl.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/progress.cpp b/cpp/gui/dialog/progress.cpp similarity index 97% rename from src/gui/dialog/progress.cpp rename to cpp/gui/dialog/progress.cpp index 4ae877aae4..d967cbca92 100644 --- a/src/gui/dialog/progress.cpp +++ b/cpp/gui/dialog/progress.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/progress.h" -#include "gui/gui.h" +#include "dialog/progress.h" +#include "gui.h" #include namespace MR::GUI::Dialog::ProgressBar { diff --git a/src/gui/dialog/progress.h b/cpp/gui/dialog/progress.h similarity index 96% rename from src/gui/dialog/progress.h rename to cpp/gui/dialog/progress.h index 84c04ebd9d..80232d1ef2 100644 --- a/src/gui/dialog/progress.h +++ b/cpp/gui/dialog/progress.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" #include "progressbar.h" namespace MR::GUI::Dialog::ProgressBar { diff --git a/src/gui/dialog/report_exception.cpp b/cpp/gui/dialog/report_exception.cpp similarity index 95% rename from src/gui/dialog/report_exception.cpp rename to cpp/gui/dialog/report_exception.cpp index e69f7b500c..d215781115 100644 --- a/src/gui/dialog/report_exception.cpp +++ b/cpp/gui/dialog/report_exception.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/dialog/report_exception.h" -#include "gui/gui.h" +#include "dialog/report_exception.h" +#include "gui.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dialog/report_exception.h b/cpp/gui/dialog/report_exception.h similarity index 96% rename from src/gui/dialog/report_exception.h rename to cpp/gui/dialog/report_exception.h index 896fe314bf..8367765cb3 100644 --- a/src/gui/dialog/report_exception.h +++ b/cpp/gui/dialog/report_exception.h @@ -17,7 +17,7 @@ #pragma once #include "exception.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::Dialog { diff --git a/src/gui/dwi/render_frame.cpp b/cpp/gui/dwi/render_frame.cpp similarity index 99% rename from src/gui/dwi/render_frame.cpp rename to cpp/gui/dwi/render_frame.cpp index 1e5cde3fc5..ecc4bcf761 100644 --- a/src/gui/dwi/render_frame.cpp +++ b/cpp/gui/dwi/render_frame.cpp @@ -19,7 +19,7 @@ #include #include "app.h" -#include "gui/dwi/render_frame.h" +#include "dwi/render_frame.h" namespace MR::GUI::DWI { diff --git a/src/gui/dwi/render_frame.h b/cpp/gui/dwi/render_frame.h similarity index 95% rename from src/gui/dwi/render_frame.h rename to cpp/gui/dwi/render_frame.h index 523548de60..ec2d77891a 100644 --- a/src/gui/dwi/render_frame.h +++ b/cpp/gui/dwi/render_frame.h @@ -17,13 +17,13 @@ #pragma once #include "dwi/directions/set.h" -#include "gui/dwi/renderer.h" -#include "gui/opengl/font.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/lighting.h" -#include "gui/opengl/transformation.h" -#include "gui/projection.h" +#include "dwi/renderer.h" #include "memory.h" +#include "opengl/font.h" +#include "opengl/glutils.h" +#include "opengl/lighting.h" +#include "opengl/transformation.h" +#include "projection.h" #include "types.h" #define MAX_LOD 8 diff --git a/src/gui/dwi/renderer.cpp b/cpp/gui/dwi/renderer.cpp similarity index 99% rename from src/gui/dwi/renderer.cpp rename to cpp/gui/dwi/renderer.cpp index 725d1c8f85..2df422925e 100644 --- a/src/gui/dwi/renderer.cpp +++ b/cpp/gui/dwi/renderer.cpp @@ -16,11 +16,11 @@ #include -#include "gui/dwi/renderer.h" -#include "gui/gui.h" -#include "gui/opengl/lighting.h" -#include "gui/projection.h" +#include "dwi/renderer.h" +#include "gui.h" #include "math/legendre.h" +#include "opengl/lighting.h" +#include "projection.h" namespace MR::GUI::DWI { diff --git a/src/gui/dwi/renderer.h b/cpp/gui/dwi/renderer.h similarity index 98% rename from src/gui/dwi/renderer.h rename to cpp/gui/dwi/renderer.h index 9fb1fe4abd..44cba7204c 100644 --- a/src/gui/dwi/renderer.h +++ b/cpp/gui/dwi/renderer.h @@ -20,11 +20,11 @@ #include #include "dwi/directions/set.h" -#include "gui/gui.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/shader.h" -#include "gui/shapes/halfsphere.h" +#include "gui.h" #include "math/SH.h" +#include "opengl/glutils.h" +#include "opengl/shader.h" +#include "shapes/halfsphere.h" namespace MR::GUI { diff --git a/src/gui/gui.cpp b/cpp/gui/gui.cpp similarity index 96% rename from src/gui/gui.cpp rename to cpp/gui/gui.cpp index 68185fc72f..09a888ca80 100644 --- a/src/gui/gui.cpp +++ b/cpp/gui/gui.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/gui.h" -#include "gui/opengl/gl.h" +#include "gui.h" +#include "opengl/glutils.h" #include #include diff --git a/src/gui/gui.h b/cpp/gui/gui.h similarity index 98% rename from src/gui/gui.h rename to cpp/gui/gui.h index 63dc5928cd..599662a81f 100644 --- a/src/gui/gui.h +++ b/cpp/gui/gui.h @@ -24,7 +24,7 @@ #include "app.h" #include "file/config.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" #include diff --git a/src/gui/gui_pch.h b/cpp/gui/gui_pch.h similarity index 96% rename from src/gui/gui_pch.h rename to cpp/gui/gui_pch.h index 7227f6795f..e9f7d69347 100644 --- a/src/gui/gui_pch.h +++ b/cpp/gui/gui_pch.h @@ -16,4 +16,4 @@ #ifdef __APPLE__ #define GL_SILENCE_DEPRECATION #endif -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" diff --git a/src/gui/lighting_dock.cpp b/cpp/gui/lighting_dock.cpp similarity index 98% rename from src/gui/lighting_dock.cpp rename to cpp/gui/lighting_dock.cpp index 05380efd56..e285f9da51 100644 --- a/src/gui/lighting_dock.cpp +++ b/cpp/gui/lighting_dock.cpp @@ -14,10 +14,10 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/lighting_dock.h" +#include "lighting_dock.h" +#include "color_button.h" #include "file/config.h" -#include "gui/color_button.h" -#include "gui/gui.h" +#include "gui.h" #include "math/math.h" namespace MR::GUI { diff --git a/src/gui/lighting_dock.h b/cpp/gui/lighting_dock.h similarity index 97% rename from src/gui/lighting_dock.h rename to cpp/gui/lighting_dock.h index 3d06a5b297..a13f830e2a 100644 --- a/src/gui/lighting_dock.h +++ b/cpp/gui/lighting_dock.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/lighting.h" +#include "opengl/lighting.h" namespace MR::GUI { class LightingSettings : public QFrame { diff --git a/src/gui/mrview/adjust_button.cpp b/cpp/gui/mrview/adjust_button.cpp similarity index 98% rename from src/gui/mrview/adjust_button.cpp rename to cpp/gui/mrview/adjust_button.cpp index 208c90ecef..71dac9cd1b 100644 --- a/src/gui/mrview/adjust_button.cpp +++ b/cpp/gui/mrview/adjust_button.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/adjust_button.h" +#include "mrview/adjust_button.h" #include "math/math.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/adjust_button.h b/cpp/gui/mrview/adjust_button.h similarity index 98% rename from src/gui/mrview/adjust_button.h rename to cpp/gui/mrview/adjust_button.h index b8ecc4c6a2..25b97baa01 100644 --- a/src/gui/mrview/adjust_button.h +++ b/cpp/gui/mrview/adjust_button.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/opengl/gl.h" #include "mrtrix.h" +#include "opengl/glutils.h" #define ADJUST_BUTTON_DEADZONE_SIZE 8 diff --git a/src/gui/mrview/colourbars.cpp b/cpp/gui/mrview/colourbars.cpp similarity index 98% rename from src/gui/mrview/colourbars.cpp rename to cpp/gui/mrview/colourbars.cpp index c73a0614be..f3d9f43125 100644 --- a/src/gui/mrview/colourbars.cpp +++ b/cpp/gui/mrview/colourbars.cpp @@ -14,11 +14,11 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/colourbars.h" +#include "mrview/colourbars.h" #include "file/config.h" -#include "gui/mrview/displayable.h" -#include "gui/opengl/font.h" -#include "gui/projection.h" +#include "mrview/displayable.h" +#include "opengl/font.h" +#include "projection.h" namespace MR::GUI::MRView { // CONF option: MRViewMaxNumColourBarRows diff --git a/src/gui/mrview/colourbars.h b/cpp/gui/mrview/colourbars.h similarity index 97% rename from src/gui/mrview/colourbars.h rename to cpp/gui/mrview/colourbars.h index 2194a81ce3..fdff4713eb 100644 --- a/src/gui/mrview/colourbars.h +++ b/cpp/gui/mrview/colourbars.h @@ -17,8 +17,8 @@ #pragma once #include "colourmap.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/shader.h" +#include "opengl/glutils.h" +#include "opengl/shader.h" namespace MR::GUI { class Projection; diff --git a/src/gui/mrview/colourmap_button.cpp b/cpp/gui/mrview/colourmap_button.cpp similarity index 99% rename from src/gui/mrview/colourmap_button.cpp rename to cpp/gui/mrview/colourmap_button.cpp index b6d331c349..3c21f05285 100644 --- a/src/gui/mrview/colourmap_button.cpp +++ b/cpp/gui/mrview/colourmap_button.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/colourmap_button.h" -#include "gui/gui.h" +#include "mrview/colourmap_button.h" +#include "gui.h" #include "math/rng.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/colourmap_button.h b/cpp/gui/mrview/colourmap_button.h similarity index 98% rename from src/gui/mrview/colourmap_button.h rename to cpp/gui/mrview/colourmap_button.h index 66087d7fc9..69eee748f6 100644 --- a/src/gui/mrview/colourmap_button.h +++ b/cpp/gui/mrview/colourmap_button.h @@ -19,7 +19,7 @@ #include "mrtrix.h" #include "colourmap.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/combo_box_error.cpp b/cpp/gui/mrview/combo_box_error.cpp similarity index 97% rename from src/gui/mrview/combo_box_error.cpp rename to cpp/gui/mrview/combo_box_error.cpp index f2666b2278..1b89f76463 100644 --- a/src/gui/mrview/combo_box_error.cpp +++ b/cpp/gui/mrview/combo_box_error.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/combo_box_error.h" +#include "mrview/combo_box_error.h" #include "math/math.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/combo_box_error.h b/cpp/gui/mrview/combo_box_error.h similarity index 97% rename from src/gui/mrview/combo_box_error.h rename to cpp/gui/mrview/combo_box_error.h index ffdb8c09d4..b1b458cf46 100644 --- a/src/gui/mrview/combo_box_error.h +++ b/cpp/gui/mrview/combo_box_error.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/opengl/gl.h" #include "mrtrix.h" +#include "opengl/glutils.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/displayable.cpp b/cpp/gui/mrview/displayable.cpp similarity index 97% rename from src/gui/mrview/displayable.cpp rename to cpp/gui/mrview/displayable.cpp index f6f4edadf0..a5d7d2d078 100644 --- a/src/gui/mrview/displayable.cpp +++ b/cpp/gui/mrview/displayable.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/displayable.h" +#include "mrview/displayable.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/displayable.h b/cpp/gui/mrview/displayable.h similarity index 99% rename from src/gui/mrview/displayable.h rename to cpp/gui/mrview/displayable.h index 35ad64ba3a..c7112bc36c 100644 --- a/src/gui/mrview/displayable.h +++ b/cpp/gui/mrview/displayable.h @@ -19,9 +19,9 @@ #include "math/math.h" #include "colourmap.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/shader.h" -#include "gui/projection.h" +#include "opengl/glutils.h" +#include "opengl/shader.h" +#include "projection.h" namespace MR { class ProgressBar; diff --git a/src/gui/mrview/gui_image.cpp b/cpp/gui/mrview/gui_image.cpp similarity index 99% rename from src/gui/mrview/gui_image.cpp rename to cpp/gui/mrview/gui_image.cpp index 4673c3953f..a5a99f7a32 100644 --- a/src/gui/mrview/gui_image.cpp +++ b/cpp/gui/mrview/gui_image.cpp @@ -14,12 +14,12 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/gui_image.h" +#include "mrview/gui_image.h" -#include "gui/mrview/window.h" -#include "gui/projection.h" #include "header.h" +#include "mrview/window.h" #include "progressbar.h" +#include "projection.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/gui_image.h b/cpp/gui/mrview/gui_image.h similarity index 97% rename from src/gui/mrview/gui_image.h rename to cpp/gui/mrview/gui_image.h index 2f9b2df0ba..af71e32e77 100644 --- a/src/gui/mrview/gui_image.h +++ b/cpp/gui/mrview/gui_image.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/mrview/volume.h" -#include "gui/opengl/gl.h" #include "image.h" #include "interp/linear.h" #include "interp/nearest.h" +#include "mrview/volume.h" +#include "opengl/glutils.h" #include "types.h" #include diff --git a/src/gui/mrview/icons.h b/cpp/gui/mrview/icons.h similarity index 100% rename from src/gui/mrview/icons.h rename to cpp/gui/mrview/icons.h diff --git a/src/gui/mrview/mode/base.cpp b/cpp/gui/mrview/mode/base.cpp similarity index 99% rename from src/gui/mrview/mode/base.cpp rename to cpp/gui/mrview/mode/base.cpp index ef0a3eecf1..1005379a3b 100644 --- a/src/gui/mrview/mode/base.cpp +++ b/cpp/gui/mrview/mode/base.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/mode/base.h" +#include "mrview/mode/base.h" #include "file/config.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/base.h b/cpp/gui/mrview/mode/base.h similarity index 97% rename from src/gui/mrview/mode/base.h rename to cpp/gui/mrview/mode/base.h index 9fff55f35f..badd693aca 100644 --- a/src/gui/mrview/mode/base.h +++ b/cpp/gui/mrview/mode/base.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/mrview/tool/base.h" -#include "gui/mrview/window.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/transformation.h" -#include "gui/projection.h" +#include "mrview/tool/base.h" +#include "mrview/window.h" +#include "opengl/glutils.h" +#include "opengl/transformation.h" +#include "projection.h" #define ROTATION_INC 0.002 #define MOVE_IN_OUT_FOV_MULTIPLIER 1.0e-3f diff --git a/src/gui/mrview/mode/lightbox.cpp b/cpp/gui/mrview/mode/lightbox.cpp similarity index 99% rename from src/gui/mrview/mode/lightbox.cpp rename to cpp/gui/mrview/mode/lightbox.cpp index ac53cb6088..08622067a7 100644 --- a/src/gui/mrview/mode/lightbox.cpp +++ b/cpp/gui/mrview/mode/lightbox.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/mode/lightbox.h" +#include "mrview/mode/lightbox.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/lightbox.h b/cpp/gui/mrview/mode/lightbox.h similarity index 98% rename from src/gui/mrview/mode/lightbox.h rename to cpp/gui/mrview/mode/lightbox.h index 11a996b41b..c37e6147df 100644 --- a/src/gui/mrview/mode/lightbox.h +++ b/cpp/gui/mrview/mode/lightbox.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/mode/slice.h" +#include "mrview/mode/slice.h" namespace MR::GUI::MRView::Mode { class LightBox : public Slice { diff --git a/src/gui/mrview/mode/lightbox_gui.h b/cpp/gui/mrview/mode/lightbox_gui.h similarity index 97% rename from src/gui/mrview/mode/lightbox_gui.h rename to cpp/gui/mrview/mode/lightbox_gui.h index d81a04e9c1..aff1317931 100644 --- a/src/gui/mrview/mode/lightbox_gui.h +++ b/cpp/gui/mrview/mode/lightbox_gui.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/spin_box.h" +#include "mrview/spin_box.h" namespace MR::GUI::MRView::Mode::LightBoxViewControls { class LightBoxEditButton : public SpinBox { diff --git a/src/gui/mrview/mode/list.h b/cpp/gui/mrview/mode/list.h similarity index 90% rename from src/gui/mrview/mode/list.h rename to cpp/gui/mrview/mode/list.h index 272e783837..e947a798a5 100644 --- a/src/gui/mrview/mode/list.h +++ b/cpp/gui/mrview/mode/list.h @@ -17,10 +17,10 @@ #ifndef MODE // place #include files in here: -#include "gui/mrview/mode/lightbox.h" -#include "gui/mrview/mode/ortho.h" -#include "gui/mrview/mode/slice.h" -#include "gui/mrview/mode/volume.h" +#include "mrview/mode/lightbox.h" +#include "mrview/mode/ortho.h" +#include "mrview/mode/slice.h" +#include "mrview/mode/volume.h" #else diff --git a/src/gui/mrview/mode/ortho.cpp b/cpp/gui/mrview/mode/ortho.cpp similarity index 98% rename from src/gui/mrview/mode/ortho.cpp rename to cpp/gui/mrview/mode/ortho.cpp index de4583756d..67d095a1de 100644 --- a/src/gui/mrview/mode/ortho.cpp +++ b/cpp/gui/mrview/mode/ortho.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/mode/ortho.h" +#include "mrview/mode/ortho.h" -#include "gui/cursor.h" +#include "cursor.h" #include "mrtrix.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/ortho.h b/cpp/gui/mrview/mode/ortho.h similarity index 97% rename from src/gui/mrview/mode/ortho.h rename to cpp/gui/mrview/mode/ortho.h index e65cfc3351..6ae0787064 100644 --- a/src/gui/mrview/mode/ortho.h +++ b/cpp/gui/mrview/mode/ortho.h @@ -17,7 +17,7 @@ #pragma once #include "app.h" -#include "gui/mrview/mode/slice.h" +#include "mrview/mode/slice.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/slice.cpp b/cpp/gui/mrview/mode/slice.cpp similarity index 98% rename from src/gui/mrview/mode/slice.cpp rename to cpp/gui/mrview/mode/slice.cpp index 4477a7a280..21dc8d7959 100644 --- a/src/gui/mrview/mode/slice.cpp +++ b/cpp/gui/mrview/mode/slice.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/mode/slice.h" +#include "mrview/mode/slice.h" -#include "gui/opengl/transformation.h" +#include "opengl/transformation.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/slice.h b/cpp/gui/mrview/mode/slice.h similarity index 97% rename from src/gui/mrview/mode/slice.h rename to cpp/gui/mrview/mode/slice.h index b763613d89..b11d0241ed 100644 --- a/src/gui/mrview/mode/slice.h +++ b/cpp/gui/mrview/mode/slice.h @@ -17,7 +17,7 @@ #pragma once #include "app.h" -#include "gui/mrview/mode/base.h" +#include "mrview/mode/base.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/volume.cpp b/cpp/gui/mrview/mode/volume.cpp similarity index 99% rename from src/gui/mrview/mode/volume.cpp rename to cpp/gui/mrview/mode/volume.cpp index 7d47f2a54b..38ea4a8d60 100644 --- a/src/gui/mrview/mode/volume.cpp +++ b/cpp/gui/mrview/mode/volume.cpp @@ -14,12 +14,12 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/mode/volume.h" +#include "mrview/mode/volume.h" #include "file/config.h" -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/view.h" -#include "gui/opengl/lighting.h" +#include "mrview/adjust_button.h" +#include "mrview/tool/base.h" +#include "mrview/tool/view.h" +#include "opengl/lighting.h" namespace MR::GUI::MRView::Mode { diff --git a/src/gui/mrview/mode/volume.h b/cpp/gui/mrview/mode/volume.h similarity index 96% rename from src/gui/mrview/mode/volume.h rename to cpp/gui/mrview/mode/volume.h index a2a5d9ec01..850336e12c 100644 --- a/src/gui/mrview/mode/volume.h +++ b/cpp/gui/mrview/mode/volume.h @@ -17,8 +17,8 @@ #pragma once #include "app.h" -#include "gui/mrview/mode/base.h" -#include "gui/opengl/transformation.h" +#include "mrview/mode/base.h" +#include "opengl/transformation.h" namespace MR::GUI::MRView { namespace Tool { diff --git a/src/gui/mrview/qthelpers.cpp b/cpp/gui/mrview/qthelpers.cpp similarity index 96% rename from src/gui/mrview/qthelpers.cpp rename to cpp/gui/mrview/qthelpers.cpp index aa4627e82c..4bff14af57 100644 --- a/src/gui/mrview/qthelpers.cpp +++ b/cpp/gui/mrview/qthelpers.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/qthelpers.h" +#include "mrview/qthelpers.h" #include #include diff --git a/src/gui/mrview/qthelpers.h b/cpp/gui/mrview/qthelpers.h similarity index 100% rename from src/gui/mrview/qthelpers.h rename to cpp/gui/mrview/qthelpers.h diff --git a/src/gui/mrview/spin_box.h b/cpp/gui/mrview/spin_box.h similarity index 97% rename from src/gui/mrview/spin_box.h rename to cpp/gui/mrview/spin_box.h index 1f4bb58a2a..d01f439d93 100644 --- a/src/gui/mrview/spin_box.h +++ b/cpp/gui/mrview/spin_box.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/opengl/gl.h" #include "mrtrix.h" +#include "opengl/glutils.h" namespace MR::GUI { diff --git a/src/gui/mrview/sync/client.cpp b/cpp/gui/mrview/sync/client.cpp similarity index 98% rename from src/gui/mrview/sync/client.cpp rename to cpp/gui/mrview/sync/client.cpp index eb78c892d6..28877b903d 100644 --- a/src/gui/mrview/sync/client.cpp +++ b/cpp/gui/mrview/sync/client.cpp @@ -15,7 +15,7 @@ */ #include -#include "gui/mrview/sync/client.h" +#include "mrview/sync/client.h" #include namespace MR::GUI::MRView::Sync { diff --git a/src/gui/mrview/sync/client.h b/cpp/gui/mrview/sync/client.h similarity index 100% rename from src/gui/mrview/sync/client.h rename to cpp/gui/mrview/sync/client.h diff --git a/src/gui/mrview/sync/enums.h b/cpp/gui/mrview/sync/enums.h similarity index 100% rename from src/gui/mrview/sync/enums.h rename to cpp/gui/mrview/sync/enums.h diff --git a/src/gui/mrview/sync/interprocesscommunicator.cpp b/cpp/gui/mrview/sync/interprocesscommunicator.cpp similarity index 98% rename from src/gui/mrview/sync/interprocesscommunicator.cpp rename to cpp/gui/mrview/sync/interprocesscommunicator.cpp index fc49e3be45..408cad1eed 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.cpp +++ b/cpp/gui/mrview/sync/interprocesscommunicator.cpp @@ -19,9 +19,9 @@ #include #include "exception.h" -#include "gui/mrview/sync/enums.h" -#include "gui/mrview/sync/interprocesscommunicator.h" -#include "gui/mrview/sync/processlock.h" +#include "mrview/sync/enums.h" +#include "mrview/sync/interprocesscommunicator.h" +#include "mrview/sync/processlock.h" namespace MR::GUI::MRView::Sync { InterprocessCommunicator::InterprocessCommunicator() : QObject(0) { diff --git a/src/gui/mrview/sync/interprocesscommunicator.h b/cpp/gui/mrview/sync/interprocesscommunicator.h similarity index 96% rename from src/gui/mrview/sync/interprocesscommunicator.h rename to cpp/gui/mrview/sync/interprocesscommunicator.h index bbcc125d7f..ea88d4577a 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.h +++ b/cpp/gui/mrview/sync/interprocesscommunicator.h @@ -17,8 +17,8 @@ #include -#include "gui/mrview/sync/client.h" -#include "gui/mrview/sync/localsocketreader.h" +#include "mrview/sync/client.h" +#include "mrview/sync/localsocketreader.h" // maximum number of inter process syncers that are allowed. This can be // raised, but may reduce performance when new IPS are created. diff --git a/src/gui/mrview/sync/localsocketreader.cpp b/cpp/gui/mrview/sync/localsocketreader.cpp similarity index 98% rename from src/gui/mrview/sync/localsocketreader.cpp rename to cpp/gui/mrview/sync/localsocketreader.cpp index 551e6f1a98..d185570cf1 100644 --- a/src/gui/mrview/sync/localsocketreader.cpp +++ b/cpp/gui/mrview/sync/localsocketreader.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/sync/localsocketreader.h" +#include "mrview/sync/localsocketreader.h" #include "exception.h" namespace MR::GUI::MRView::Sync { diff --git a/src/gui/mrview/sync/localsocketreader.h b/cpp/gui/mrview/sync/localsocketreader.h similarity index 100% rename from src/gui/mrview/sync/localsocketreader.h rename to cpp/gui/mrview/sync/localsocketreader.h diff --git a/src/gui/mrview/sync/processlock.cpp b/cpp/gui/mrview/sync/processlock.cpp similarity index 98% rename from src/gui/mrview/sync/processlock.cpp rename to cpp/gui/mrview/sync/processlock.cpp index e1b881f819..80fc9cc3ca 100644 --- a/src/gui/mrview/sync/processlock.cpp +++ b/cpp/gui/mrview/sync/processlock.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/sync/processlock.h" +#include "mrview/sync/processlock.h" #include namespace MR::GUI::MRView::Sync { diff --git a/src/gui/mrview/sync/processlock.h b/cpp/gui/mrview/sync/processlock.h similarity index 100% rename from src/gui/mrview/sync/processlock.h rename to cpp/gui/mrview/sync/processlock.h diff --git a/src/gui/mrview/sync/syncmanager.cpp b/cpp/gui/mrview/sync/syncmanager.cpp similarity index 98% rename from src/gui/mrview/sync/syncmanager.cpp rename to cpp/gui/mrview/sync/syncmanager.cpp index 8a74c011f6..07b82bf85a 100644 --- a/src/gui/mrview/sync/syncmanager.cpp +++ b/cpp/gui/mrview/sync/syncmanager.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/sync/syncmanager.h" -#include "gui/mrview/window.h" +#include "mrview/sync/syncmanager.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Sync { SyncManager::SyncManager() : QObject(0) { diff --git a/src/gui/mrview/sync/syncmanager.h b/cpp/gui/mrview/sync/syncmanager.h similarity index 95% rename from src/gui/mrview/sync/syncmanager.h rename to cpp/gui/mrview/sync/syncmanager.h index 0c5d941863..ebf2f4411b 100644 --- a/src/gui/mrview/sync/syncmanager.h +++ b/cpp/gui/mrview/sync/syncmanager.h @@ -15,8 +15,8 @@ */ #pragma once -#include "gui/mrview/sync/enums.h" -#include "gui/mrview/sync/interprocesscommunicator.h" +#include "mrview/sync/enums.h" +#include "mrview/sync/interprocesscommunicator.h" namespace MR::GUI::MRView::Sync { /** diff --git a/src/gui/mrview/tool/base.cpp b/cpp/gui/mrview/tool/base.cpp similarity index 98% rename from src/gui/mrview/tool/base.cpp rename to cpp/gui/mrview/tool/base.cpp index 61df483771..e0cd88ee43 100644 --- a/src/gui/mrview/tool/base.cpp +++ b/cpp/gui/mrview/tool/base.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/base.h" +#include "mrview/tool/base.h" #include "app.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/base.h b/cpp/gui/mrview/tool/base.h similarity index 98% rename from src/gui/mrview/tool/base.h rename to cpp/gui/mrview/tool/base.h index 8866264c13..19744a0a3c 100644 --- a/src/gui/mrview/tool/base.h +++ b/cpp/gui/mrview/tool/base.h @@ -18,8 +18,8 @@ #include "file/config.h" -#include "gui/mrview/window.h" -#include "gui/projection.h" +#include "mrview/window.h" +#include "projection.h" #define LAYOUT_SPACING 3 diff --git a/src/gui/mrview/tool/connectome/colourmap_observers.cpp b/cpp/gui/mrview/tool/connectome/colourmap_observers.cpp similarity index 96% rename from src/gui/mrview/tool/connectome/colourmap_observers.cpp rename to cpp/gui/mrview/tool/connectome/colourmap_observers.cpp index 5766bf212a..a71da5c2b1 100644 --- a/src/gui/mrview/tool/connectome/colourmap_observers.cpp +++ b/cpp/gui/mrview/tool/connectome/colourmap_observers.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/colourmap_observers.h" +#include "mrview/tool/connectome/colourmap_observers.h" -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/connectome/connectome.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/colourmap_observers.h b/cpp/gui/mrview/tool/connectome/colourmap_observers.h similarity index 96% rename from src/gui/mrview/tool/connectome/colourmap_observers.h rename to cpp/gui/mrview/tool/connectome/colourmap_observers.h index c3e912e002..5edf3d8308 100644 --- a/src/gui/mrview/tool/connectome/colourmap_observers.h +++ b/cpp/gui/mrview/tool/connectome/colourmap_observers.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/mrview/colourmap_button.h" -#include "gui/opengl/gl.h" +#include "mrview/colourmap_button.h" +#include "opengl/glutils.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/connectome.cpp b/cpp/gui/mrview/tool/connectome/connectome.cpp similarity index 99% rename from src/gui/mrview/tool/connectome/connectome.cpp rename to cpp/gui/mrview/tool/connectome/connectome.cpp index d0a8341f81..d9750b738b 100644 --- a/src/gui/mrview/tool/connectome/connectome.cpp +++ b/cpp/gui/mrview/tool/connectome/connectome.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/connectome/connectome.h" #include "header.h" #include "transform.h" @@ -22,8 +22,8 @@ #include "adapter/subset.h" #include "algo/loop.h" #include "algo/threaded_loop.h" +#include "dialog/file.h" #include "file/path.h" -#include "gui/dialog/file.h" #include "math/math.h" #include "math/rng.h" diff --git a/src/gui/mrview/tool/connectome/connectome.h b/cpp/gui/mrview/tool/connectome/connectome.h similarity index 92% rename from src/gui/mrview/tool/connectome/connectome.h rename to cpp/gui/mrview/tool/connectome/connectome.h index 288d71ec8b..e4ee520fcc 100644 --- a/src/gui/mrview/tool/connectome/connectome.h +++ b/cpp/gui/mrview/tool/connectome/connectome.h @@ -24,34 +24,34 @@ #include "misc/bitset.h" #include "surface/mesh.h" -#include "gui/color_button.h" -#include "gui/lighting_dock.h" -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/colourmap_button.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/base.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/lighting.h" -#include "gui/opengl/shader.h" -#include "gui/projection.h" -#include "gui/shapes/cube.h" -#include "gui/shapes/cylinder.h" -#include "gui/shapes/sphere.h" +#include "color_button.h" +#include "lighting_dock.h" +#include "mrview/adjust_button.h" +#include "mrview/colourmap_button.h" +#include "mrview/mode/base.h" +#include "mrview/spin_box.h" +#include "mrview/tool/base.h" +#include "opengl/glutils.h" +#include "opengl/lighting.h" +#include "opengl/shader.h" +#include "projection.h" +#include "shapes/cube.h" +#include "shapes/cylinder.h" +#include "shapes/sphere.h" #include "connectome/lut.h" #include "connectome/mat2vec.h" -#include "gui/mrview/tool/connectome/colourmap_observers.h" -#include "gui/mrview/tool/connectome/edge.h" -#include "gui/mrview/tool/connectome/file_data_vector.h" -#include "gui/mrview/tool/connectome/matrix_list.h" -#include "gui/mrview/tool/connectome/node.h" -#include "gui/mrview/tool/connectome/node_list.h" -#include "gui/mrview/tool/connectome/node_overlay.h" -#include "gui/mrview/tool/connectome/selection.h" -#include "gui/mrview/tool/connectome/shaders.h" -#include "gui/mrview/tool/connectome/types.h" +#include "mrview/tool/connectome/colourmap_observers.h" +#include "mrview/tool/connectome/edge.h" +#include "mrview/tool/connectome/file_data_vector.h" +#include "mrview/tool/connectome/matrix_list.h" +#include "mrview/tool/connectome/node.h" +#include "mrview/tool/connectome/node_list.h" +#include "mrview/tool/connectome/node_overlay.h" +#include "mrview/tool/connectome/selection.h" +#include "mrview/tool/connectome/shaders.h" +#include "mrview/tool/connectome/types.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/edge.cpp b/cpp/gui/mrview/tool/connectome/edge.cpp similarity index 99% rename from src/gui/mrview/tool/connectome/edge.cpp rename to cpp/gui/mrview/tool/connectome/edge.cpp index 240b496601..f876dc8c5b 100644 --- a/src/gui/mrview/tool/connectome/edge.cpp +++ b/cpp/gui/mrview/tool/connectome/edge.cpp @@ -14,14 +14,14 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/edge.h" +#include "mrview/tool/connectome/edge.h" #include "math/rng.h" #include "dwi/tractography/file.h" #include "dwi/tractography/properties.h" #include "dwi/tractography/streamline.h" -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/connectome/connectome.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/edge.h b/cpp/gui/mrview/tool/connectome/edge.h similarity index 99% rename from src/gui/mrview/tool/connectome/edge.h rename to cpp/gui/mrview/tool/connectome/edge.h index 3f55c60a16..1caf6225e7 100644 --- a/src/gui/mrview/tool/connectome/edge.h +++ b/cpp/gui/mrview/tool/connectome/edge.h @@ -20,8 +20,8 @@ #include "connectome/connectome.h" #include "dwi/tractography/streamline.h" -#include "gui/opengl/gl.h" #include "math/math.h" +#include "opengl/glutils.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/file_data_vector.cpp b/cpp/gui/mrview/tool/connectome/file_data_vector.cpp similarity index 97% rename from src/gui/mrview/tool/connectome/file_data_vector.cpp rename to cpp/gui/mrview/tool/connectome/file_data_vector.cpp index 91195a8a2e..ba4831c9bf 100644 --- a/src/gui/mrview/tool/connectome/file_data_vector.cpp +++ b/cpp/gui/mrview/tool/connectome/file_data_vector.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/file_data_vector.h" +#include "mrview/tool/connectome/file_data_vector.h" #include diff --git a/src/gui/mrview/tool/connectome/file_data_vector.h b/cpp/gui/mrview/tool/connectome/file_data_vector.h similarity index 98% rename from src/gui/mrview/tool/connectome/file_data_vector.h rename to cpp/gui/mrview/tool/connectome/file_data_vector.h index c4f78a96a1..39afb40c8b 100644 --- a/src/gui/mrview/tool/connectome/file_data_vector.h +++ b/cpp/gui/mrview/tool/connectome/file_data_vector.h @@ -18,7 +18,7 @@ #include -#include "gui/gui.h" +#include "gui.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/matrix_list.cpp b/cpp/gui/mrview/tool/connectome/matrix_list.cpp similarity index 91% rename from src/gui/mrview/tool/connectome/matrix_list.cpp rename to cpp/gui/mrview/tool/connectome/matrix_list.cpp index cc5dc10763..a451e9bbf6 100644 --- a/src/gui/mrview/tool/connectome/matrix_list.cpp +++ b/cpp/gui/mrview/tool/connectome/matrix_list.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/matrix_list.h" +#include "mrview/tool/connectome/matrix_list.h" -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/connectome/connectome.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/matrix_list.h b/cpp/gui/mrview/tool/connectome/matrix_list.h similarity index 97% rename from src/gui/mrview/tool/connectome/matrix_list.h rename to cpp/gui/mrview/tool/connectome/matrix_list.h index 4802c5ea53..5c825ba4f6 100644 --- a/src/gui/mrview/tool/connectome/matrix_list.h +++ b/cpp/gui/mrview/tool/connectome/matrix_list.h @@ -20,8 +20,8 @@ #include -#include "gui/mrview/tool/connectome/file_data_vector.h" #include "mrtrix.h" +#include "mrview/tool/connectome/file_data_vector.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/tool/connectome/node.cpp b/cpp/gui/mrview/tool/connectome/node.cpp similarity index 97% rename from src/gui/mrview/tool/connectome/node.cpp rename to cpp/gui/mrview/tool/connectome/node.cpp index f0876ec3ce..14cdff2c85 100644 --- a/src/gui/mrview/tool/connectome/node.cpp +++ b/cpp/gui/mrview/tool/connectome/node.cpp @@ -14,11 +14,11 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/node.h" -#include "gui/mrview/window.h" +#include "mrview/tool/connectome/node.h" +#include "mrview/window.h" #include "exception.h" -#include "gui/mrview/window.h" +#include "mrview/window.h" #include "types.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/node.h b/cpp/gui/mrview/tool/connectome/node.h similarity index 99% rename from src/gui/mrview/tool/connectome/node.h rename to cpp/gui/mrview/tool/connectome/node.h index c24fafadef..8744e4853b 100644 --- a/src/gui/mrview/tool/connectome/node.h +++ b/cpp/gui/mrview/tool/connectome/node.h @@ -18,7 +18,7 @@ #include "image.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" #include "surface/mesh.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/node_list.cpp b/cpp/gui/mrview/tool/connectome/node_list.cpp similarity index 97% rename from src/gui/mrview/tool/connectome/node_list.cpp rename to cpp/gui/mrview/tool/connectome/node_list.cpp index ffeddc2f95..95671d394f 100644 --- a/src/gui/mrview/tool/connectome/node_list.cpp +++ b/cpp/gui/mrview/tool/connectome/node_list.cpp @@ -14,12 +14,12 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/node_list.h" +#include "mrview/tool/connectome/node_list.h" #include -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/base.h" +#include "mrview/tool/connectome/connectome.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/node_list.h b/cpp/gui/mrview/tool/connectome/node_list.h similarity index 97% rename from src/gui/mrview/tool/connectome/node_list.h rename to cpp/gui/mrview/tool/connectome/node_list.h index 5f16e67a46..73a937a518 100644 --- a/src/gui/mrview/tool/connectome/node_list.h +++ b/cpp/gui/mrview/tool/connectome/node_list.h @@ -18,8 +18,8 @@ #include -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/connectome/selection.h" +#include "mrview/tool/base.h" +#include "mrview/tool/connectome/selection.h" #include #include diff --git a/src/gui/mrview/tool/connectome/node_overlay.cpp b/cpp/gui/mrview/tool/connectome/node_overlay.cpp similarity index 98% rename from src/gui/mrview/tool/connectome/node_overlay.cpp rename to cpp/gui/mrview/tool/connectome/node_overlay.cpp index af3c44d7f8..3509221e0e 100644 --- a/src/gui/mrview/tool/connectome/node_overlay.cpp +++ b/cpp/gui/mrview/tool/connectome/node_overlay.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/node_overlay.h" +#include "mrview/tool/connectome/node_overlay.h" #include diff --git a/src/gui/mrview/tool/connectome/node_overlay.h b/cpp/gui/mrview/tool/connectome/node_overlay.h similarity index 94% rename from src/gui/mrview/tool/connectome/node_overlay.h rename to cpp/gui/mrview/tool/connectome/node_overlay.h index 0e36bedaab..76cb7ffed9 100644 --- a/src/gui/mrview/tool/connectome/node_overlay.h +++ b/cpp/gui/mrview/tool/connectome/node_overlay.h @@ -19,8 +19,8 @@ #include "header.h" #include "types.h" -#include "gui/mrview/displayable.h" -#include "gui/mrview/gui_image.h" +#include "mrview/displayable.h" +#include "mrview/gui_image.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/selection.cpp b/cpp/gui/mrview/tool/connectome/selection.cpp similarity index 99% rename from src/gui/mrview/tool/connectome/selection.cpp rename to cpp/gui/mrview/tool/connectome/selection.cpp index bd83c9b58f..5ca1f8b9b1 100644 --- a/src/gui/mrview/tool/connectome/selection.cpp +++ b/cpp/gui/mrview/tool/connectome/selection.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/selection.h" +#include "mrview/tool/connectome/selection.h" -#include "gui/mrview/tool/base.h" +#include "mrview/tool/base.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/selection.h b/cpp/gui/mrview/tool/connectome/selection.h similarity index 99% rename from src/gui/mrview/tool/connectome/selection.h rename to cpp/gui/mrview/tool/connectome/selection.h index f06182cdbb..ed82c46574 100644 --- a/src/gui/mrview/tool/connectome/selection.h +++ b/cpp/gui/mrview/tool/connectome/selection.h @@ -18,8 +18,8 @@ #include "mrtrix.h" -#include "gui/color_button.h" -#include "gui/mrview/adjust_button.h" +#include "color_button.h" +#include "mrview/adjust_button.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/shaders.cpp b/cpp/gui/mrview/tool/connectome/shaders.cpp similarity index 99% rename from src/gui/mrview/tool/connectome/shaders.cpp rename to cpp/gui/mrview/tool/connectome/shaders.cpp index 9cd343d48b..7fefd933d0 100644 --- a/src/gui/mrview/tool/connectome/shaders.cpp +++ b/cpp/gui/mrview/tool/connectome/shaders.cpp @@ -14,10 +14,10 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/connectome/shaders.h" -#include "gui/mrview/window.h" +#include "mrview/tool/connectome/shaders.h" +#include "mrview/window.h" -#include "gui/mrview/tool/connectome/connectome.h" +#include "mrview/tool/connectome/connectome.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/shaders.h b/cpp/gui/mrview/tool/connectome/shaders.h similarity index 96% rename from src/gui/mrview/tool/connectome/shaders.h rename to cpp/gui/mrview/tool/connectome/shaders.h index a87f5fdf68..bf7d1ceb41 100644 --- a/src/gui/mrview/tool/connectome/shaders.h +++ b/cpp/gui/mrview/tool/connectome/shaders.h @@ -16,9 +16,9 @@ #pragma once -#include "gui/opengl/shader.h" +#include "opengl/shader.h" -#include "gui/mrview/tool/connectome/types.h" +#include "mrview/tool/connectome/types.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/connectome/types.h b/cpp/gui/mrview/tool/connectome/types.h similarity index 100% rename from src/gui/mrview/tool/connectome/types.h rename to cpp/gui/mrview/tool/connectome/types.h diff --git a/src/gui/mrview/tool/fixel/base_fixel.cpp b/cpp/gui/mrview/tool/fixel/base_fixel.cpp similarity index 99% rename from src/gui/mrview/tool/fixel/base_fixel.cpp rename to cpp/gui/mrview/tool/fixel/base_fixel.cpp index 463d0d6c98..0068827b1d 100644 --- a/src/gui/mrview/tool/fixel/base_fixel.cpp +++ b/cpp/gui/mrview/tool/fixel/base_fixel.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/fixel/base_fixel.h" +#include "mrview/tool/fixel/base_fixel.h" namespace MR::GUI::MRView::Tool { BaseFixel::BaseFixel(const std::string &filename, Fixel &fixel_tool) diff --git a/src/gui/mrview/tool/fixel/base_fixel.h b/cpp/gui/mrview/tool/fixel/base_fixel.h similarity index 98% rename from src/gui/mrview/tool/fixel/base_fixel.h rename to cpp/gui/mrview/tool/fixel/base_fixel.h index fa78f92eff..5c1cfa95ca 100644 --- a/src/gui/mrview/tool/fixel/base_fixel.h +++ b/cpp/gui/mrview/tool/fixel/base_fixel.h @@ -27,9 +27,9 @@ #include "fixel/legacy/fixel_metric.h" #include "fixel/legacy/image.h" -#include "gui/mrview/displayable.h" -#include "gui/mrview/tool/fixel/fixel.h" -#include "gui/mrview/tool/fixel/vector_structs.h" +#include "mrview/displayable.h" +#include "mrview/tool/fixel/fixel.h" +#include "mrview/tool/fixel/vector_structs.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/fixel/directory.cpp b/cpp/gui/mrview/tool/fixel/directory.cpp similarity index 98% rename from src/gui/mrview/tool/fixel/directory.cpp rename to cpp/gui/mrview/tool/fixel/directory.cpp index a58a0fc33e..8819b16fec 100644 --- a/src/gui/mrview/tool/fixel/directory.cpp +++ b/cpp/gui/mrview/tool/fixel/directory.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/fixel/directory.h" +#include "mrview/tool/fixel/directory.h" namespace MR::GUI::MRView::Tool { void Directory::load_image_buffer() { diff --git a/src/gui/mrview/tool/fixel/directory.h b/cpp/gui/mrview/tool/fixel/directory.h similarity index 96% rename from src/gui/mrview/tool/fixel/directory.h rename to cpp/gui/mrview/tool/fixel/directory.h index 7df06b4ebf..2417a8ed04 100644 --- a/src/gui/mrview/tool/fixel/directory.h +++ b/cpp/gui/mrview/tool/fixel/directory.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/tool/fixel/base_fixel.h" +#include "mrview/tool/fixel/base_fixel.h" namespace MR::GUI::MRView::Tool { class Directory : public FixelType { diff --git a/src/gui/mrview/tool/fixel/fixel.cpp b/cpp/gui/mrview/tool/fixel/fixel.cpp similarity index 98% rename from src/gui/mrview/tool/fixel/fixel.cpp rename to cpp/gui/mrview/tool/fixel/fixel.cpp index d8a749a253..17b7ef6685 100644 --- a/src/gui/mrview/tool/fixel/fixel.cpp +++ b/cpp/gui/mrview/tool/fixel/fixel.cpp @@ -14,18 +14,18 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/fixel/fixel.h" - -#include "gui/dialog/file.h" -#include "gui/mrview/qthelpers.h" -#include "gui/mrview/tool/fixel/base_fixel.h" -#include "gui/mrview/tool/fixel/directory.h" -#include "gui/mrview/tool/fixel/image4D.h" -#include "gui/mrview/tool/fixel/legacy.h" -#include "gui/mrview/tool/list_model_base.h" -#include "gui/mrview/window.h" +#include "mrview/tool/fixel/fixel.h" + +#include "dialog/file.h" #include "math/rng.h" #include "mrtrix.h" +#include "mrview/qthelpers.h" +#include "mrview/tool/fixel/base_fixel.h" +#include "mrview/tool/fixel/directory.h" +#include "mrview/tool/fixel/image4D.h" +#include "mrview/tool/fixel/legacy.h" +#include "mrview/tool/list_model_base.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/fixel/fixel.h b/cpp/gui/mrview/tool/fixel/fixel.h similarity index 95% rename from src/gui/mrview/tool/fixel/fixel.h rename to cpp/gui/mrview/tool/fixel/fixel.h index 528b88d1b4..dd496e1267 100644 --- a/src/gui/mrview/tool/fixel/fixel.h +++ b/cpp/gui/mrview/tool/fixel/fixel.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/colourmap_button.h" -#include "gui/mrview/combo_box_error.h" -#include "gui/mrview/tool/base.h" -#include "gui/projection.h" +#include "mrview/adjust_button.h" +#include "mrview/colourmap_button.h" +#include "mrview/combo_box_error.h" +#include "mrview/tool/base.h" +#include "projection.h" namespace MR::GUI::MRView::Tool { class Fixel : public Base, public ColourMapButtonObserver, public DisplayableVisitor { diff --git a/src/gui/mrview/tool/fixel/image4D.cpp b/cpp/gui/mrview/tool/fixel/image4D.cpp similarity index 98% rename from src/gui/mrview/tool/fixel/image4D.cpp rename to cpp/gui/mrview/tool/fixel/image4D.cpp index 1ba73a9d5c..c44adf1187 100644 --- a/src/gui/mrview/tool/fixel/image4D.cpp +++ b/cpp/gui/mrview/tool/fixel/image4D.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/fixel/image4D.h" +#include "mrview/tool/fixel/image4D.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/fixel/image4D.h b/cpp/gui/mrview/tool/fixel/image4D.h similarity index 96% rename from src/gui/mrview/tool/fixel/image4D.h rename to cpp/gui/mrview/tool/fixel/image4D.h index 2ce2241b46..dab9e0c219 100644 --- a/src/gui/mrview/tool/fixel/image4D.h +++ b/cpp/gui/mrview/tool/fixel/image4D.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/tool/fixel/base_fixel.h" +#include "mrview/tool/fixel/base_fixel.h" namespace MR::GUI::MRView::Tool { class Image4D : public FixelType { diff --git a/src/gui/mrview/tool/fixel/legacy.cpp b/cpp/gui/mrview/tool/fixel/legacy.cpp similarity index 98% rename from src/gui/mrview/tool/fixel/legacy.cpp rename to cpp/gui/mrview/tool/fixel/legacy.cpp index 579e81307e..27bff99e1f 100644 --- a/src/gui/mrview/tool/fixel/legacy.cpp +++ b/cpp/gui/mrview/tool/fixel/legacy.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/fixel/legacy.h" +#include "mrview/tool/fixel/legacy.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/fixel/legacy.h b/cpp/gui/mrview/tool/fixel/legacy.h similarity index 96% rename from src/gui/mrview/tool/fixel/legacy.h rename to cpp/gui/mrview/tool/fixel/legacy.h index 6f56a15393..8d8f6ce427 100644 --- a/src/gui/mrview/tool/fixel/legacy.h +++ b/cpp/gui/mrview/tool/fixel/legacy.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/tool/fixel/base_fixel.h" +#include "mrview/tool/fixel/base_fixel.h" namespace MR::GUI::MRView::Tool { class Legacy : public FixelType { diff --git a/src/gui/mrview/tool/fixel/vector_structs.h b/cpp/gui/mrview/tool/fixel/vector_structs.h similarity index 100% rename from src/gui/mrview/tool/fixel/vector_structs.h rename to cpp/gui/mrview/tool/fixel/vector_structs.h diff --git a/src/gui/mrview/tool/list.h b/cpp/gui/mrview/tool/list.h similarity index 80% rename from src/gui/mrview/tool/list.h rename to cpp/gui/mrview/tool/list.h index 701288ddb4..58ea938bd9 100644 --- a/src/gui/mrview/tool/list.h +++ b/cpp/gui/mrview/tool/list.h @@ -17,15 +17,15 @@ #ifndef TOOL // place #include files in here: -#include "gui/mrview/tool/connectome/connectome.h" -#include "gui/mrview/tool/fixel/fixel.h" -#include "gui/mrview/tool/odf/odf.h" -#include "gui/mrview/tool/overlay.h" -#include "gui/mrview/tool/roi_editor/roi.h" -#include "gui/mrview/tool/screen_capture.h" -#include "gui/mrview/tool/tractography/tractography.h" -#include "gui/mrview/tool/transform.h" -#include "gui/mrview/tool/view.h" +#include "mrview/tool/connectome/connectome.h" +#include "mrview/tool/fixel/fixel.h" +#include "mrview/tool/odf/odf.h" +#include "mrview/tool/overlay.h" +#include "mrview/tool/roi_editor/roi.h" +#include "mrview/tool/screen_capture.h" +#include "mrview/tool/tractography/tractography.h" +#include "mrview/tool/transform.h" +#include "mrview/tool/view.h" #else diff --git a/src/gui/mrview/tool/list_model_base.h b/cpp/gui/mrview/tool/list_model_base.h similarity index 99% rename from src/gui/mrview/tool/list_model_base.h rename to cpp/gui/mrview/tool/list_model_base.h index 739f720618..8893878ade 100644 --- a/src/gui/mrview/tool/list_model_base.h +++ b/cpp/gui/mrview/tool/list_model_base.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/mrview/displayable.h" +#include "mrview/displayable.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/odf/item.cpp b/cpp/gui/mrview/tool/odf/item.cpp similarity index 99% rename from src/gui/mrview/tool/odf/item.cpp rename to cpp/gui/mrview/tool/odf/item.cpp index 7e7e85ca3a..b9d415d477 100644 --- a/src/gui/mrview/tool/odf/item.cpp +++ b/cpp/gui/mrview/tool/odf/item.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/odf/item.h" +#include "mrview/tool/odf/item.h" #include "dwi/gradient.h" #include "header.h" diff --git a/src/gui/mrview/tool/odf/item.h b/cpp/gui/mrview/tool/odf/item.h similarity index 95% rename from src/gui/mrview/tool/odf/item.h rename to cpp/gui/mrview/tool/odf/item.h index d1b9384ded..4912864646 100644 --- a/src/gui/mrview/tool/odf/item.h +++ b/cpp/gui/mrview/tool/odf/item.h @@ -21,9 +21,9 @@ #include "dwi/shells.h" #include "dwi/directions/set.h" -#include "gui/dwi/renderer.h" -#include "gui/mrview/gui_image.h" -#include "gui/mrview/tool/odf/type.h" +#include "dwi/renderer.h" +#include "mrview/gui_image.h" +#include "mrview/tool/odf/type.h" namespace MR { diff --git a/src/gui/mrview/tool/odf/model.cpp b/cpp/gui/mrview/tool/odf/model.cpp similarity index 98% rename from src/gui/mrview/tool/odf/model.cpp rename to cpp/gui/mrview/tool/odf/model.cpp index a694d97614..55e4851528 100644 --- a/src/gui/mrview/tool/odf/model.cpp +++ b/cpp/gui/mrview/tool/odf/model.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/odf/model.h" +#include "mrview/tool/odf/model.h" #include "header.h" diff --git a/src/gui/mrview/tool/odf/model.h b/cpp/gui/mrview/tool/odf/model.h similarity index 97% rename from src/gui/mrview/tool/odf/model.h rename to cpp/gui/mrview/tool/odf/model.h index 439cf739ae..2ff95353cf 100644 --- a/src/gui/mrview/tool/odf/model.h +++ b/cpp/gui/mrview/tool/odf/model.h @@ -21,8 +21,8 @@ #include "types.h" -#include "gui/mrview/tool/odf/item.h" -#include "gui/mrview/tool/odf/type.h" +#include "mrview/tool/odf/item.h" +#include "mrview/tool/odf/type.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/odf/odf.cpp b/cpp/gui/mrview/tool/odf/odf.cpp similarity index 98% rename from src/gui/mrview/tool/odf/odf.cpp rename to cpp/gui/mrview/tool/odf/odf.cpp index 849db14e37..1229ca4132 100644 --- a/src/gui/mrview/tool/odf/odf.cpp +++ b/cpp/gui/mrview/tool/odf/odf.cpp @@ -18,16 +18,16 @@ #include "dwi/shells.h" #include "mrtrix.h" +#include "dialog/file.h" #include "dwi/directions/set.h" -#include "gui/dialog/file.h" -#include "gui/dwi/render_frame.h" -#include "gui/lighting_dock.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/tool/odf/item.h" -#include "gui/mrview/tool/odf/model.h" -#include "gui/mrview/tool/odf/odf.h" -#include "gui/mrview/tool/odf/preview.h" -#include "gui/mrview/window.h" +#include "dwi/render_frame.h" +#include "lighting_dock.h" +#include "mrview/mode/base.h" +#include "mrview/tool/odf/item.h" +#include "mrview/tool/odf/model.h" +#include "mrview/tool/odf/odf.h" +#include "mrview/tool/odf/preview.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/odf/odf.h b/cpp/gui/mrview/tool/odf/odf.h similarity index 94% rename from src/gui/mrview/tool/odf/odf.h rename to cpp/gui/mrview/tool/odf/odf.h index 1e586faf2c..9f83c6a413 100644 --- a/src/gui/mrview/tool/odf/odf.h +++ b/cpp/gui/mrview/tool/odf/odf.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/color_button.h" -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/odf/type.h" +#include "color_button.h" +#include "mrview/adjust_button.h" +#include "mrview/spin_box.h" +#include "mrview/tool/base.h" +#include "mrview/tool/odf/type.h" namespace MR::GUI { namespace DWI { diff --git a/src/gui/mrview/tool/odf/preview.cpp b/cpp/gui/mrview/tool/odf/preview.cpp similarity index 95% rename from src/gui/mrview/tool/odf/preview.cpp rename to cpp/gui/mrview/tool/odf/preview.cpp index 87a3be4987..938dff622f 100644 --- a/src/gui/mrview/tool/odf/preview.cpp +++ b/cpp/gui/mrview/tool/odf/preview.cpp @@ -14,11 +14,11 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/odf/preview.h" -#include "gui/dwi/render_frame.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/tool/odf/odf.h" -#include "gui/mrview/window.h" +#include "mrview/tool/odf/preview.h" +#include "dwi/render_frame.h" +#include "mrview/mode/base.h" +#include "mrview/tool/odf/odf.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/odf/preview.h b/cpp/gui/mrview/tool/odf/preview.h similarity index 92% rename from src/gui/mrview/tool/odf/preview.h rename to cpp/gui/mrview/tool/odf/preview.h index ad12d4e62c..9fa48f65e8 100644 --- a/src/gui/mrview/tool/odf/preview.h +++ b/cpp/gui/mrview/tool/odf/preview.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/dwi/render_frame.h" +#include "dwi/render_frame.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/odf/odf.h" -#include "gui/mrview/window.h" +#include "mrview/spin_box.h" +#include "mrview/tool/odf/odf.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/odf/type.h b/cpp/gui/mrview/tool/odf/type.h similarity index 96% rename from src/gui/mrview/tool/odf/type.h rename to cpp/gui/mrview/tool/odf/type.h index e67ab16c26..d6a9ad1627 100644 --- a/src/gui/mrview/tool/odf/type.h +++ b/cpp/gui/mrview/tool/odf/type.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/dwi/renderer.h" +#include "dwi/renderer.h" namespace MR { diff --git a/src/gui/mrview/tool/overlay.cpp b/cpp/gui/mrview/tool/overlay.cpp similarity index 99% rename from src/gui/mrview/tool/overlay.cpp rename to cpp/gui/mrview/tool/overlay.cpp index c9613cd12e..602e29339b 100644 --- a/src/gui/mrview/tool/overlay.cpp +++ b/cpp/gui/mrview/tool/overlay.cpp @@ -14,15 +14,15 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/overlay.h" - -#include "gui/dialog/file.h" -#include "gui/mrview/gui_image.h" -#include "gui/mrview/mode/slice.h" -#include "gui/mrview/qthelpers.h" -#include "gui/mrview/tool/list_model_base.h" -#include "gui/mrview/window.h" +#include "mrview/tool/overlay.h" + +#include "dialog/file.h" #include "mrtrix.h" +#include "mrview/gui_image.h" +#include "mrview/mode/slice.h" +#include "mrview/qthelpers.h" +#include "mrview/tool/list_model_base.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/overlay.h b/cpp/gui/mrview/tool/overlay.h similarity index 95% rename from src/gui/mrview/tool/overlay.h rename to cpp/gui/mrview/tool/overlay.h index b16a037021..58bf052c7d 100644 --- a/src/gui/mrview/tool/overlay.h +++ b/cpp/gui/mrview/tool/overlay.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/colourmap_button.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/base.h" +#include "mrview/adjust_button.h" +#include "mrview/colourmap_button.h" +#include "mrview/mode/base.h" +#include "mrview/spin_box.h" +#include "mrview/tool/base.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/item.cpp b/cpp/gui/mrview/tool/roi_editor/item.cpp similarity index 97% rename from src/gui/mrview/tool/roi_editor/item.cpp rename to cpp/gui/mrview/tool/roi_editor/item.cpp index e62d235a56..c4c6152c1a 100644 --- a/src/gui/mrview/tool/roi_editor/item.cpp +++ b/cpp/gui/mrview/tool/roi_editor/item.cpp @@ -17,14 +17,14 @@ #include #include -#include "gui/mrview/tool/roi_editor/item.h" +#include "mrview/tool/roi_editor/item.h" #include "algo/loop.h" #include "file/config.h" #include "progressbar.h" -#include "gui/dialog/file.h" -#include "gui/mrview/window.h" +#include "dialog/file.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/item.h b/cpp/gui/mrview/tool/roi_editor/item.h similarity index 96% rename from src/gui/mrview/tool/roi_editor/item.h rename to cpp/gui/mrview/tool/roi_editor/item.h index df1d163f46..824b689ec4 100644 --- a/src/gui/mrview/tool/roi_editor/item.h +++ b/cpp/gui/mrview/tool/roi_editor/item.h @@ -19,9 +19,9 @@ #include #include "algo/loop.h" -#include "gui/mrview/tool/roi_editor/undoentry.h" -#include "gui/mrview/volume.h" #include "header.h" +#include "mrview/tool/roi_editor/undoentry.h" +#include "mrview/volume.h" #include "types.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/model.cpp b/cpp/gui/mrview/tool/roi_editor/model.cpp similarity index 94% rename from src/gui/mrview/tool/roi_editor/model.cpp rename to cpp/gui/mrview/tool/roi_editor/model.cpp index 617d1bb5d5..26d068e5c4 100644 --- a/src/gui/mrview/tool/roi_editor/model.cpp +++ b/cpp/gui/mrview/tool/roi_editor/model.cpp @@ -14,8 +14,8 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/roi_editor/model.h" -#include "gui/mrview/window.h" +#include "mrview/tool/roi_editor/model.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/model.h b/cpp/gui/mrview/tool/roi_editor/model.h similarity index 92% rename from src/gui/mrview/tool/roi_editor/model.h rename to cpp/gui/mrview/tool/roi_editor/model.h index 2e5bd5579b..d3340ade6b 100644 --- a/src/gui/mrview/tool/roi_editor/model.h +++ b/cpp/gui/mrview/tool/roi_editor/model.h @@ -16,10 +16,10 @@ #pragma once -#include "gui/mrview/tool/list_model_base.h" -#include "gui/mrview/tool/roi_editor/item.h" #include "header.h" #include "memory.h" +#include "mrview/tool/list_model_base.h" +#include "mrview/tool/roi_editor/item.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/roi.cpp b/cpp/gui/mrview/tool/roi_editor/roi.cpp similarity index 99% rename from src/gui/mrview/tool/roi_editor/roi.cpp rename to cpp/gui/mrview/tool/roi_editor/roi.cpp index df5adfb7ea..ba77bd2dec 100644 --- a/src/gui/mrview/tool/roi_editor/roi.cpp +++ b/cpp/gui/mrview/tool/roi_editor/roi.cpp @@ -16,13 +16,13 @@ #include -#include "gui/mrview/qthelpers.h" -#include "gui/mrview/tool/roi_editor/roi.h" +#include "mrview/qthelpers.h" +#include "mrview/tool/roi_editor/roi.h" -#include "gui/cursor.h" -#include "gui/dialog/file.h" -#include "gui/projection.h" +#include "cursor.h" +#include "dialog/file.h" #include "header.h" +#include "projection.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/roi.h b/cpp/gui/mrview/tool/roi_editor/roi.h similarity index 89% rename from src/gui/mrview/tool/roi_editor/roi.h rename to cpp/gui/mrview/tool/roi_editor/roi.h index 5625d91ca1..fa7b42867e 100644 --- a/src/gui/mrview/tool/roi_editor/roi.h +++ b/cpp/gui/mrview/tool/roi_editor/roi.h @@ -20,15 +20,15 @@ #include "transform.h" #include "types.h" -#include "gui/color_button.h" -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/mode/slice.h" -#include "gui/mrview/tool/base.h" - -#include "gui/mrview/tool/roi_editor/item.h" -#include "gui/mrview/tool/roi_editor/model.h" -#include "gui/mrview/tool/roi_editor/undoentry.h" +#include "color_button.h" +#include "mrview/adjust_button.h" +#include "mrview/mode/base.h" +#include "mrview/mode/slice.h" +#include "mrview/tool/base.h" + +#include "mrview/tool/roi_editor/item.h" +#include "mrview/tool/roi_editor/model.h" +#include "mrview/tool/roi_editor/undoentry.h" namespace MR { diff --git a/src/gui/mrview/tool/roi_editor/undoentry.cpp b/cpp/gui/mrview/tool/roi_editor/undoentry.cpp similarity index 99% rename from src/gui/mrview/tool/roi_editor/undoentry.cpp rename to cpp/gui/mrview/tool/roi_editor/undoentry.cpp index 6c25deccea..5b4037ee3a 100644 --- a/src/gui/mrview/tool/roi_editor/undoentry.cpp +++ b/cpp/gui/mrview/tool/roi_editor/undoentry.cpp @@ -16,9 +16,9 @@ #include -#include "gui/mrview/tool/roi_editor/item.h" -#include "gui/mrview/tool/roi_editor/undoentry.h" -#include "gui/mrview/window.h" +#include "mrview/tool/roi_editor/item.h" +#include "mrview/tool/roi_editor/undoentry.h" +#include "mrview/window.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/roi_editor/undoentry.h b/cpp/gui/mrview/tool/roi_editor/undoentry.h similarity index 97% rename from src/gui/mrview/tool/roi_editor/undoentry.h rename to cpp/gui/mrview/tool/roi_editor/undoentry.h index 3afa217fc5..a4293976dc 100644 --- a/src/gui/mrview/tool/roi_editor/undoentry.h +++ b/cpp/gui/mrview/tool/roi_editor/undoentry.h @@ -21,8 +21,8 @@ #include "types.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/shader.h" +#include "opengl/glutils.h" +#include "opengl/shader.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/screen_capture.cpp b/cpp/gui/mrview/tool/screen_capture.cpp similarity index 98% rename from src/gui/mrview/tool/screen_capture.cpp rename to cpp/gui/mrview/tool/screen_capture.cpp index 8c0e800fee..cc978d74b8 100644 --- a/src/gui/mrview/tool/screen_capture.cpp +++ b/cpp/gui/mrview/tool/screen_capture.cpp @@ -16,13 +16,13 @@ #include +#include "dialog/file.h" #include "file/path.h" -#include "gui/dialog/file.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/tool/screen_capture.h" -#include "gui/mrview/window.h" -#include "gui/opengl/transformation.h" #include "mrtrix.h" +#include "mrview/mode/base.h" +#include "mrview/tool/screen_capture.h" +#include "mrview/window.h" +#include "opengl/transformation.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/screen_capture.h b/cpp/gui/mrview/tool/screen_capture.h similarity index 96% rename from src/gui/mrview/tool/screen_capture.h rename to cpp/gui/mrview/tool/screen_capture.h index 54cef10694..8abcedcbc4 100644 --- a/src/gui/mrview/tool/screen_capture.h +++ b/cpp/gui/mrview/tool/screen_capture.h @@ -18,9 +18,9 @@ #include -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/base.h" +#include "mrview/adjust_button.h" +#include "mrview/spin_box.h" +#include "mrview/tool/base.h" namespace MR::GUI::MRView { class AdjustButton; diff --git a/src/gui/mrview/tool/tractography/track_scalar_file.cpp b/cpp/gui/mrview/tool/tractography/track_scalar_file.cpp similarity index 98% rename from src/gui/mrview/tool/tractography/track_scalar_file.cpp rename to cpp/gui/mrview/tool/tractography/track_scalar_file.cpp index 5a77745b04..b8a48422cb 100644 --- a/src/gui/mrview/tool/tractography/track_scalar_file.cpp +++ b/cpp/gui/mrview/tool/tractography/track_scalar_file.cpp @@ -14,10 +14,10 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/tractography/track_scalar_file.h" +#include "mrview/tool/tractography/track_scalar_file.h" -#include "gui/dialog/file.h" -#include "gui/mrview/tool/tractography/tractogram.h" +#include "dialog/file.h" +#include "mrview/tool/tractography/tractogram.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/tractography/track_scalar_file.h b/cpp/gui/mrview/tool/tractography/track_scalar_file.h similarity index 92% rename from src/gui/mrview/tool/tractography/track_scalar_file.h rename to cpp/gui/mrview/tool/tractography/track_scalar_file.h index feb5a17e36..9d3abd757f 100644 --- a/src/gui/mrview/tool/tractography/track_scalar_file.h +++ b/cpp/gui/mrview/tool/tractography/track_scalar_file.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/colourmap_button.h" -#include "gui/mrview/displayable.h" -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/tractography/tractogram_enums.h" +#include "mrview/adjust_button.h" +#include "mrview/colourmap_button.h" +#include "mrview/displayable.h" +#include "mrview/tool/base.h" +#include "mrview/tool/tractography/tractogram_enums.h" namespace MR::GUI::MRView::Tool { class Tractogram; diff --git a/src/gui/mrview/tool/tractography/tractogram.cpp b/cpp/gui/mrview/tool/tractography/tractogram.cpp similarity index 99% rename from src/gui/mrview/tool/tractography/tractogram.cpp rename to cpp/gui/mrview/tool/tractography/tractogram.cpp index 61d68a016c..5293e88db3 100644 --- a/src/gui/mrview/tool/tractography/tractogram.cpp +++ b/cpp/gui/mrview/tool/tractography/tractogram.cpp @@ -14,16 +14,16 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/tractography/tractogram.h" +#include "mrview/tool/tractography/tractogram.h" #include "dwi/tractography/file.h" #include "dwi/tractography/properties.h" #include "dwi/tractography/scalar_file.h" #include "file/matrix.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/window.h" -#include "gui/opengl/lighting.h" -#include "gui/projection.h" +#include "mrview/mode/base.h" +#include "mrview/window.h" +#include "opengl/lighting.h" #include "progressbar.h" +#include "projection.h" const size_t MAX_BUFFER_SIZE = 2796200; // number of points to fill 32MB diff --git a/src/gui/mrview/tool/tractography/tractogram.h b/cpp/gui/mrview/tool/tractography/tractogram.h similarity index 98% rename from src/gui/mrview/tool/tractography/tractogram.h rename to cpp/gui/mrview/tool/tractography/tractogram.h index 20c3b26615..41f0e46d6e 100644 --- a/src/gui/mrview/tool/tractography/tractogram.h +++ b/cpp/gui/mrview/tool/tractography/tractogram.h @@ -17,8 +17,8 @@ #pragma once #include "dwi/tractography/properties.h" -#include "gui/mrview/displayable.h" -#include "gui/mrview/tool/tractography/tractography.h" +#include "mrview/displayable.h" +#include "mrview/tool/tractography/tractography.h" namespace MR::GUI { class Projection; diff --git a/src/gui/mrview/tool/tractography/tractogram_enums.h b/cpp/gui/mrview/tool/tractography/tractogram_enums.h similarity index 100% rename from src/gui/mrview/tool/tractography/tractogram_enums.h rename to cpp/gui/mrview/tool/tractography/tractogram_enums.h diff --git a/src/gui/mrview/tool/tractography/tractography.cpp b/cpp/gui/mrview/tool/tractography/tractography.cpp similarity index 99% rename from src/gui/mrview/tool/tractography/tractography.cpp rename to cpp/gui/mrview/tool/tractography/tractography.cpp index fb9e3aa7f0..aa4f9f3018 100644 --- a/src/gui/mrview/tool/tractography/tractography.cpp +++ b/cpp/gui/mrview/tool/tractography/tractography.cpp @@ -14,16 +14,16 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/tractography/tractography.h" -#include "gui/dialog/file.h" -#include "gui/lighting_dock.h" -#include "gui/mrview/qthelpers.h" -#include "gui/mrview/tool/list_model_base.h" -#include "gui/mrview/tool/tractography/track_scalar_file.h" -#include "gui/mrview/tool/tractography/tractogram.h" -#include "gui/mrview/window.h" -#include "gui/opengl/lighting.h" +#include "mrview/tool/tractography/tractography.h" +#include "dialog/file.h" +#include "lighting_dock.h" #include "mrtrix.h" +#include "mrview/qthelpers.h" +#include "mrview/tool/list_model_base.h" +#include "mrview/tool/tractography/track_scalar_file.h" +#include "mrview/tool/tractography/tractogram.h" +#include "mrview/window.h" +#include "opengl/lighting.h" namespace MR::GUI::MRView::Tool { const std::vector tractogram_geometry_types = {"pseudotubes", "lines", "points"}; diff --git a/src/gui/mrview/tool/tractography/tractography.h b/cpp/gui/mrview/tool/tractography/tractography.h similarity index 93% rename from src/gui/mrview/tool/tractography/tractography.h rename to cpp/gui/mrview/tool/tractography/tractography.h index 090ac53135..6853cdf7dd 100644 --- a/src/gui/mrview/tool/tractography/tractography.h +++ b/cpp/gui/mrview/tool/tractography/tractography.h @@ -16,12 +16,12 @@ #pragma once -#include "gui/color_button.h" -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/combo_box_error.h" -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/tractography/track_scalar_file.h" -#include "gui/projection.h" +#include "color_button.h" +#include "mrview/adjust_button.h" +#include "mrview/combo_box_error.h" +#include "mrview/tool/base.h" +#include "mrview/tool/tractography/track_scalar_file.h" +#include "projection.h" namespace MR::GUI { namespace GL { diff --git a/src/gui/mrview/tool/transform.cpp b/cpp/gui/mrview/tool/transform.cpp similarity index 99% rename from src/gui/mrview/tool/transform.cpp rename to cpp/gui/mrview/tool/transform.cpp index c87f81ecc2..8931ad2187 100644 --- a/src/gui/mrview/tool/transform.cpp +++ b/cpp/gui/mrview/tool/transform.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/transform.h" +#include "mrview/tool/transform.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/transform.h b/cpp/gui/mrview/tool/transform.h similarity index 95% rename from src/gui/mrview/tool/transform.h rename to cpp/gui/mrview/tool/transform.h index 438d63da93..0e6d5d8c44 100644 --- a/src/gui/mrview/tool/transform.h +++ b/cpp/gui/mrview/tool/transform.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/mrview/mode/base.h" -#include "gui/mrview/tool/base.h" +#include "mrview/mode/base.h" +#include "mrview/tool/base.h" namespace MR::GUI::MRView::Tool { diff --git a/src/gui/mrview/tool/view.cpp b/cpp/gui/mrview/tool/view.cpp similarity index 99% rename from src/gui/mrview/tool/view.cpp rename to cpp/gui/mrview/tool/view.cpp index ac730c4c20..5cdd434273 100644 --- a/src/gui/mrview/tool/view.cpp +++ b/cpp/gui/mrview/tool/view.cpp @@ -14,16 +14,16 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/tool/view.h" - -#include "gui/mrview/adjust_button.h" -#include "gui/mrview/mode/lightbox.h" -#include "gui/mrview/mode/lightbox_gui.h" -#include "gui/mrview/mode/ortho.h" -#include "gui/mrview/mode/volume.h" -#include "gui/mrview/window.h" +#include "mrview/tool/view.h" + #include "math/math.h" #include "mrtrix.h" +#include "mrview/adjust_button.h" +#include "mrview/mode/lightbox.h" +#include "mrview/mode/lightbox_gui.h" +#include "mrview/mode/ortho.h" +#include "mrview/mode/volume.h" +#include "mrview/window.h" #define FOV_RATE_MULTIPLIER 0.01f #define MRTRIX_MIN_ALPHA 1.0e-3f diff --git a/src/gui/mrview/tool/view.h b/cpp/gui/mrview/tool/view.h similarity index 97% rename from src/gui/mrview/tool/view.h rename to cpp/gui/mrview/tool/view.h index ebb53c498a..68a5dc0a95 100644 --- a/src/gui/mrview/tool/view.h +++ b/cpp/gui/mrview/tool/view.h @@ -16,10 +16,10 @@ #pragma once -#include "gui/mrview/mode/base.h" -#include "gui/mrview/spin_box.h" -#include "gui/mrview/tool/base.h" -#include "gui/opengl/transformation.h" +#include "mrview/mode/base.h" +#include "mrview/spin_box.h" +#include "mrview/tool/base.h" +#include "opengl/transformation.h" namespace MR::GUI::MRView { class AdjustButton; diff --git a/src/gui/mrview/volume.cpp b/cpp/gui/mrview/volume.cpp similarity index 96% rename from src/gui/mrview/volume.cpp rename to cpp/gui/mrview/volume.cpp index 14d42eb834..cbcc179257 100644 --- a/src/gui/mrview/volume.cpp +++ b/cpp/gui/mrview/volume.cpp @@ -14,9 +14,9 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/mrview/volume.h" +#include "mrview/volume.h" -#include "gui/mrview/window.h" +#include "mrview/window.h" namespace MR::GUI::MRView { diff --git a/src/gui/mrview/volume.h b/cpp/gui/mrview/volume.h similarity index 99% rename from src/gui/mrview/volume.h rename to cpp/gui/mrview/volume.h index 8ed53270e4..38bd12f703 100644 --- a/src/gui/mrview/volume.h +++ b/cpp/gui/mrview/volume.h @@ -20,8 +20,8 @@ #include "transform.h" #include "file/config.h" -#include "gui/mrview/displayable.h" -#include "gui/opengl/gl.h" +#include "mrview/displayable.h" +#include "opengl/glutils.h" namespace MR::GUI { class Projection; diff --git a/src/gui/mrview/window.cpp b/cpp/gui/mrview/window.cpp similarity index 99% rename from src/gui/mrview/window.cpp rename to cpp/gui/mrview/window.cpp index d0e9ccdcbf..2b396dcafc 100644 --- a/src/gui/mrview/window.cpp +++ b/cpp/gui/mrview/window.cpp @@ -15,20 +15,20 @@ */ #include "algo/copy.h" #include "app.h" +#include "dialog/dialog.h" +#include "dialog/file.h" +#include "dialog/image_properties.h" +#include "dialog/opengl.h" +#include "dialog/progress.h" #include "file/config.h" -#include "gui/dialog/dialog.h" -#include "gui/dialog/file.h" -#include "gui/dialog/image_properties.h" -#include "gui/dialog/opengl.h" -#include "gui/dialog/progress.h" -#include "gui/mrview/mode/base.h" -#include "gui/mrview/mode/list.h" -#include "gui/mrview/qthelpers.h" -#include "gui/mrview/tool/base.h" -#include "gui/mrview/tool/list.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/lighting.h" #include "header.h" +#include "mrview/mode/base.h" +#include "mrview/mode/list.h" +#include "mrview/qthelpers.h" +#include "mrview/tool/base.h" +#include "mrview/tool/list.h" +#include "opengl/glutils.h" +#include "opengl/lighting.h" #include "timer.h" #include @@ -40,7 +40,7 @@ using namespace App; const OptionGroup Window::options = OptionGroup ("General options") + Option ("mode", "select initial display mode by its short ID. Valid mode IDs are: " -#include "gui/mrview/mode/list.h" +#include "mrview/mode/list.h" ) + Argument ("name"); #undef MODE @@ -448,7 +448,7 @@ Window::Window() #define MODE_OPTION(classname, specifier, name, description) MODE(classname, specifier, name, description) { size_t n = 1; -#include "gui/mrview/mode/list.h" +#include "mrview/mode/list.h" } #undef MODE #undef MODE_OPTION @@ -661,7 +661,7 @@ Window::Window() { using namespace Tool; size_t n = 1; -#include "gui/mrview/tool/list.h" +#include "mrview/tool/list.h" } for (int n = 0; n < tool_group->actions().size(); ++n) addAction(tool_group->actions()[n]); @@ -1663,7 +1663,7 @@ void Window::process_commandline_option() { // see whether option is claimed by any tools: size_t tool_id = 0; std::string stub; -#include "gui/mrview/tool/list.h" +#include "mrview/tool/list.h" // process general options: if (opt.opt->is("mode")) { diff --git a/src/gui/mrview/window.h b/cpp/gui/mrview/window.h similarity index 98% rename from src/gui/mrview/window.h rename to cpp/gui/mrview/window.h index 4a4ec26489..387c73f9d8 100644 --- a/src/gui/mrview/window.h +++ b/cpp/gui/mrview/window.h @@ -16,14 +16,14 @@ #pragma once -#include "gui/cursor.h" -#include "gui/gui.h" -#include "gui/mrview/colourbars.h" -#include "gui/mrview/colourmap_button.h" -#include "gui/mrview/gui_image.h" -#include "gui/opengl/font.h" +#include "cursor.h" +#include "gui.h" #include "image.h" #include "memory.h" +#include "mrview/colourbars.h" +#include "mrview/colourmap_button.h" +#include "mrview/gui_image.h" +#include "opengl/font.h" namespace MR::GUI { namespace GL { diff --git a/src/gui/opengl/font.cpp b/cpp/gui/opengl/font.cpp similarity index 99% rename from src/gui/opengl/font.cpp rename to cpp/gui/opengl/font.cpp index 86d01a9670..93791e75ca 100644 --- a/src/gui/opengl/font.cpp +++ b/cpp/gui/opengl/font.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/opengl/font.h" +#include "opengl/font.h" #include "debug.h" #include "math/math.h" diff --git a/src/gui/opengl/font.h b/cpp/gui/opengl/font.h similarity index 98% rename from src/gui/opengl/font.h rename to cpp/gui/opengl/font.h index d8b9a356ef..b90ae5486b 100644 --- a/src/gui/opengl/font.h +++ b/cpp/gui/opengl/font.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/shader.h" +#include "opengl/shader.h" namespace MR::GUI::GL { diff --git a/src/gui/opengl/gl_core_3_3.cpp b/cpp/gui/opengl/gl_core_3_3.cpp similarity index 99% rename from src/gui/opengl/gl_core_3_3.cpp rename to cpp/gui/opengl/gl_core_3_3.cpp index 884d7e702b..b01c5c2ca9 100644 --- a/src/gui/opengl/gl_core_3_3.cpp +++ b/cpp/gui/opengl/gl_core_3_3.cpp @@ -25,7 +25,7 @@ #include #endif -#include "gui/opengl/gl_core_3_3.h" +#include "opengl/gl_core_3_3.h" #include #include #include diff --git a/src/gui/opengl/gl_core_3_3.h b/cpp/gui/opengl/gl_core_3_3.h similarity index 100% rename from src/gui/opengl/gl_core_3_3.h rename to cpp/gui/opengl/gl_core_3_3.h diff --git a/src/gui/opengl/gl.cpp b/cpp/gui/opengl/glutils.cpp similarity index 99% rename from src/gui/opengl/gl.cpp rename to cpp/gui/opengl/glutils.cpp index 6d8e68e019..ff27dfcacc 100644 --- a/src/gui/opengl/gl.cpp +++ b/cpp/gui/opengl/glutils.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" #include "file/config.h" namespace MR::GUI::GL { diff --git a/src/gui/opengl/gl.h b/cpp/gui/opengl/glutils.h similarity index 99% rename from src/gui/opengl/gl.h rename to cpp/gui/opengl/glutils.h index e579999fbc..bfcd69fcf6 100644 --- a/src/gui/opengl/gl.h +++ b/cpp/gui/opengl/glutils.h @@ -26,7 +26,7 @@ #include #include #include -#include "gui/opengl/gl_core_3_3.h" +#include "opengl/gl_core_3_3.h" // clang-format on #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) diff --git a/src/gui/opengl/lighting.cpp b/cpp/gui/opengl/lighting.cpp similarity index 98% rename from src/gui/opengl/lighting.cpp rename to cpp/gui/opengl/lighting.cpp index 549ca22355..a95beb78bc 100644 --- a/src/gui/opengl/lighting.cpp +++ b/cpp/gui/opengl/lighting.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/opengl/lighting.h" +#include "opengl/lighting.h" #include "file/config.h" namespace MR::GUI::GL { diff --git a/src/gui/opengl/lighting.h b/cpp/gui/opengl/lighting.h similarity index 97% rename from src/gui/opengl/lighting.h rename to cpp/gui/opengl/lighting.h index 8e5f89e85d..748ef652d7 100644 --- a/src/gui/opengl/lighting.h +++ b/cpp/gui/opengl/lighting.h @@ -16,7 +16,7 @@ #pragma once -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::GL { diff --git a/src/gui/opengl/shader.cpp b/cpp/gui/opengl/shader.cpp similarity index 97% rename from src/gui/opengl/shader.cpp rename to cpp/gui/opengl/shader.cpp index ed7c3186fc..51a4e6b1e8 100644 --- a/src/gui/opengl/shader.cpp +++ b/cpp/gui/opengl/shader.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/opengl/shader.h" +#include "opengl/shader.h" namespace MR::GUI::GL::Shader { diff --git a/src/gui/opengl/shader.h b/cpp/gui/opengl/shader.h similarity index 99% rename from src/gui/opengl/shader.h rename to cpp/gui/opengl/shader.h index 3497862730..9bc8ec6f1a 100644 --- a/src/gui/opengl/shader.h +++ b/cpp/gui/opengl/shader.h @@ -17,7 +17,7 @@ #pragma once #include "app.h" -#include "gui/opengl/gl.h" +#include "opengl/glutils.h" namespace MR::GUI::GL::Shader { diff --git a/src/gui/opengl/transformation.h b/cpp/gui/opengl/transformation.h similarity index 99% rename from src/gui/opengl/transformation.h rename to cpp/gui/opengl/transformation.h index 0d8ae8e946..517a5e8fe4 100644 --- a/src/gui/opengl/transformation.h +++ b/cpp/gui/opengl/transformation.h @@ -18,8 +18,8 @@ #include -#include "gui/opengl/gl.h" #include "math/least_squares.h" +#include "opengl/glutils.h" namespace MR::GUI::GL { diff --git a/src/gui/projection.cpp b/cpp/gui/projection.cpp similarity index 98% rename from src/gui/projection.cpp rename to cpp/gui/projection.cpp index a83d314f54..8f7fa16c2f 100644 --- a/src/gui/projection.cpp +++ b/cpp/gui/projection.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/projection.h" +#include "projection.h" namespace MR::GUI { diff --git a/src/gui/projection.h b/cpp/gui/projection.h similarity index 98% rename from src/gui/projection.h rename to cpp/gui/projection.h index c0ca984f9e..c6f66d5fa0 100644 --- a/src/gui/projection.h +++ b/cpp/gui/projection.h @@ -16,11 +16,11 @@ #pragma once -#include "gui/crosshair.h" -#include "gui/gui.h" -#include "gui/opengl/font.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/transformation.h" +#include "crosshair.h" +#include "gui.h" +#include "opengl/font.h" +#include "opengl/glutils.h" +#include "opengl/transformation.h" namespace MR::GUI { diff --git a/src/gui/shapes/cube.cpp b/cpp/gui/shapes/cube.cpp similarity index 99% rename from src/gui/shapes/cube.cpp rename to cpp/gui/shapes/cube.cpp index 3d248d10ff..0c0ce96362 100644 --- a/src/gui/shapes/cube.cpp +++ b/cpp/gui/shapes/cube.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/shapes/cube.h" +#include "shapes/cube.h" namespace { diff --git a/src/gui/shapes/cube.h b/cpp/gui/shapes/cube.h similarity index 80% rename from src/gui/shapes/cube.h rename to cpp/gui/shapes/cube.h index 94fe81cbef..31acf17ea0 100644 --- a/src/gui/shapes/cube.h +++ b/cpp/gui/shapes/cube.h @@ -16,8 +16,12 @@ #pragma once -#include "gui/opengl/gl.h" -#include "gui/opengl/gl_core_3_3.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off +#include "opengl/glutils.h" +#include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/src/gui/shapes/cylinder.cpp b/cpp/gui/shapes/cylinder.cpp similarity index 99% rename from src/gui/shapes/cylinder.cpp rename to cpp/gui/shapes/cylinder.cpp index bac8336892..4f018153ef 100644 --- a/src/gui/shapes/cylinder.cpp +++ b/cpp/gui/shapes/cylinder.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/shapes/cylinder.h" +#include "shapes/cylinder.h" #include "types.h" diff --git a/src/gui/shapes/cylinder.h b/cpp/gui/shapes/cylinder.h similarity index 80% rename from src/gui/shapes/cylinder.h rename to cpp/gui/shapes/cylinder.h index 16d44687d5..064f4d9fda 100644 --- a/src/gui/shapes/cylinder.h +++ b/cpp/gui/shapes/cylinder.h @@ -16,8 +16,12 @@ #pragma once -#include "gui/opengl/gl.h" -#include "gui/opengl/gl_core_3_3.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off +#include "opengl/glutils.h" +#include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/src/gui/shapes/halfsphere.cpp b/cpp/gui/shapes/halfsphere.cpp similarity index 99% rename from src/gui/shapes/halfsphere.cpp rename to cpp/gui/shapes/halfsphere.cpp index ac797335b9..d1d00219d3 100644 --- a/src/gui/shapes/halfsphere.cpp +++ b/cpp/gui/shapes/halfsphere.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/shapes/halfsphere.h" +#include "shapes/halfsphere.h" #include diff --git a/src/gui/shapes/halfsphere.h b/cpp/gui/shapes/halfsphere.h similarity index 88% rename from src/gui/shapes/halfsphere.h rename to cpp/gui/shapes/halfsphere.h index 11be874b12..2781409a18 100644 --- a/src/gui/shapes/halfsphere.h +++ b/cpp/gui/shapes/halfsphere.h @@ -18,8 +18,12 @@ #include "types.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/gl_core_3_3.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off +#include "opengl/glutils.h" +#include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/src/gui/shapes/sphere.cpp b/cpp/gui/shapes/sphere.cpp similarity index 99% rename from src/gui/shapes/sphere.cpp rename to cpp/gui/shapes/sphere.cpp index 721e09d429..a6a188f75c 100644 --- a/src/gui/shapes/sphere.cpp +++ b/cpp/gui/shapes/sphere.cpp @@ -14,7 +14,7 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/shapes/sphere.h" +#include "shapes/sphere.h" #include diff --git a/src/gui/shapes/sphere.h b/cpp/gui/shapes/sphere.h similarity index 88% rename from src/gui/shapes/sphere.h rename to cpp/gui/shapes/sphere.h index 3e4a70d991..ddbca63f9b 100644 --- a/src/gui/shapes/sphere.h +++ b/cpp/gui/shapes/sphere.h @@ -18,8 +18,12 @@ #include "types.h" -#include "gui/opengl/gl.h" -#include "gui/opengl/gl_core_3_3.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off +#include "opengl/glutils.h" +#include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/src/gui/shview/icons.h b/cpp/gui/shview/icons.h similarity index 100% rename from src/gui/shview/icons.h rename to cpp/gui/shview/icons.h diff --git a/src/gui/shview/render_window.cpp b/cpp/gui/shview/render_window.cpp similarity index 98% rename from src/gui/shview/render_window.cpp rename to cpp/gui/shview/render_window.cpp index d956b4b9e9..71acb71afc 100644 --- a/src/gui/shview/render_window.cpp +++ b/cpp/gui/shview/render_window.cpp @@ -14,14 +14,14 @@ * For more details, see http://www.mrtrix.org/. */ -#include "gui/shview/render_window.h" +#include "shview/render_window.h" #include "app.h" +#include "dialog/dialog.h" +#include "dialog/file.h" +#include "dwi/render_frame.h" #include "file/matrix.h" #include "file/path.h" -#include "gui/dialog/dialog.h" -#include "gui/dialog/file.h" -#include "gui/dwi/render_frame.h" -#include "gui/lighting_dock.h" +#include "lighting_dock.h" #include "math/SH.h" #include "math/math.h" diff --git a/src/gui/shview/render_window.h b/cpp/gui/shview/render_window.h similarity index 97% rename from src/gui/shview/render_window.h rename to cpp/gui/shview/render_window.h index cbada0332f..02234c7eef 100644 --- a/src/gui/shview/render_window.h +++ b/cpp/gui/shview/render_window.h @@ -16,8 +16,8 @@ #pragma once -#include "gui/dwi/render_frame.h" -#include "gui/opengl/gl.h" +#include "dwi/render_frame.h" +#include "opengl/glutils.h" namespace MR::GUI { class LightingDock; diff --git a/docs/generate_user_docs.sh b/docs/generate_user_docs.sh index 3b76db5b36..2d71bd297f 100755 --- a/docs/generate_user_docs.sh +++ b/docs/generate_user_docs.sh @@ -79,7 +79,7 @@ echo " " > $table_file cmdlist="" -for n in `find "${mrtrix_root}"/cmd/ -name "*.cpp"`; do +for n in `find "${mrtrix_root}"/cpp/cmd/ -name "*.cpp"`; do cmdlist=$cmdlist$'\n'`basename $n` done for n in `ls "${mrtrix_root}"/python/mrtrix3/commands/ --ignore=__init__.py* --ignore=CMakeLists.txt`; do diff --git a/packaging/mingw/PKGBUILD b/packaging/mingw/PKGBUILD index 4ab03194cd..0753f7cbc5 100644 --- a/packaging/mingw/PKGBUILD +++ b/packaging/mingw/PKGBUILD @@ -39,7 +39,7 @@ pkgver() { build() { cd "${_realname}" - cmake -B build -G Ninja -DMRTRIX_BUILD_NON_CORE_STATIC=ON + cmake -B build -G Ninja cmake --build build cmake --install build --prefix=./install } diff --git a/packaging/package-linux-tarball.sh b/packaging/package-linux-tarball.sh index 29d980185a..18bbc848fa 100755 --- a/packaging/package-linux-tarball.sh +++ b/packaging/package-linux-tarball.sh @@ -66,9 +66,8 @@ cmake -B $build_dir -S $source_dir \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$install_dir \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DMRTRIX_BUILD_NON_CORE_STATIC=ON - + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON + cmake --build $build_dir cmake --install $build_dir diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 55c51f5ecd..0000000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,124 +0,0 @@ -file(GLOB_RECURSE HEADLESS_SOURCES *.h *.cpp) -list(FILTER HEADLESS_SOURCES EXCLUDE REGEX "gui/.*") - -file(GLOB_RECURSE GUI_SOURCES gui/*.h gui/*.cpp) - -if(MRTRIX_BUILD_GUI) - if(MRTRIX_USE_QT5) - find_package(Qt5 COMPONENTS Core Gui Widgets OpenGL Network REQUIRED) - qt5_add_resources(RCC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../icons/icons.qrc) - else() - find_package(Qt6 COMPONENTS Core Gui Widgets OpenGL Network OpenGLWidgets REQUIRED) - qt6_add_resources(RCC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../icons/icons.qrc) - endif() - # Explicitly log Qt's location since it's not done automatically by the FindQt module - message(STATUS "Qt${QT_MAJOR_VERSION}_DIR is set to: ${Qt${QT_MAJOR_VERSION}_DIR}") - - find_package(OpenGL REQUIRED) - find_package(Threads REQUIRED) -endif() - -find_package(Git QUIET) - -# Create version target and library -set(EXEC_VERSION_CPP ${CMAKE_CURRENT_BINARY_DIR}/exec_version.cpp) - -add_custom_target(exec-version-target ALL - COMMAND ${CMAKE_COMMAND} - -D GIT_EXECUTABLE=${GIT_EXECUTABLE} - -D MRTRIX_BASE_VERSION=${MRTRIX_BASE_VERSION} - -D DST=${EXEC_VERSION_CPP} - -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/exec_version.cpp.in - -P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/FindVersion.cmake - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Generating exec_version.cpp for executables" - BYPRODUCTS ${EXEC_VERSION_CPP} - VERBATIM -) - -add_library(mrtrix-exec-version-lib STATIC ${EXEC_VERSION_CPP}) -add_library(mrtrix::exec-version-lib ALIAS mrtrix-exec-version-lib) -add_dependencies(mrtrix-exec-version-lib exec-version-target) - -if(MRTRIX_BUILD_NON_CORE_STATIC) - set(MRTRIX_LIBRARY_TYPE STATIC) -else() - set(MRTRIX_LIBRARY_TYPE SHARED) -endif() - -add_library(mrtrix-headless ${MRTRIX_LIBRARY_TYPE} ${HEADLESS_SOURCES}) -add_library(mrtrix::headless ALIAS mrtrix-headless) - - -target_include_directories(mrtrix-exec-version-lib PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) - -target_include_directories(mrtrix-headless PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} -) - -if(MRTRIX_USE_PCH) - target_precompile_headers(mrtrix-headless PRIVATE - [["exception.h"]] - - - ) -endif() - -target_link_libraries(mrtrix-headless PUBLIC - mrtrix::core -) - -if(MRTRIX_BUILD_GUI) - add_library(mrtrix-gui ${MRTRIX_LIBRARY_TYPE} ${GUI_SOURCES} ${RCC_SOURCES}) - add_library(mrtrix::gui ALIAS mrtrix-gui) - - set_target_properties(mrtrix-gui PROPERTIES - AUTOMOC ON - AUTOUIC ON - LINK_DEPENDS_NO_SHARED ON - ) - - if(MRTRIX_USE_PCH) - target_precompile_headers(mrtrix-gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/gui/gui_pch.h) - endif() - - target_link_libraries(mrtrix-gui PUBLIC - mrtrix::headless - Qt${QT_MAJOR_VERSION}::Core - Qt${QT_MAJOR_VERSION}::Gui - Qt${QT_MAJOR_VERSION}::Widgets - Qt${QT_MAJOR_VERSION}::OpenGL - Qt${QT_MAJOR_VERSION}::Network - Threads::Threads - ${OPENGL_LIBRARIES} - ) - if(NOT MRTRIX_USE_QT5) - target_link_libraries(mrtrix-gui PUBLIC Qt6::OpenGLWidgets) - endif() -endif() - -# On Windows, the libraries need to be in the same directory as the executables -if(WIN32) - set_target_properties(mrtrix-headless PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin - ) - if(MRTRIX_BUILD_GUI) - set_target_properties(mrtrix-gui PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin - ) - endif() -endif() - -install(TARGETS mrtrix-headless - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -) - -if(MRTRIX_BUILD_GUI) - install(TARGETS mrtrix-gui - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/src/exec_version.cpp.in b/src/exec_version.cpp.in deleted file mode 100644 index a424de082d..0000000000 --- a/src/exec_version.cpp.in +++ /dev/null @@ -1,8 +0,0 @@ -#include "exec_version.h" - -namespace MR { - namespace App { - extern const char* executable_uses_mrtrix_version; - void set_executable_uses_mrtrix_version () { executable_uses_mrtrix_version = "@MRTRIX_VERSION@"; } - } -} \ No newline at end of file diff --git a/testing/tools/CMakeLists.txt b/testing/tools/CMakeLists.txt index 946b5f7370..7bc7cdfd10 100644 --- a/testing/tools/CMakeLists.txt +++ b/testing/tools/CMakeLists.txt @@ -31,8 +31,8 @@ function(add_cpp_tool TOOL_SRC) get_filename_component(TOOL_NAME ${TOOL_SRC} NAME_WE) add_executable(${TOOL_NAME} ${TOOL_SRC}) target_link_libraries(${TOOL_NAME} PRIVATE - mrtrix::headless - mrtrix::exec-version-lib + mrtrix::core + mrtrix::executable-version mrtrix::tests-lib ) set_target_properties(${TOOL_NAME} PROPERTIES LINK_DEPENDS_NO_SHARED true) diff --git a/testing/unit_tests/CMakeLists.txt b/testing/unit_tests/CMakeLists.txt index c161343f54..34d6b9d159 100644 --- a/testing/unit_tests/CMakeLists.txt +++ b/testing/unit_tests/CMakeLists.txt @@ -49,8 +49,8 @@ function(add_cpp_unit_test FILE_SRC) get_filename_component(NAME ${FILE_SRC} NAME_WE) add_executable(${NAME} ${FILE_SRC}) target_link_libraries(${NAME} PRIVATE - mrtrix::headless - mrtrix::exec-version-lib + mrtrix::core + mrtrix::executable-version mrtrix::tests-lib ) set_target_properties(${NAME} PROPERTIES diff --git a/update_copyright b/update_copyright index 9b34e52502..ff230e1e3e 100755 --- a/update_copyright +++ b/update_copyright @@ -43,20 +43,18 @@ SearchPath = namedtuple('SearchPath', 'dirname recursive need_shebang comment ex ProcessFile = namedtuple('ProcessFile', 'path keep_shebang comment') MRTRIX_ROOT = os.path.abspath(os.path.dirname(__file__)) -APP_CPP_PATH = os.path.join(MRTRIX_ROOT, 'core', 'app.cpp') +APP_CPP_PATH = os.path.join(MRTRIX_ROOT, 'cpp', 'core', 'app.cpp') APP_CPP_STRING = 'std::string COPYRIGHT =' APP_PY_PATH = os.path.join(MRTRIX_ROOT, 'python', 'mrtrix3', 'app.py') APP_PY_STRING = '_DEFAULT_COPYRIGHT =' SEARCH_PATHS = [ SearchPath('.', False, True, '#', [], ['mrtrix-mrview.desktop']), - SearchPath('cmd', False, False, '*', ['.cpp'], []), - SearchPath('core', True, False, '*', ['.cpp', '.h'], [os.path.join('file', 'json.h'), os.path.join('file', 'nifti1.h'), 'version.h']), + SearchPath(os.path.join('cpp'), True, False, '*', ['.cpp', '.h'], []), SearchPath('docs', False, True, '#', [], []), SearchPath('matlab', True, False, '%', ['.m'], []), SearchPath('python', True, False, '#', ['.py'], [os.path.join('mrtrix3', 'version.py.in'), os.path.join('mrtrix3', 'commands', '__init__.py.in')]), SearchPath(os.path.join('share', 'mrtrix3'), True, False, '#', ['.txt'], []), - SearchPath('src', True, False, '*', ['.cpp', '.h'], []), SearchPath(os.path.join('testing', 'tools'), False, False, '*', ['.cpp'], []), SearchPath(os.path.join('testing', 'unit_tests'), False, False, '*', ['.cpp'], []), SearchPath(os.path.join('testing', 'lib'), False, False, '*', ['.h'], []),