Skip to content

tutorials.1

Vincent Le Garrec edited this page Oct 10, 2025 · 3 revisions

Tutorial - UAC/URX installation

This tutorial demonstrates how to install URX/UAC.

Python

Method 1 : Installation using PIP

Enter the following command to install UAC and URX packages from the public Python Package Index:

$ pip install ultrasound-acquisition-configuration
$ pip install ultrasound-rawdata-exchange

Method 2 : Installation from python wheels

Download the python packages (.whl) corresponding to your system and pyton version:

Run the following command to install the packages (replace XXX with your version):

$ pip install ultrasound_rawdata_exchange-XXX.whl
$ pip install ultrasound_acquisition_configuration-XXX.whl

Check installation

Run the following snippet to check the installed versions:

import ultrasound_acquisition_configuration as uac
import ultrasound_rawdata_exchange as urx


print(f"UAC v{uac.UAC_VERSION_MAJOR}.{uac.UAC_VERSION_MINOR}.{uac.UAC_VERSION_PATCH}")
print(f"URX v{urx.URX_VERSION_MAJOR}.{urx.URX_VERSION_MINOR}.{urx.URX_VERSION_PATCH}")

MATLAB

Installation from the .mltbx file

  1. Download the MATLAB toolboxes (.mltbx) from:
  2. Open MALTAB, navigate to the folder containing the .mltbx files, and double-click on the .mltbx files.

Check installation

Run the following snippet to check the installed versions:

disp("UAC")
uac.Version()
disp("URX")
urx.Version()

C++

Minimal C++ Project

Create a minimal C++ project by copying the following content into main.cpp and CMakeLists.txt:

// main.cpp
#include <ios>
#include <iostream>
#include <ostream>
#include <string>

#include <urx/version.h>

#include <uac/version.h>

int main(int argc, char** argv) {
  const uac::Version uac_version;
  const urx::Version urx_version;
  std::cout << "UAC v" << uac_version.major << "." << uac_version.minor << "." << uac_version.patch
            << "\n";

  std::cout << "URX v" << urx_version.major << "." << urx_version.minor << "." << urx_version.patch
            << "\n";

  return 0;
}
# CMakeLists.txt :
cmake_minimum_required(VERSION 3.20)

project(tutorial1)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Uac REQUIRED)

add_executable(tutorial1 main.cpp)

target_link_libraries(tutorial1 PRIVATE Uac::Uac)
# Add Uac::UacUtils if you need to read / write files.

Method 1 : Build from the source

1 - Install HDF5

Install HDF5 from sources, packet manager, or from the official pre-build binary distributions: https://www.hdfgroup.org/download-hdf5/

2 - Build and Install URX

  1. Download URX sources from: https://github.com/moduleus/urx/releases and unzip into folder urx-X.X.X
  2. Configure CMake with the following options (adjust path to your installation):
    • BUILD_TESTING=OFF
    • WITH_HDF5=ON
    • HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.14.5/cmake
    • CMAKE_INSTALL_PREFIX=../urx-X.X.X-install
  3. Build and install URX.

3 - Build and Install UAC

  1. Download UAC sources from: https://github.com/moduleus/uac/releases and unzip into folder uac-X.X.X
  2. Configure CMake with the following options (adjust path to your installation):
    • BUILD_TESTING=OFF
    • WITH_HDF5=ON
    • HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.14.5/cmake
    • Urx_DIR=../urx-X.X.X-install
    • CMAKE_INSTALL_PREFIX=../uac-X.X.X-install
  3. Build and install UAC.

4 - Build the tutorial

  1. Configure CMake with the following options (adjust path to your installation):
    • Urx_DIR=../urx-X.X.X-install
    • Uac_DIR=../uac-X.X.X-install
  2. Build and run the example.

Method 2 : Build using VCPKG

1 - Install VCPKG

Follow instructions from https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-powershell to install vcpkg:

$ cd my_work_dir
$ git clone https://github.com/microsoft/vcpkg.git
$ cd vcpkg; .\bootstrap-vcpkg.bat

2 - Build the tutorial

In the same folder as main.cpp and CMakeLists.txt add the following files:

vcpkg.json:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
  "name": "tutorial1",
  "version": "1.0.0",
  "dependencies": [
    {
      "name": "vcpkg-cmake",
      "host": true
    },
    {
      "name": "vcpkg-cmake-config",
      "host": true
    },
    "uac",
    "urx"
  ]
}

vcpkg-configuration.json:

{
    "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
    "default-registry": {
        "kind": "git",
        "baseline": "2f210a9c13fcf2b0c36b1f2187366feec37e3390",
        "reference": "master",
        "repository": "https://github.com/microsoft/vcpkg"
    },
    "registries": [
        {
            "kind": "filesystem",
            "path": "vcpkg-registry",
            "packages": [
                "hdf5",
                "urx",
                "uac"
            ]
        }
    ]
}
Clone this wiki locally