Working with Data

From WikiSonix
Jump to: navigation, search

Overview[edit]

The Sonix systems have 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[edit]

The cine is programmable, but defaults to 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 on the console, and then the trackball shall perform scrolling through the frames. The display is organized as below:

Cine Display

The start and end frames for storing data or playing back the cine can be set by clicking on the Start and End guides on the cine control, and then scrolling the values using the trackball. Once the range has been selected, the record button on the touchscreen should be pressed to bring up the Data Storage screen.

Setup Data Storage In Clinical Mode[edit]

Follow these steps to setup the storage dialog in clinical mode:

1) Go into Menu->Options->Administrator->Research and check the "Show Storage Dialog in Clinical Mode" option.

Setup storage dialog in clinical mode

2) Program the print key to "record cine" by going into Menu->Options->Administrator->Custom Keys and choose the "Record Cine" option and click OK. Doing so whenever the print key is pressed, it will bring up the storage dialog.

Setup custom key to bring up storage dialog

Storage Screen[edit]

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.

Data Storage 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 up storage, 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[edit]

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 from a pre-defined script.

MATLAB Integration Example

Data Types[edit]

There are many data types that can be stored from the Sonix systems. Some important notations when reading the table:

  • Frame sizes in bytes
  • GS = Grayscale Data
  • FC = 4 Byte Header
  • V = Vectors
  • S = Samples
  • W = Image Width
  • H = Image Height


Type Description Organization BPP/Format Frame Size Extension
AVI Compressed file of screen captures Codec Dependent Codec Dependent 800x600 or full screen .avi
B Pre Scan Converted Envelope detected B data Vector 8 or 16/GS FC + (V * S) .bpr
B Post Scan Converted (8) Interpolated and post-processed B data Raster 8/GS W * H .b8
B Post Scan Converted (32) Interpolated and post-processed B data Raster 32/XRGB W * H * 4 .b32
RF Pre or Post-beamformed RF data Vector 16/RF FC + (V * S * 2) .rf
M Pre Scan Converted Envelope detected and log-compressed M lines Vector 8/GS FC + S .mpr
M Spectrum Interpolated M line data stored as a single spectrum capture Raster 8/GS W * H .m
PW RF Doppler RF gate data acquired at the Doppler PRF Vector 16/RF FC + (S * 2) .drf
PW Spectrum Interpolated FFT data stored as a single spectrum capture Raster 8/GS W * H .pw
Color RF Color RF data acquired at the Color PRF with full packet-size Vector (ensemble groups) 16/RF FC + (packet size * V * S * 2) .crf
Color/B Interpolated and processed B and color data Raster 32/XRGB W * H * 4 .col
Color Velocity/Variance Interpolated and processed color velocity (Y) and variance data (X). Variance is power data in Power Doppler mode Raster 16/Color values, where first 8 bit frame is velocity, second 8 bit frame is variance W * H * 2 .cvv
Elasto/B Interpolated and processed B and elastography data Raster 32/XRGB W * H * 4 .el
Elasto Overlay Interpolated and processed elastography data Raster 8/Elasto W * H .elo
Elasto Pre Scan Converted Midway processed elastography data before interpolation, and after RF and strain conversion Vector 8/Elasto V * S .epr
ECG ECG spectrum data Vector 8/ECG W .ecg
GPS GPS co-ordinate data Vector Ascension SDK N/A .gps

All data types are configured to store a range of frames except for Screen Capture, PW Spectrum, and M: Scan Converted. The frame range can be entered on screen when the Frames option is selected. Alternatively, if the Time option is selected, data is stored retrospectively based on the duration specified in milliseconds.

Data File Information[edit]

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:

Exam 6.0.3 and 6.0.4[edit]

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,
    udtContrast              = 0x00001000,
    udtElastoCombined        = 0x00002000,
    udtElastoOverlay         = 0x00004000,
    udtElastoPre             = 0x00008000,
    udtECG                   = 0x00010000,
    udtGPS1                  = 0x00020000,
    udtGPS2                  = 0x00040000,
    udtPNG                   = 0x10000000
};

Exam 6.0.2[edit]

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,
    udtGPS                   = 0x00020000,
    udtPNG                   = 0x10000000
};

Imaging Mode Details[edit]

Compound Mode[edit]

In Spatial Compounding mode, B data can be stored as normal, however the raw pre-scan converted frames stored will alternate between the angles preset in the mode. The upper 4 bytes of the frame header will determine the angle count, whereas the lower 4 bytes always is correlated to the frame counter.

Header example with 3 angles in compound imaging:

Frame Count First 4 Bytes Last 4 Bytes
1 0x0000 0x0000
2 0x0001 0x0001
3 0x0002 0x0002
4 0x0003 0x0000
5 0x0004 0x0001
6 0x0005 0x0002

RF Mode[edit]

RF mode will by default, store post-beamformed RF data when in RF or B/RF update modes. The data will match the B mode geometry based on the line density, depth and sector. In ChRF and B/ChRF modes, the RF is stored as pre-beamformed and always contains 32 separate RF lines (on Sonix RP only) that are centered around the RF visualization line on screen.

A compounding RF mode is also available, where frames of RF data are stored in a similar fashion as described in regular Compound Mode above.

Elastography Mode[edit]

RF data used to generate the strain image can be captured by selecting the regular RF data option. All other elastography data captures relate to the relative strain. Displacement data is not yet exportable.