clariusdev / cast

APIs for Researchers and Marketplace Apps
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
37 stars 15 forks source link
marketplace research

Clarius Cast API

This repository contains all related items for the Clarius Cast API

Download

https://github.com/clariusdev/cast/releases

Overview

The Cast API is based on the Clarius Cast protocol that the Clarius App uses for streaming images to multiple clients at once. Its primary use is for research purposes when access to real-time images is required, the Cast API provides a relatively simple way to get started. The pure C API is deployed on desktop only, primarily because Clarius uses Qt heavily, a library that can often introduce difficulties when deploying or linking on mobile platforms. For commercial users wanting to deploy on mobile, Clarius has created a Java version specifically for interfacing to the Clarius App in an Android environment and an Objective-C framework specifically for interfacing to the Clarius App in an iOS environment.

The Cast API does provide some mechanisms for control of the ultrasound probe, such as the ability to freeze, change parameters such as depth and gain; however these are generally considered secondary functions, as the main purpose of the Cast API is to easily obtain the images in real-time, as opposed to duplicating a control interface.

Features

** separate software licensing may be required for features to function

Constraints

Releases

Architecture

The Cast API communicates with the Clarius Probe directly, and makes use of TCP technologies to create a secondary connection to the device that is able to receive images.

  flowchart LR
  prb[Probe]
  subgraph mobile[Mobile Device]
    app[Clarius App]
  end
  subgraph pc[PC]
    cast[Cast Application]
  end
  prb<-- Primary Connection -->app
  prb<-- Cast Connection -->cast

Supported Platforms

Repository

Structure:

.
└── examples
    ├── cast_android        Android example program
    ├── cast_split          iOS example program
    ├── cast_swift          iOS example program
    ├── caster              desktop example program
    ├── caster_qt           desktop example program
    └── python              python examples (import pyclariuscast modules from release package)

Headers are located in the binaries in the Release section.

Desktop Examples:

iOS Example:

Typical Usage:

init(callbacks, dimensions)
connect(network_params)

while (input)
  performAction(input)

imageCallback(image)
{
  processImage(image)
}

Network Information

The Clarius App will display the network information on a top bar above the image for any probe licensed for the Cast API. The port and IP address are required to make a connection through the Cast API.

|connection in progress|connected|

Licenced probes also have the option for forcing the port by adjusting the Clarius Cast Permission setting within the App to "Research". This provides a potentially more streamlined method when automating connections from the custom software.

|setting|

Since most connections will be made using the probe's own Wi-Fi network, it is important to ensure the computer running the Cast program is on the same network. Probe networks are typically prefixed with "DIRECT-", and the password is available for 60 seconds on the mobile device clipboard once the Clarius App has connected.

Notes