SDK Overview

From WikiSonix
Revision as of 20:43, 14 July 2010 by Kris (talk | contribs)

Jump to: navigation, search

The Sonix RP has 7 different SDK’s that can be used for research and ultrasound development. They will be described in minor detail in this section; for full support, download the user guide that comes along with the SDK package or go to http://research.ultrasonix.com.

Ulterius

Ulterius is a tool that allows users to control the system without having to physically be using the console, or even be in the same room. It will allow full control to all the imaging parameters, the ability to perform system functions such as switch probes, freeze/unfreeze and change imaging modes, as well as capture any data that the research software offers. What makes Ulterius different is the fact that all this is done through the network by creating a connection to the research software. Although applications built using Ulterius can run directly on the Sonix RP system, it is perfectly o.k. to run them on a PC connected to the same network that the Sonix RP resides. The main advantages of using Ulterius include:

  • Applications can be programmed to do automated tasks, either on the machine or through a network, so the user or researcher does not have to physically be using the Sonix RP
  • Data can be collected in real-time, whereas data collected using the research interface can only be collected after the image is frozen
  • Devices can be synchronized through software interrupts
  • Data processing can be distributed to multiple PC’s

The demo program created from the Ulterius SDK takes advantage of all of the SDK’s functionality which include:

  • Connecting / disconnecting to a Sonix RP system
  • Selecting transducers
  • Selecting imaging modes
  • Selecting presets
  • Freeze / unfreeze
  • Parameter retrieval
  • Parameter set / increment / decrement
  • Data acquisition (with optional compression)
  • Image inject features

The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class ulterius
{
public:
    ulterius();
    ~ulterius();
    bool connect(char * addr);
    bool disconnect();
    bool isConnected() const;
    ...
};

Imaging Parameters

All imaging parameters are available in the Ulterius SDK. The functions which are provided for parameter controls include:

  • Retrieval of the imaging parameters that can be modified as well as its current value.
  • Setting a parameter to the specific value.
  • Incrementing/decrementing a parameter by a fixed amount.

This value depends on the parameter type and is fixed in the software. The parameters cannot go over or under the specified range that is provided. The imaging parameters can be altered in the demo program via the parameters dialog. Clicking on any of the parameters in the list will display the chosen parameter's current value, and its attributes such as the ID and units. Parameters may be altered manually using the value field. If unsure of the parameter value to choose, use the increment and decrement buttons instead to avoid going beyond the parameter range.

Data Acquisition

The Ulterius SDK provides the following functions for data acquisition:

  • Retrieval of a frame of data of a specific type from the server.
  • Obtain the data descriptor which holds key information about the data including the width, height, sample size, and region of interest.
  • Retrieval of the frame count of a specific data type when the image is frozen as well as the maximum number of frames that can be stored in the cine buffer.
  • Data compression for sending data through networks with limited bandwidth. Data can be compressed by calling the function setCompressionStatus(int status) which uses the Huffman data compression technique.

Using the demo application, data can be acquired from the ultrasound machine using the acquisition dialog. The type of data available for acquisition is dependent on the imaging mode. When the system is imaging, data can be captured from the cine memory in real-time; the frame tag that is updated shows the current acquired frame. Since not every image is processed in the cine, the frame tag can be used to associate pre-processed data with post-processed images. When the ultrasound imaging is frozen, the display will show the number of frames captured during the session and data can be saved onto the PC.

Image Injection

Image injection onto the server side can be useful for reviewing captured data from a session or for viewing images after it has undergone some image processing techniques. When injection mode is turned on, the ultrasound B-mode image display is stopped on the Sonix RP software and prescan images can be injected onto the main screen using the injectImage() function.

Pre scan-converted data can be captured and injected onto the Sonix imaging display using the demo program. To utilize this feature, click on the acquisition button as well as the injection buttons to open the corresponding dialogs. Ensure that ultrasound imaging is not frozen. Start capturing pre-scan B data using the data acquisition dialog. Enable data injection using the injection dialog. To inject an image on the screen, check the inject acquired prescan box.

The data injection feature can be especially useful when imaging in the Dual B mode to compare ultrasound images captured at different times. In Dual B mode, images are injected onto the display that is not currently active.

Texo

Texo allows researchers to use the SONIX RP system for maximum research capability. It goes beyond standard data collection and parameter modification by giving very low-level control over beamforming parameters.

The primary advantage of Texo is the ability to create custom firing sequences; for instance, with the standard research software or Ulterius, sequences are limited to pre-defined sector sizes that always move sequentially from one side to the other. These sequences cannot be programmed with parameters such as transmit pulse or aperture size which are unique for each scanline. Texo overcomes this limitation by giving the user full control over the sequence of firings, providing adjustable per-scanline parameters such as transmit frequency, pulse shape and length, and by allowing different data types to be collected from within a single scan. Transmit and receive beamforming will also have additional capabilities; for example, with the standard research software or Ulterius, modifying transmit and receive beams is limited to specifying the center element, aperture size and focus depth. With Texo, users will be able to program individual elements in transmit and receive beams, set time delays for each element, and specify what channels should be included in the summation.

