Getting Started
Welcome to the Thor Vision developer docs! This guide will walk you through building and deploying the app from source.
Building from Source (coming soon)
Before you begin, ensure the following tools and dependencies are installed on your system:
Install Build Tools
- CMake - Cross-platform build system generator
- Download CMake 3.27 (or higher) installer from https://cmake.org/download/ and install it.
- Conan - Software package manager for C++
- git - Version control system
- Download git installer from https://git-scm.com/downloads/win and install it.
- Ninja - Small build system with a focus on speed
- Python - Programming language
- Download Python 3.12 (or higher) installer from https://www.python.org/downloads/ and install it with adding to PATH enabled.
- Qt 6 - GUI framework for the app
- Download Qt 6 installer from https://www.qt.io/download-dev and install it.
- Visual Studio - C/C++ IDE and MSVC compiler for Windows
- Download Visual Studio 2022 installer from https://visualstudio.microsoft.com/downloads/ and install it.
Note
The build is done in Visual Studio 2022 Community with SDK version 10.0.22621.0 and Qt 6 Community Edition.
Install XDAQ Libraries
xdaqmetadata
- Required for parsing XDAQ Metadatalibxvc
- Required for streaming cameras
Build xdaqmetadata
-
Get the source code and go to project directory
git clone https://github.com/kontex-neuro/xdaqmetadata.git cd xdaqmetadata
-
Create python virtual environment
.venv
in project directory and activate itpy -m venv .venv .venv\Scripts\activate
-
Install Conan and ninja in
.venv
via pippip install conan ninja
-
Install dependencies using Conan
conan install . -b missing -pr:a <profile> -s build_type=Release
-
Generate the build files with CMake
cmake -S . -B build/Release --preset conan-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release
-
Build the project
cmake --build build/Release --preset conan-release
-
Export as conan package to local cache
conan export-pkg . -pr:a <profile> -s build_type=Release
Note
Replace <profile>
with the Conan profile from your environment, To see more about how to create Conan profile.
Example Conan profile for Windows:
[settings]
arch=x86_64
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.version=194
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
Build libxvc
-
Get the source code and go to project directory
git clone https://github.com/kontex-neuro/libxvc.git cd libxvc
-
Create python virtual environment
.venv
in project directory and activate itpy -m venv .venv .venv\Scripts\activate
-
Install Conan and ninja in
.venv
via pippip install conan ninja
-
Install dependencies using Conan
conan install . -b missing -pr:a <profile> -s build_type=Release
-
Generate the build files with CMake
cmake -S . -B build/Release --preset conan-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release
-
Build the project
cmake --build build/Release --preset conan-release
-
Export as conan package to local cache
conan export-pkg . -pr:a <profile> -s build_type=Release
Build order
Be sure to build xdaqmetadata
first then libxvc
, since libxvc
is depended on xdaqmetadata
.
Build the app
Follow these steps to build the app from source:
-
Get the source code and go to project directory
git clone https://github.com/kontex-neuro/ThorVision.git cd ThorVision
-
Create python virtual environment
.venv
in project directory and activate itpy -m venv .venv .venv\Scripts\activate
-
Install Conan and ninja in
.venv
via pippip install conan ninja
-
Install dependencies using Conan
conan install . -b missing -pr:a <profile> -s build_type=Release
-
Generate the build files with CMake
cmake -S . -B build/Release --preset conan-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release
-
Build the project
cmake --build build/Release --preset conan-release
Building the docs (Optional)
Before you begin, ensure the following tools are installed on your system:
- Python
- MkDocs with
mkdocs-material
,pymdown-extensions
andmkdocstrings
pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings
First generate build files using CMake
with the -DBUILD_DOC=ON
option enabled. Then compile the target doc
, for example:
cmake --build build/Release --preset conan-release --target doc
This will generate documentation in <project_directory>/build/Release/site
.