-
Notifications
You must be signed in to change notification settings - Fork 0
tutorials.1
This tutorial demonstrates how to install URX/UAC.
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-exchangeDownload 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.whlRun 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}")- Download the MATLAB toolboxes (.mltbx) from:
- Open MALTAB, navigate to the folder containing the .mltbx files, and double-click on the .mltbx files.
Run the following snippet to check the installed versions:
disp("UAC")
uac.Version()
disp("URX")
urx.Version()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.Install HDF5 from sources, packet manager, or from the official pre-build binary distributions: https://www.hdfgroup.org/download-hdf5/
- Download URX sources from: https://github.com/moduleus/urx/releases and unzip into folder
urx-X.X.X - 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
- Build and install URX.
- Download UAC sources from: https://github.com/moduleus/uac/releases and unzip into folder
uac-X.X.X - 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
- Build and install UAC.
- 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
- Build and run the example.
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
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"
]
}
]
}