The demo program acts as an element tester the transducers and a channel tester for the electronics. It takes advantage of the following Texo features:

  • Single element transmit
  • Channel masking on the receive beamforming
  • Beamformed RF data acquisition

The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class texo
{
public:
    texo();
    ~texo();
    bool init(char * settingsPath);
    bool shutdown();
    bool isInitialized() const;
    bool isImaging() const;
    ...
};

Porta

The Porta SDK is meant to be more of an OEM tool; however, it may also have uses in the research area. Porta is the base of all clinical Sonix software, and is used to drive the core part of the imaging system. The idea behind releasing Porta to customers is that they can create their own commercial or demo-able ultrasound solutions, namely the systems that run the GUI and post-data capture imaging algorithms, while having all the imaging functionality that the ultrasound electronics provides.

For researchers, Porta could provide a gateway for taking existing research done using the SONIX RP and turning it into a commercial application, thus providing a method for users to create a return-on-investment for the work they have accomplished. It also offers a nice way to collect data in real-time without having to use the Ulterius method of connecting to the research software, or without having to use Texo and program ultrasound sequences at a very low-level.

The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class porta
{
public:
    porta();
    virtual ~porta();
    
    // initialization functions
    bool init(int cineSize, const char * firmwarePath, 
    const char * settingsPath, const char * lutPath, int usm = 2, int pci = 2, int hv = 0, int ddr = 0, int channels = 32);
    bool shutdown();
    bool isConnected() const;
    bool setCineSize(int sz);
    ... 
};

Fluctus

Fluctus allows for control of ecg devices. This SDK currently supports MCC and L&T ecg modules. Besides standard data collection, additional features such as peak detection, and signal filtering are provided for easy data analysis. If used together with the Porta or Ulterius SDKs, users can create their own solutions for cardiac monitoring.

The Fluctus package also comes equipped with a console and gui demo program with codes provided to help users get a head start in developing their own applications.

The following shows a sample of the header file:

class fluctus
{
public:
    fluctus();
    virtual ~fluctus();
    // initialization and shutdown functions
    bool init(ecgVersion version, int port = 1);
    bool shutdown();
    ecgVersion getVersion();
    bool isInitialized();
    // acquisition functions
    bool start();
    bool stop();
    bool isRunning();
    
    // parameter set functions
    bool setLead(ecgLead lead);
    bool setGain(ecgGainLevel gain);
    bool setSamplingRate(ecgSamplingRate rate);
    bool setFilter(ecgNotchFilter filter);
    bool setSmoothingFilter(unsigned int size);
    void setDetectionSensitivity(int val);
    ...
};

Pando

Pando allows for scan conversion of raw ultrasound data. The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class pandolinkage pando
{
public:
    pando();
    virtual ~pando();
    bool init(int pixel_width, int pixel_height, int num_samples, int num_scanlines, int start_sample, int end_sample, int start_scanline, int end_scanline, int sampling_frequency, int line_density, int steer_angle, int extension_angle, int origin_x, int origin_y, int microns_x, int microns_y, int elements, int pitch, int radius, int probe_angle, int transmit_offset);
    bool scanConvert(unsigned char * input, unsigned char * output);
};

Mucro

The Mucro SDK is an image processing kit for applying special filtering techniques to enhance B mode ultrasound images. The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class mucro
{
public:
    mucro();
    virtual ~mucro();

    bool init(const char * paramfile);
    bool destroy();
    bool apply(unsigned char * in, unsigned char * out, int w, int h, int param, bool useIndex);
    bool setMask(unsigned char * mask, int w, int h);
    bool removeMask();
    bool isMasked();
    bool isInitialized();
    static bool isAvailable();
};

Impero

The Impero SDK can be used to connect to the Sonix RP console and receive button and slider events from the ultrasound machine. Currently, the SDK supports simple console initialization, event listeners for TGC, push button and dials, alphanumeric keypad backlight control and LED state and colour control. Using the Impero SDK together with the Porta or Texo SDKs, users can customize their own functions for the ultrasound machine.

The SDK interface is in C++ and comes with a Windows DLL and a header file. Below is a sample of the header file:

class impero
{
public:
    impero();
    virtual ~impero();
    bool connect(int port);
    bool isConnected() const;
    bool close();
    void setCallback(IMPERO_CALLBACK fn, void * prm);
    void setBacklight(bool status);
    void setAllLEDs(imperoLED state);
    void getTgc(char * tgcval);
};