Package: acquire-imaging
Acquirepython-mpipinstallacquire-imagingAcquire (acquire-imagingon PyPI) provides high-speed, multi-camera, video streaming for up to2cameras and image acquisition with a programming interface for streaming video data directly to Python, cloud-friendly file formats, and visualization platforms, such asnapari.NoteThis is an early stage project. If you find it interesting, please
reach out!Acquire supports the following cameras (currently only on Windows):Hamamatsu Orca Fusion BT (C15440-20UP)Vieworks VC-151MX-M6H00FLIR Blackfly USB3 (BFLY-U3-23S6M-C)FLIR Oryx 10GigE (ORX-10GS-51S5M-C)Acquire also supports the following output file formats:TiffOME-ZarrforZarr v2Zarr v3For testing and demonstration purposes, Acquire provides a few simulated video sources.UsageCheck out our documentationhere.The providednapariplugin (code here) is a good example of how to stream for visualization.DevelopmentWe welcome contributors. The following will help you get started building the
code.EnvironmentRequiresCMake 3.23+ (download pageor viachocolatey)A C++20 compiler (Microsoft Visual Studio Communitydownload
page, or clang)Rust (via rustup, seeinstall
page)conda (optional; viaminiconda)libclang >= v5.0 (on windows viachocochoco install llvmor, on osx, viabrewbrew install llvm)It's strongly recommended you create a python environment for developmentcondacreate--nameacquirepython=3.11
condaactivateacquireBuildcondaactivateacquire
gitsubmoduleupdate--init--recursive
pipinstallmaturin
maturinbuild-ipythonImportantWhen updating the 'acquire-video-runtime' (the c api), you need to manually trigger
a rebuild by touchingwrapper.h.gitsubmoduleupdate# updates acquire-video-runtimetouchwrapper.h# will trigger a rebuildpython-mbuildThis package depends on a submodule (acquire-video-runtime)
and binaries from the following Acquire drivers:acquire-driver-commonacquire-driver-hdcamacquire-driver-egrabberacquire-driver-zarracquire-driver-spinnakerThe build script will automatically try to fetch the binaries from GitHub releases.
In order to configure which release of each driver to use, you can set the value indrivers.json:{"acquire-driver-common":"0.1.0","acquire-driver-hdcam":"0.1.0","acquire-driver-egrabber":"0.1.0","acquire-driver-zarr":"0.1.0","acquire-driver-spinnaker":"0.1.0"}These values can be set to a specific version, or tonightlyfor nightly builds.Developpipinstall-e".[testing]"pytest-s--tb=short--log-cli-level=0This project usespre-committo run required
checks as git hooks.pipinstallpre-commit
pre-commitinstallTroubleshootingMaturin can't find a python interpreterMaturinis a command line tool associated withpyo3. It helps automate the build and packaging
process. It's invoked bysetuptoolsduring a build.Double-check you've activated the right conda environment.Trymaturin build -i pythonThis seems to happen on windows in anaconda environments when multiple python
interpreters are available on the path.It seems to happen less frequently when invoked via pip -pip install -e .will end up invoking maturin.Working with an editable install, how do I update the build?It depends on what you changed:acquire-video-runtime(c/c++ code):touch wrapper.h; maturin developrust code:maturin developZarr V3 tests are failingYou should make sure that the following environment variables are set:ZARR_V3_EXPERIMENTAL_API: 1
ZARR_V3_SHARDING: 1