Computer Methods and Programs in Biomedicine, 31(1992) 159-161 0 1992 Elsevier Science Publishers B.V. All rights reserved 0169-2607/92/$05.00
COMMET
159
01255
Abstract
Microcomputer
BASIC program for quantitative analysis of biological shape Zhang Hong a and Zhao Huijuan ’
’ Department of computer, Second Military Medical University, Shanghai, China and h Central laboratory of Changhai hospital, Shanghai, China
A program is described in this paper which uses a microcomputer shape. The program is designed for practical use, it can measure make significant tests.
Digitizer;
Quantitative
analysis;
Shape
parameter;
Biological
and a digitizer for quantitative analysis of biological shape parameters, make statistics of parameters and
shape
A; perimeter, P; form factor, FF = 4 max. diameter, Dl; min. diameter, 02; mean diameter, D, [1,2]; major axis, L; minor axis, B; elongatedness, EI = L/B; elongation index, EI = CL*-B2)/(L2 + B2) [3,4] (see Fig. 1.) In practice it is not sufficient to measure only one sample, usually it is necessary to measure a lot of samples. Sometimes it is necessary to compare some parameters of two kinds of biological area,
1. Introduction
r/A/P2;
The analysis and characterization of biological shape can be realized with the help of a microcomputer and a digitizer. Many researchers introduce a lot of parameters to represent the speciality of a shape. Of these parameters we selected those which are not dependent on an arbitrary starting point or a particular coordinate system:
Note : G: centre of gravity, p.p.-- perimeter point L : major axis -- connecting two p.p. (perimeter point ) furthest away from each other -- shape projection on axis perpendicular B : minor axis to major axis RI: max radius -- connecting G and the furthest p.p. &: min radius -- connecting G and the nearest p.p. R : mean radius -- mean of radii connecting and a p.p. S : circumscribed rectangle whose sides parallel to major and minor axis Fig. 1. Shape parameters
definition.
160
material in order to distinguish between them. So, our analysis program consists of three functions: measurement of shape parameters, statistics of shape parameters, and significance test for the difference between parameters.
2. Program description The main menu of the program has four possibilities: initialization (configuration); sampling and calculation; display and printing; statistics.
press the ENTER key. If the magnification factor is equal to the last one, it is also enough to press only the ENTER key. 2.3. Display and printing
The data of the file assigned by user can be displayed on the screen or printed out on paper. The specified graph (according to the type name and serial number) can be displayed on screen: its shape features are also displayed on the screen. 2.4. Statistics
2.1. Initialization
The initializing function contains three terms. (a) Selecting the display mode. For fitting various kinds of computer the following three display modes: CGA (640 X 200), EGA (640 X 3501, VGA (640 x 480) can be selected. (b) Specifying the data rate from digitizer. Usually the rates of data from digitizer can be changed according the operator’s proficiency. With the CALCOMP series 2000 digitizer the rate of data output can be changed from 1 point/s to 125 point/s in 8 grades. (c) Assigning the data file. The chain code of contour from digitizer and measured shape parameters must be saved on disk for further use. The user must assign a file name to save data into it or take data from it. If the named file does not exist it will be created. 2.2. Sampling and calculation Before sampling, the user should first enter the type name and serial number of a sample. A type name is represented by a character and a serial number of 3 digits. Then the user must enter the magnification factor of the image, so that the digitizer units can be automically scaled into a real unit of measure. The starting and ending of sampling is controlled through the keyboard. After sampling, the shape parameters will be calculated and displayed on the screen. The system can continuously measure samples one by one. For convenience, if the type name is the same as the last sample and the serial number is bigger than the last one, it is sufficient only to
(a> Mean and standard deviation. The means and standard deviations of parameters in each sample type in an assigned file can be calculated and displayed or printed as well. (b) T-test. For a specified file to which the user has assigned two types of samples to be composed, the grouped T-test will show the significance of difference between parameters. In this step, 0.05 and 0.01 will be taken as confidence level. In the calculation process, first the F-test is taken, to determine whether the variance of parameters is homogeneous. If the variance is homogeneous the T-test will be taken, otherwise the corrected T’test will be taken.
3. Hardware and software specification The program runs on the IBM PC/ XT/ AT/ 386 with a colour graphics adapter and a colour monitor (or EGA, VGA graphics system). No problems are anticipated with similarly equipped fully IBM-compatible computers. An EPSONcompatible printer is used to print the results: no special features of the printer are used. The digitizer is a CALCOMP series 2000. Its active area is 298 X 298 mm and its accurary is to less than 0.625 mm. The digitizer is connected to the microcomputer through the asynchronous communications adapter RS-232, port 2. The communication format is 9600 baud, even parity, 7 data bits and 1 stop bit. The program is written in Turbo BASIC and is modified to fit other BASIC languages: Microsoft
I61
GWBASIC; IBM BASICA. The data saved to the file is in standard text format (ASCII), it is easily used by other utility programs.
4. Availability The program is available in MS-DOS on a 5” or 3.5” double-sided, soft-sectored floppy disk. Request should be sent to the author together with such a formatted floppy disk.
References [l] R. Ranney Mize, et al., The Microcomputer in Cell and Neurobiology Research (New York, Elsevier, 1985. pp. 185-191). [2] S. Bradbury et al., Analytical and Quantitative Methods in Microscopy (Cambridge University Press. 1977, pp. YlL 116). [3] S. Ishikawa, Geometrical indices characterization psychological goodness of random shapes (Proc. 4th Int. Conf. Pattern Recognition, 1978, pp. 414-416). [4] E. Bribiesca, et al., Shape description and shape similarity measurement for two-dimensional region (Proc. 4th Int. Conf. Pattern Recognition. 197X, pp. hOX-612).