Control, data acquisition, post-processing, and visualization all-in-one GUI for a rotary pullback OCT catheter system in the Optical and Ultrasound Imaging Lab.
Qt6 is the cross-platform GUI framework. Data acquisition with the AlazarTech SDK is currently only supported on Windows, but it should be trivial to add support for Linux (where AlazarTech SDK is available).
Refer to the GitHub action script for exact instructions on how to build the executable on Windows and macOS. Otherwise, rough instructions are given below.
This project is based on kwsp/CppTemplate, which uses CMake + Ninja as the build system, VCPKG as the package manager, and Clang as the preferred compiler, with build presets for x64 Windows and arm64 macOS defined in CMakePresets.json
. OCTGui will probably build on other platforms too but its not tested.
Install Visual Studio, and in the installer, select "Desktop development with C++", and in individual components, make sure the latest MSVC compiler, CMake, Ninja, and optionally Clang is selected. Ninja builds more than twice as fast as MSBuild so it is preferred.
Install Xcode or command line tools for the Apple Clang compiler. Last I checked, Qt didn't build with Homebrew Clang.
Install the homebrew package manager, then run the following command to install mono (a C# runtime required by VCPKG's NuGet integration), ninja (build system), llvm (for clang-tidy), and some other tools required to build the dependencies.
brew install mono ninja llvm
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/clang-tidy
brew install autoconf autoconf-archive automake libtool
Follow the instructions here: https://github.com/microsoft/vcpkg. On macOS, clone the repo to ~/vcpkg
, and on Windows, clone the repo to C:/vcpkg
.
In CMake lingo this means CMake build's the build system (Ninja); with VCPKG integration, this step takes ~30min on the first run because it also builds the dependencies defined in vcpkg.json
. On subsequent runs, the prebuilt binaries of the dependencies are cached.
Activate the Visual Studio Developer PowerShell and run all commands inside the Developer PowerShell
3 CMake presets are provided for Windows
clang-cl
: (preferred) x64 ClangCL + Ninja Multi-configcl
: x64 CL + Ninja Multi-configwin64
: x64 CL + MSBuild
cmake --preset clang-cl
clang
is defined for Clang + Ninja Multi-Config
cmake --preset clang
CMake build presets are defined with the -debug
, -relwithdebinfo
, and -release
for "debug", "release with debug info", and "release" builds. For development, prefer relwithdebinfo
unless something can't be debugged in this build.
cmake --build --preset clang-cl-relwithdebinfo
cmake --build --preset clang-relwithdebinfo
I mainly develop with VS Code with the clangd and CMake Tools extensions.
After configuring the project, copy (or symlink if on *nix) compile_commands.json
from the build directory into the root directory and clangd will pick it up automatically.