Working with Data

The Sonix RP has many different types of data that can be stored. The imaging mode determines the type of data that is available to store at any given time.

Cine Buffer
The cine is programmable, but defaults 128MB. The number of frames of data that can be stored in the cine depends on:
 * Data type
 * Imaging depth
 * Imaging sector & line density

If the cine size is changed, caution should be taken as to not over-allocate the system with memory beyond it's capacity, otherwise sluggishness of the interface will result. An on-screen cine control acts as an interface to the current displayed frame, as well as determining what frames shall be stored to disk. The control can be selected using the SELECT button, and then the trackball will be able to scroll through the frames. The display is organized as follows:

Current / Total [ Start … End ]

The start and end frames for storing data or playing back the cine can be set by clicking on the Start and End numbers of the cine, and then scrolling the values using the trackball. Once the range has been selected, the record button on screen (a round circle with a smaller circle inside), can be clicked on to bring up the Data Storage screen.

Storage Screen
The Data Storage screen is used to select the types of data that are desired to be stored to disk. A filename can be entered, however the default name is the current time at which the record button was clicked. The requested frame range will be initialized with the values adjusted from the cine control, however they can be modified in this screen as necessary. The default extensions for the data types are given within the screen.



All data types will be displayed, however only the ones that are available in the current imaging mode will have a value of ‘Yes’ in the Available column, as well as a non-zero frame count in the Frames column.

To speed collection up, data types can be selected by default when the Data Storage screen is displayed. To do this, check off the data types that should be defaulted, and click on Set Selection As Default. All data is stored under the D:\PatientInfo. If a patient and study have been created, then the data is under a folder with the naming convention of: D:\PatientInfo\Patient ID\Study Date\. If there is no patient selected then the data will be stored under D:\PatientInfo\.~default\Study Date\.

MATLAB Integration
Whenever data is stored, a MATLAB icon corresponding to the data type saved will appear on the bottom of the screen assuming thumbnail selection is turned on. Clicking on this icon will open the first image in the series in MATLAB as shown below.



Data Types
There are many data types that can be stored on the Sonix RP. Some important notations when reading the table:
 * Frame sizes in bytes
 * GS = Greyscale Data
 * FC = 4 Byte Header
 * V = Vectors
 * S = Samples
 * W = Image Width
 * H = Image Height

Coding Information
The default header used when storing any data from the storage screen is as follows: struct uFileHeader {   int type; // data type (can be determined by file extensions) int frames; // number of frames in file int w; // width (number of vectors for raw, image width for processed data) int h; // height (number of samples for raw, image height for processed data) int ss; // data sample size in bits int ulx; // roi - upper left (x) int uly; // roi - upper left (y) int urx; // roi - upper right (x) int ury; // roi - upper right (y) int brx; // roi - bottom right (x) int bry; // roi - bottom right (y) int blx; // roi - bottom left (x) int bly; // roi - bottom left (y) int probe; // probe identifier - additional probe information can be found using this id      int txf; // transmit frequency in Hz    int sf;     // sampling frequency in Hz    int dr; // data rate (fps or prp in Doppler modes) int ld; // line density (can be used to calculate element spacing if pitch and native # elements is known   int extra;  // extra information (ensemble for color RF) };

Although data types can be determined by the file extension, there is also a type entry in the file header; this can be parsed to determine the data type as well. The enumeration for data types is as follows: enum uData {   udtScreen                = 0x00000001, udtBPre                 = 0x00000002, udtBPost                = 0x00000004, udtBPost32              = 0x00000008, udtRF                   = 0x00000010, udtMPre                 = 0x00000020, udtMPost                = 0x00000040, udtPWRF                 = 0x00000080, udtPWSpectrum           = 0x00000100, udtColorRF              = 0x00000200, udtColorCombined        = 0x00000400, udtColorVelocityVariance = 0x00000800, udtElastoCombined       = 0x00002000, udtElastoOverlay        = 0x00004000, udtElastoPre            = 0x00008000, udtECG                  = 0x00010000 };