University of Rochester / Ultrasound Research Laboratory
2D Array Library

 
Class hierarchy   Compound list   File list   Header files   Compound Members   File Members   Examples  

Acq.h

This is the verbatim text of the Acq.h include file.
/*
  $Id: Acq.h,v 1.1 1999-03-05 16:34:52-05 ljb Exp ljb $
  $Revision: 1.1 $

  $Log: Acq.h,v $
  Revision 1.1  1999-03-05 16:34:52-05  ljb
  Initial revision

  Revision 1.2  1999/03/02 14:54:12  LJB
  After directory restructuring.

  Revision 1.1  1998/06/29 15:11:06  LJB
  Initial revision

*/

#ifndef ACQ_H
#define ACQ_H

#include "tdefs.h"

/* supported scanning methods */
#define LINEAR_IMAGE          0
#define SECTOR_IMAGE          1

/* maximum number of tx and rx focal zones available */
#define MAX_NMBR_ZONES 60

/* maximum number of tgc breakpoints */
#define MAX_NMBR_BRKPTS 10

/*--------------------------------
  TEST_HDR_TYPE 
--------------------------------*/

/*
  Experiment Focus Setup Information
     - defines zone properties
     - assign zones to be used for test 
*/
typedef struct {
  float focus_increment;             // rx delays length within a zone
  float elevation;
  float azimuth;
  float focus_depth[MAX_NMBR_ZONES];   // depth from center of aperature (mm)
  float focus_start[MAX_NMBR_ZONES];   // start of zone band (mm)
  float focus_stop[MAX_NMBR_ZONES];    // end of zone band (mm)
  float tx_fnum[MAX_NMBR_ZONES];     // transmit F#, one per zone
  float rx_fnum[MAX_NMBR_ZONES];     // receive F#, one per zone
  WORD zone_list[MAX_NMBR_ZONES];     // list of zones for experiment
  WORD nmbr_zones;
  WORD dummy;
} FOCUS_CTL_TYPE;                 //1336 bytes

typedef struct {
  int nAscans, nZones, F_sp, Xpitch, Ypitch;
  int temp;                       //temperature in .01C units
  int dummy[26];
} BRIEF;                          //128 byte header for liu's benefit

typedef struct {
  BYTE gain; // 8-bit gain at beak point
  WORD brk_pt; // break point depth (mm)
  BYTE dummy;
} TGC_TYPE;

typedef struct {
  WORD image_type;              //0 = linear, 1 = sector (phased array)
  union {
    float included_angle;       // sector image included angle (radians)
    float lateral_width;        // linear image lateral width (mm)
  } u;

  WORD ascans_per_image;        // number of A-scans per image
  WORD image_start;             // distance (mm) from center element to begin of ROI
  WORD image_stop;              // distance (mm) from center element to end of ROI
        /* NOTE: image_start/stop depend on image_type:
           linear - front and back border of box
           sector - inner and outer arcs of annulus
        */
  WPAIR tx_center;                   // line number for center of tx scan (0-79)
  WPAIR rx_center;                   // line number for center of rx scan (0-79)
  enum methods { array, motors} scan_method;
  WORD dwell_count;
  WORD nmbr_tgc;                                 // how may break points in test
  TGC_TYPE tgc[MAX_NMBR_BRKPTS];            // specifies max rx gain breakpoints
  char dummy[4];
} SCAN_CTL_TYPE;

typedef struct  {
  //MOTOR Control parameters
  WORD        stepper_motor_posn; // relates to moving sample
  WORD        stepper_motor_incr;
  WORD        stepper_motor_iter;
  WORD        dummy;
} MOTOR_CTL_TYPE ;

/*  2D-array system parameters */

#define MAXDIM  80
#define PITCH   0.6    //mm
#define FREQ    3.0    //MHz
#define BANDWIDTH 1.9  //MHz 60%
#define SPEED   1.501  //mm/microsec
#define RECT    101
#define CIRCLE  102
#define COSINE  103

#define MAX_NMBR_TX_CHANNELS 128  // allows F# = 3 from 0-90 mm
#define MAX_NMBR_RX_CHANNELS 16   // HW limit
#define MASTER_CLOCK 40           // (MHz)
#define RX_CLOCK_FACTOR  2
#define GAIN_CLOCK_FACTOR 8

typedef struct {
  float Xpitch;    // (mm)
  float Ypitch;
  float speed;
  float freq;
  float bw;
  float amp;
  WORD nmbr_array_elements;
  WORD tx_clock;                        // (MHz)
  WORD rx_clock_factor;
  WORD gain_clock_factor;
  char TxWaveFile[60];
  char AberCorrFile[60];          //;
  char ImpResFile[60];
  char RxImpResFile[60];
} SYSTEM_TYPE;                    //272 bytes

/*
  Overall Experiment Data Header
     - this information is defined prior to data acquisition
     - defines all aspects of data acquisition, focusing, &
       A-scan generation, EXCEPT those items that are controlled
       by user-supplied functions (e.g. apodization, RF demodulation) 
*/
#define COMMENTS 80              //length of experiment text comments buffer



typedef struct {

  BRIEF brief;                  // 128 bytes
  MOTOR_CTL_TYPE motor_info;    // 8  pointer to info for scatter experiment

  FOCUS_CTL_TYPE focus_ctl;     // 1336 focusing information

  SCAN_CTL_TYPE scan_ctl;       // 96  image boundaries/paramters

  SYSTEM_TYPE system;           // 272 2d-array paramters
  char comments[COMMENTS];      // 80 user comments
  char acq_date[16];            // 16 data acquisition date (mm/dd/yy)
  char process_date[16];        // 16 rf-to-A-scan processing date
  char scan_conv_date[16];      // 16 scan conversion date
  char AscanFile[80];           // Output File Name.
} TEST_HDR_TYPE;                // should be 2048 bytes

typedef TEST_HDR_TYPE *test_hdr; 

//
// should below member types be switched from INT16 to WORD ???
//

#include "rrh.h"
#include "afh.h"
#include "adh.h"


/*----------------------------
   Miscellaneous Structures
----------------------------*/


typedef struct {

  WPAIR tx_size;  

  WPAIR rx_size;  

  WPAIR tx_center; 

  WPAIR rx_center;
 
  WPAIR tx_incr;  

  WPAIR rx_incr;  
} ZONE_TYPE;
typedef ZONE_TYPE *zone_ptr;
  

// structure to a first order line equation
typedef struct {
  float slope;
  float offset;
} LINE;
       
typedef LINE* line_type; // pointer to a LINE struct

#endif



Software written by
Larry Busse of LJB Development
and Bill Glenn, Al Murphy and John Losche of TETRAD Corporation
Documentation generated 3/11/1999