Texo Data Processing Prior to 6.0.x

To display the results we will use a slightly modified version of the MATLAB code originally written by Emre Turgay. It is a function that will take in raw RF values outputted by the SonixRP, and create a large matrix that will hold all RF lines organized in to frames.


 * filename: Name of the raw RF data file, including all its directory information.
 * eg. \\C:\Documents and Settings\sonixrp\texo-v1.8\demo\code
 * w: Number of scanlines per frame. This information is determined by counting the times the function texo::addLine was called for the sequence used in this measurement.
 * h: Size of each line in bits. This value can be calculated by dividing the frame size in bits by the number of scanlines per frame (w). However, the header of each file takes up 4 bytes, so it is necessary to get rid of first 4 bytes header which is used as a time-stamp for each frame collected from the cine buffer. The value of frame size is obtained by the function texo::getFrameSize.
 * frame_no: Number of frames acquired. This information is obtained by calling texo::getCollectedFrameCount.

Due to the way the SonixRP hardware is designed, the first RF line will be distorted. The easiest way to deal with this problem is to ignore the very first frame. Therefore it is advised to acquire one extra frame than actually necessary and discard the first frame.

fid = fopen(filename,'r'); frame_no*(w*h/2+2); [v,count] = fread(fid,inf,'short'); count; images = []; BigMatrix=[]; for frame_count = 1:frame_no, BigMatrix(frame_count,:) = v(((frame_count-1)*(h/2*w+2)+3) : ((frame_count)*(h/2*w+2)))'; end; for i=1:frame_no, A = reshape(BigMatrix(i,:),h/2,w); images(:,:,i) = A;   plot(A);%,axis([0 xmax ymin ymax  ]);%imagesc(A);colormap gray; end; fclose(fid);