www.pudn.com > 医学算法.rar > scan


.TH SCAN 1 "Ultrasonics Laboratory"
.SH NAME
scan - Massage Raw Data from the CRC Scanner
.SH SYNOPSIS
scan [-tlcwqf] [-rsap] [n=100] [k=1] [length=1900] [if=t] [of=udata]
.SH DESCRIPTION
.B Scan
massages raw data from the CRC Ultrasonic Scanner
so that other programs can use it.
The data from the experiment should be uploaded
from the 6809.
This program reads the data
from a file, converts the data into
floating point numbers and
then (if desired) removes two
types of scanner artifacts.
.PP
This program handles six different types of data.
They are:
.TP 13
TOF
Sixteen bit (2 byte) data as might be collected
as an estimate of Time-of-Flight is converted
to floating point.  
Averaged waveforms are also in this form.
If the input file consists of time of flight estimates
there is one 16 bit estimate for each ray
and each projection fits in a single 2048
byte record.
Otherwise (for averaged waveforms) the variable
.B k
should be set to the length of each waveform and the variable
.B n
should be set to the total number of waveforms.
There is a single waveform per record.
This mode is default.
.TP
Quaduature
Five byte estimates of the quaduature components
of a waveform are converted to two single precision
numbers representing the magnitude of the
in phase and out of phase components.
The five input bytes represent (in order)
the real part (two bytes),
the imaginary part (two bytes)
and the system gain at the time of the digitization (one byte).
The data from the scanner is in this form for both the analog and digital
versions of the quaduature estimates.
Each projection fits in a 2048 byte record
(400 rays maximum).
.TP
Waveform
The data collected is eight bit quantities
representing the actual digitized waveform.
Scan converts each data sample (byte) into its floating point
representation and then outputs it as a single precision number.
The length of each waveform is set with the
.B length
variable.
No post processing of the data is done on
the raw waveforms.
Another program must be used to convert each of these 
waveforms into an estimate of an imaging parameter.
.TP
Compressed
Packed (or compressed) waveforms are read in
and expressed as single precision floating point 
numbers.
Each waveform is represented as 256 bytes of a 2048
byte record.  
There is always an even number of records for each
projection.
No post processing of the data is done on
the raw waveforms.
Another program must be used to convert each of these 
waveforms into an estimate of an imaging parameter.
.TP
Floating
Floating point numbers are read in and processed
to remove scanner artifacts.
This can include both removing
the slant in each projection and
swapping alternating projections.
The floating point numbers used as input
in this mode are usually 
estimates of a waveform parameter.
See
.B hf
(1) or
.B filt
(1).
Thus 
.B scan
would first be used to read in the
raw waveforms, the parameter estimated
and then 
.B scan
used again to remove the scanner artifacts.
Each ray is represented as a single floating
point number.
.TP
LONG
Four byte numbers are read and converted to floating
point.
This will be used mostly for the C-Scan work.
.PP
Two types of post processing are done on
the data to 
put the raw data from the scanner into a more
manageable form for the filtering and back projection
work.
The first processing removes the effect of
the transmitter and the receiver not traveling
in parallel lines.
This shows up as a slant in each projection and
is removed by assuming that the beginning and the
end of each projection represents the water path
and should be equal.
A line is fitted to these points 
and then removed from the projection.
.PP
The second type of processing reverses the order
of alternating projections.
This is needed because the scanner traverses the object
in opposite directions during adjacent scans.
.PP
There are several parameters that can be set from the
command line.  
This is done by listing the variable,
an equals sign
and then the new value.
The variables and their default values are:
.TP 13
n=100
number of rays per projection.
.TP
k=1
number of projections to process.
.TP
length=1900
is the length of each unpacked waveform.
This variable does not affect the other modes of operation.
.TP
if=t
input file.
The mode flags (see below) tell
.B scan
what type of data is in the input file.
.TP
of=udata
will contain single precision data representing either
a parameter estimate or the raw waveform.
.PP
There are six mode flags that set the type of
data in the input file.
They are:
.TP 13
-t(on)
Sixteen bit data representing a time of flight estimate
or an averaged waveform.
This mode is default.
.TP
-q(off)
Quaduature data.
This input mode disables the post processing
to remove slant in each projection.
Alternating projections are swapped unless
the
.B -s
flag is listed.
.TP
-w(off)
Waveform data.
This input mode disables all post processing.
After an estimate is made from the waveform
the data can be run through this program a second
time to remove the scanner artifacts.
.TP
-c(off)
Compressed (or packed) data.
This input mode disables all post processing.
After an estimate is made from the waveform
the data can be run through this program a second
time to remove the scanner artifacts.
.TP
-f(off)
Floating point data.
.TP
-l(off)
four byte lond data.
.PP
There are also several flags that can be set from
the command line to control the post processing.
They are (default value listed in parenthesis):
.TP 13
-r(off)
invokes raw output mode.
In raw mode no post processing is not done
to remove the scanner artifacts.
This is equivalent to using both
.B -s
and the
.B -a
flags.
.TP
-s(off)
turns off the swapping of alternate projections.
This is done since the experimental hardware alternates
directions while scanning the object.
This option is also set by using 
.B -r
flag.
.TP
-a(off)
turns off the adjustment for slant.
Slant is removed from each projection
to make the data appear that is was
taken on a scanner where the tracks were really
parallel.
This option is also set by using 
.B -r
flag.
.TP
-p(off)
turns off printing of the program data.
.SH FILES
.TP 13
t
default input file
.TP
udata
default output file
.SH DIAGNOSTICS
A error is printed if a file can not be opened.
A warning is printed if all the input data can't be read.
.SH SEE ALSO
Crawford, Carl, 
"Multipath Artifacts in Ultrasonic Transmission Tomography,"
TR-EE 81-43,
December 1981.