Skip to content

Latest commit

 

History

History
111 lines (81 loc) · 3.19 KB

INSTALL_WINDOWS.md

File metadata and controls

111 lines (81 loc) · 3.19 KB

Windows installation

简体中文

The repository does not contain a hand-maintained .sln. CMake generates a fresh Visual Studio solution under build/windows-release.

1. Install the toolchain

Install:

  • Visual Studio 2022 with Desktop development with C++, MSVC x64, and a Windows SDK
  • CMake 3.24 or newer
  • NVIDIA driver and CUDA Toolkit with Visual Studio Integration
  • Git

Check the command-line environment in PowerShell:

cmake --version
nvcc --version
nvidia-smi

The CUDA Toolkit must support the installed Visual Studio toolset and the requested GPU architectures.

2. Obtain vcpkg

Use a recorded vcpkg release/commit for reproducible releases:

git clone https://github.com/microsoft/vcpkg C:\deps\vcpkg
C:\deps\vcpkg\bootstrap-vcpkg.bat

The checked-in vcpkg.json declares OpenCV, Eigen3, FFTW3, TIFF, and matio. Passing the toolchain file to CMake activates vcpkg manifest mode and restores them inside the build tree; no package list needs to be entered manually.

3. Build and test

From the repository root:

Set-ExecutionPolicy -Scope Process Bypass

.\scripts\build_windows.ps1 `
  -VcpkgToolchainFile C:\deps\vcpkg\scripts\buildsystems\vcpkg.cmake

Optional architecture and triplet selection:

.\scripts\build_windows.ps1 `
  -VcpkgToolchainFile C:\deps\vcpkg\scripts\buildsystems\vcpkg.cmake `
  -VcpkgTriplet x64-windows `
  -CudaArchitectures "86;89"

The first vcpkg build can take a significant amount of time. The script builds all targets, runs CTest, and copies manifest-provided runtime DLLs beside the executables.

Expected outputs:

build\windows-release\lib\Release\tigre.lib
build\windows-release\bin\Release\tigre_full.exe
build\windows-release\bin\Release\tigre_fdk_example.exe

4. Run

.\build\windows-release\bin\Release\tigre_full.exe C:\data\example_scan

The full application opens an interactive OpenCV ROI window. Run the FDK example with:

.\scripts\run_fdk_windows.ps1 `
  -DataDir C:\data\example_scan `
  -OutputVol C:\results\recon.vol `
  -Downsample 1 -RoiWidth 1488 -RoiHeight 1408 -Gpu 0

See INPUT_FORMAT.md for the dataset layout.

5. Manual dependency layout

If vcpkg is not used, pass -OpenCVDir, -Eigen3Dir, -FFTW3FIncludeDir, -FFTW3FLibrary, -MatioIncludeDir, -MatioLibrary, and -TiffRoot to build_windows.ps1. All libraries must use the same x64 architecture and compatible MSVC runtime. Put their runtime DLLs beside the executables or on PATH.

Troubleshooting

  • CUDA compiler not detected: rerun the CUDA installer and enable Visual Studio Integration; confirm the installed CUDA version supports VS 2022.
  • a package is not found after switching dependency methods: remove only the affected build directory and configure again with one consistent toolchain.
  • DLL not found at launch: inspect build/windows-release/vcpkg_installed/ or add the appropriate dependency bin directory to PATH.
  • x86/x64 or Debug/Release link errors: use one x64 triplet and one build configuration for all dependencies.