Granxel Application of the concept of data structure to the digital processing of microstructural images Lúcio C. M. Pinto1, Fernando S. Lameiras1, José C. Bressiani2, J. C. F. Pujol1 1Centro de Desenvolvimento da Tecnologia Nuclear 30161-970 - Belo Horizonte - MG - Brazil 2Instituto de Pesquisas Energéticas e Nucleares 05499-900 - São Paulo - SP - Brazil
Abstract
Quantitative metallography involves the evaluation and analysis of a great number of geometric parameters of the microstructures present in material images. In computer science, data structures are powerful tools to organize and process complex data. In this paper, we apply the concept of data structure to material science, by introducing the concept of a virtual microstructural element, which efficiently organizes parameters of material microstructures. The data structure we propose allows the abstraction from the low level processing of digital images, and improves the development of algorithms. This paper describes the data structure and the advantages of its application.
1. Introduction.
The advent of high performance microcomputers, combined with the development of software known as image analyzers/1-4/, made easier, faster and more precise the process of material analysis. However, quantitative metallography /5/ involves a great number of geometric and statistical evaluations in the process of material characterization. A number of two and three-dimensional parameters must be determined/6/, in order to characterize the microstructure of the material being analyzed. These parameters describe and represent structures present in digital images of materials. In computer science, data structures are used to organize and process complex data, and it is natural to apply this concept to the digital processing of material microstructural images. As a consequence, in order to improve the development of algorithms for quantitative metallography, we introduced the concept of virtual microstructural element. In analogy to pixel, which is the smallest element of a digital image/7/, it was called granxel. In the following sections, the data structure is presented, and the advantages of its application are discussed.
2. Granxel data structure.
To process the great number of parameters of microstructural elements, the use of data structures is a natural consequence. They help organizing complex data, mainly in large programs, as is the case of systems for digital image processing/7-9/. Data structures allow the grouping of inter-related data, so that they may be treated as a whole unit, instead of individually /10-12/. Usually, image analyzers are used to quantify geometric parameters such as area, form factor, mean intercept, center of mass, Feret diameter/1/. Granxel is a data structure that encapsulates all these parameters. This data structure can be equally applied to grains or pores, which are the main microstructures in ceramics(see Figure 1). Modern programming languages, such as C/C++ /11/ or Pascal/10/, allow the building of user-defined data structures. In the C language, the granxel data structure may be written as follows:
struct granxel {
int granxelIdentifier;
int type;
int frontier;
int area;
float formfactor;
int maxwidth;
int centerofmass;
float orientation;
int* neighbors;
int* granxelfathers;
int* granxelson;
struct feretdiameter;
struct perimeter;
}
where,
struct feretdiameter {
int dfv;
int dfh;
int dfa;
},
where (dfv), (dfh) and (dfa) are the width of the element vertically, horizontally, and at a given angle a, respectively. The angle a may be selected to give the maximum width of the element (see Figure 3).
struct perimeter {
int normal;
int total;
},
where the normal perimeter (normal) is external to the element, that is, the contour of the element, and the total one (total) includes the perimeter of pores eventually existing within the element. Obviously, for pores the normal and total perimeters are equal. Once more, to compute the actual values, the image resolution and magnification must be taken into account.
The granxel data structure defines a data type, so that variables may be declared of that type, in the same way as variables may be declared as float or integer. In the case of object-oriented programming, this data structure may represent a class. Figure 1 shows a typical microstructural element and some attributes of the granxel data structure. Of course, the user may add new attributes to the structure presented.
3. Advantages of using granxel
Computationally, as well as conceptually, there are a number of advantages in using the granxel data structure. For example, if a grain contains no pores, its normal and total perimeters are equal, otherwise they are different. The internal pores of a grain are considered as elements of that grain and are hierarchically subordinated to it.
To access any attribute a of a granxel x, one simply writes x.a,. From a microstructural point of view, as long as it is already processed, an image is completely defined by its structure of granxels. Usually, details of the digital image are not of interest for the researcher or engineer, who is the final user of image analyzers. Consequently, as all the relevant information is encoded in the data structures, the raw image can be represented by the collection of granxels, which are much more efficient to store and manipulate.
The granxel data structure also allows the definition of a number of relations between microstructural elements: neighborhood (a relation between grains), indicated by the pointer neighbors, membership (a relation between pore and grain), indicated by the pointer granxelsons, and paternity (a relation between grain and pore), indicated by the pointer granxelfathers. A set of operations can be also defined:
* subtraction - subtracts two granxels (subtraction of area and perimeter, for example);
* deletion - deletes a granxel;
* rotation - changes the orientation;
* zoom - the granxel may be magnified;
* areaC - generates the circle with equal area (equivalent area circle);
* perimeterC - generates the circle with equal perimeter (equivalent perimeter circle).
The structure of granxels defining the image must reflect any changes introduced by these operations. Granxels may be processed (to have parameters computed) all at once or individually. Of course, attributes such as neighbors, granxelfathers, granxelsons, or any other defined by the user (triple point, for example), must be globally processed.
By using generic programming
/10-12/, the granxel data structure becomes a class,
allowing the user to define his own subclasses with application-dependent
features , and whose general features are inherited from the granxel
class. Moreover, a whole library of classes can be created and
updated by users as need arises.
4. Application
Our ideas have been implemented in the Quantikov/4,13,14/ image analyzer. Quantikov system a system for acquiring, processing and analyzing digital images for the Windows™ environment. The system provides a plethora of tools to improve the quality of the image, and make it suitable to the computation of the metallographic parameters, which are encapsulated in the granxel data structure. The granxel concept improved and made easier the implementation of the algorithms in this system. A aplicacao da ideia do granxel é muito simples. O primeiro passo é construir um algoritmo para varrer toda a imagem para obter-se os granxels relativos a todos os elementos. Apos este processamento vamos obter alguma coisa como mostrado na figura 4. Esta figura mostra por se mesma a grande versatilidade da ideia do granxel. Observa-se que cada elemento aponta para direita e para baixo. O granxel 1 aponta para o granxel 2 e assim por diante sendo que o ultimo granxel aponta para ninguem, isto é, para nil, estando portanto aterrado. Cada granxel aponta para baixo para os seus filhos, isto é, os poros. Quando aponta para ninguem (nil) entao o granxel(grain) não tem filhos (poros). Nota-se que a ideia do granxel torna a implementacao de operadores bastante facil e altamente legivel. Por exemplo, o operador DeleteGrain. Para eliminar um grao jah processado basta mudar-se o ponteiro para o grao seguinte como mostrado na figura 4b. Isso implica num custo computacional muito baixo e enorme versatilidade.
Another relevant feature was the implementation of the Saltykovs method/4,6/ to calculate the three-dimensional particle size distribution from two-dimensional slices. For example, using the Saltykov method it is possible to obtain the surface/volume ratio, usually named Sv, from areas and diameters obtained from digitized cross-sections.
Nossa ideia do granxel torna a implementacao do methodo de Saltykov bastante simples. O primeiro passo é processar a imagem para obter todos os granxels, isto é, obter a lista de granxels conforme figura 4.
A seguir faz-se uma pesquisa na lista de granxels procurando-se pelo maior granxel.area obtendo-se assim o grao de maior area. Calcula-se o diametro equivalente e a seguir aplica-se o methodo de Saltykov para obtencao de fracoes volumetricas, conforme indicado na figura 5.
The Quantikov system makes statistical evaluations of the computed data, generates graphics and tables for visualization and analysis of these data. Figure 4 shows a typical grain size distribution obtained for a UO2 ceramic pellet. From the granxel structure it is straightforward to obtain the size distribution of the processed elements. Graphics of Diameter, Feret diameter, length and form factor distributions are produced by a SizeDistFunction procedure, which receives granxel structures as input data.
5. Conclusion.
In this paper, the advantages of using data structures in the digital processing of microstructural images has been discussed. A virtual microstructural element has been introduced and its application to materials science has been described.
By specifying other parameters, our concept can be used in other applications involving digital processing of microstructural images (in medicine, for example).
An object-oriented implementation of the granxel concept is already in progress, where classes are defined with application-dependent features, and general features are inherited.
6. References
/1/ Leco Corporation IA-30001 - IMAGE
ANALYSIS SYSTEM, Instruction Manual and Specifications,
St. Joseph, Michigan, USA : 1995
/2/ Ernst Leitz wetzlar GMBH. Qualitative
und quantitative Bildanalyse system, LEITZ T.A.S -
D-6330 Wetzlar, Germany : 1992.
/3/ Cambridge Instruments company. QUANTIMET
900 - Image Analysing System Rustat Road, Cambridge, CB1
3QH,UK : 1987.
/4/ Pinto, L.C.M., Quantikov Image Analyzer -
Ph.D. Thesis, USP, São Paulo, Brasil, 1996.
/5/ Underwood, E.E. Particle Size
Distribution. In: Quantitative Microscopy, Edited by R.T.
DeHoff and F.N.Rhines, p. 149-200. McGraw-Hill, Inc.,New York,1968.
/6/ Chermant, J.L. & Coster, M. Use of
Saltykov corrective method with a semi-automatic and automatic
image analyzers. Praktische Metallographie v.14, p.521-539,
1977.
/7/ Gonzalez, Rafael C. and Wintz, paul, Digital
Image Processing, Addison Wesley, 2a. edição, 1977.
/8/ Galbiati, Louis J.Jr. Machine Vision
and Digital Image Processing Fundamentals, Prentice-Hall
Intern. Editions, 1990.
/9/ Jain, A.K. Fundamentals of Digital
Image Processing. Prentice-Hall, 1989.
/10/ Tenenbaum, A. M. And Augenstein, M. J.,
Data Structures Using Pascal, 1986, Prentice - Hall International
Edition.
/11/ Wiener,R. S. and Pinson, L. J., Object
Oriented Programming and C++, 1991, Macron Books, Addison -
Wesley Publishing Company.
/12/ Norton, P. and Yao, P., Borland C++
Programming for Windows, 1992, Borland Bantam Computer Books.
/13/ Pinto, L.C.M., Bressiani, J.C.,
Vasconcelos, W.L, Vasconcelos V. An algorithm of Digital Image
Processing Applied do Quantification of Grains with Discontinuous
Boundaries. Acta Microscopica (1996 )
- p. 168-169, Volume 5, Supplement B, October 1996.
/14/ Pinto, L.C.M. and Bressiani, J. C.,
Quantificação de Micropartículas com o analisador
Microstrutural Quantikov, Proceedings of the International
Congress of Metallurgical Technology and Materials - 1994, pp-
247-252, vol. 3, (1994), São Paulo, Brazil.
Figura 1 Usual microestruture of UO2 pellet showing struture of grains and pores. |
Figura 2 The main idea of granxel. GF is the granxelfather, N neighbors, GS are the sons (pores), G the other grains. |