University of Rochester / Ultrasound Research Laboratory
2D Array Library

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

compress.cpp File Reference

Routines for compressing data (12 bits to 8 bits). More...

Functions


Detailed Description

Routines for compressing data (12 bits to 8 bits).

$Id: compress.cpp,v 1.1 1999-03-05 16:31:34-05 ljb Exp ljb $ $Revision: 1.1 $

$Log: compress.cpp,v $ Revision 1.1 1999-03-05 16:31:34-05 ljb Initial revision


Function Documentation

WORD data_compress( PFU func, INT32 *datain, BYTE *dataout, WORD npts, INT32 top, INT32 bottom)

Calls to a specific function are made through this routine.

Parameters:
func - A pointer to the function that really does the work.
datain - A pointer to the input data.
dataout - A pointer to the output data.
npts - Length of the previous two arrays.
top - The signal level to be mapped to 255.
bottom - The signal level to be mapped to 0.

log_compress( INT32 *datain, BYTE *dataout, WORD npts,INT32 top, INT32 bottom)

Function used to perform logarithmic compress of A-scan data.

Parameters:
datain - is a pointer to a 32-bit input array.
dataout - is a pointer to an 8-bit output array
npts - is the length of these arrays.
top - is a long int that sets the max value
bottom - is a long int that set the min value

Following log compression of the data, values between LOG(bottom) and LOG(top) are linearly scaled to the interval 0:255. Values greater than LOG(top) are set to 255. Values less than LOG(bottom) are set to 0.

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