Escolar Documentos
Profissional Documentos
Cultura Documentos
discussions, stats, and author profiles for this publication at: http://www.researchgate.net/publication/258262937
CITATION READS
1 311
5 AUTHORS, INCLUDING:
Abstract: Digital image processing,segmentation and analysis of microstructural images are crucial to ob-
tain three dimensional ( 3D) information about the features present in microstructure such as particles or
grains. There are several commercial as well as public domain packages availible for processing and analy-
sis of images; “ImageJ”is one of them whose wide adoption,long existence and extensible plugin style
has made it a tool of choice for scientists from a broad range of disciplines. It contains almost all of the
basic and latest functionalities required to process,segment,reconstruct and visualize materials micro-
structural images along with analysis tools ( for instance ‘Particle Analyzer’,‘3D object counter’,‘3D
Roi Manager’and so on) for sophisticated statistical processing of groups of particles. Although it is very
popular and is considered to be an useful and efficient open source image processing and analysis software
in biomedical research fields,a little is known about it in materials science sector. In this article we intro-
duce ‘ImageJ’briefly to materials science community ( particularly those professionals who have no expe-
rience of image processing and analysis) and propose a general frame work to process,segment,analyze
and visualize microstructural serial section images in 3D by using it.
Key words: material stereology; microstructure; serial section images; imageJ; image segmentation; im-
age analysis
收稿日期: 2012-11-20
基金项目: 国家自然科学基金( 51071019,
50901008,
50871017) 。
作者简介: Asad Ullah( 1983 - ) ,男,Gilgit-Baltistan,Pakistan。研究方向: 数学和计算材料科学。
通信作者: 刘国权,教授。E-mail: g. liu@ustb. edu. cn
302 中国体视学与图像分析 2012 年 第 17 卷 第4 期
应用 ImageJ 程序包进行材料显微组织图像处理、分析和可视化的一种框架
ImageJ can read most of the common and impor- of our knowledge,there are few studies in materials
tant image formats including BMP,TIFF,JPEG,GIF, science which used imageJ for processing and analysis
DICOM,FITS,and PNG,RAW and many other for- of microstructural images,for instance [12 - 16],but
mats. It can display,save,edit,print,process and most of them only used a specific plugin for a specific
analyze 8-bit grayscale and color,16-bit integer and task and used other commercial softwares for the rest of
32-bit floating point images. It supports all types of processing. This seems to be the result of lack of
common image manipulations including whole images, awareness about the functionalities and plugins of im-
volumes,specific image regions and individual pixels. ageJ and also lack of a strong collaboration between bi-
The concept of volume in ImageJ is actually the stack of ologists and materials science researchers; ultimately
a sequence of images that share a single window. It can there exists a communication gap. Therefore,we felt it
perform many image processing,segmentation and a- is necessary to put an effort towards reducing this com-
nalysis operations,for instance,logical and arithmeti- munication gap to some extent by proposing a general
cal operations between images,contrast manipulation, framework to process,segment,analyze,reconstruct
convolution, Fourier analysis, distance transforma- and visualize materials microstructural images in three
tions,sharpening,smoothing,edge detection,morpho- dimensions by using imageJ. As a case study,this arti-
logical operations,median filtering,watershed segmen- cle used optical microscopy serial section images of pure
tation,particle analysis and many other advanced oper- iron.
ations. It performs image processing and analysis tasks
using filters,these filters are written as plugins. Due to 1. The framework
its open source nature,it is extensible via its Java plu-
gins and recordable macros; user community can devel- In order to convert the experimental serial section
op the plugins according to their needs and add them to images into three dimensional volume datasets for fur-
ImageJ to extend its functionality. According to a re- ther characterization and visualization purposes,several
cent study[10],ImageJ has more than 500 plugins to processing steps are required. These processing steps
perform different operations on images. A full review of include, importing images into imageJ, setting the
the evolution of ImageJ and its role in image processing scale,registering ( aligning) ,selecting the region of
and analysis is well beyond the scope of this article, interest ( ROI) and cropping,segmenting particles or
but one can refer to [8 - 10]for an excellent overview grains in images,making the image stack isotropic,an-
about its all aspects. alyzing grains or particles and finally visualizing the
Because of its popularity in biomedical and biolog- particles to study the morphology and other shape fac-
ical research fields,ImageJ has emerged as increasing- tors. The details of each of these steps are given below.
ages have to be placed into a folder in a proper line the length of the scale bar. This line length is giv-
sequence according to the acquisition order. These im- en in pixels. Then Analyze > set scale command is used
ages can be accessed by browsing through File > import to fill the information about the distance ( the value of
command from imageJ menu. Thus,the sequence of scale bar) in ‘Known distance’field and desired unit
images is imported into imageJ in form of a scrollable in ‘Unit of length ’ field,the ‘Distance in pixels ’
stack displayed in a single window. In this study,we field is filled automatically due to the drawing of line on
imported 100 image sections which formed our stack, scale bar. In our case,we have the ‘known distance’
as shown in fig. 2. ( value of scale bar) as 100 μm ( as shown in fig. 2)
To set the measurement scale,the scale bar on the and ‘Distance in pixels’as 126,this sets the in-section
original microscope images can be used,by selecting resolution of our images which is 0. 974 μm. ImageJ
the ‘Straight line’tool from menu bar and drawing a uses this scale for all the measurements on images.
( a) Showing the position of scroll bar at 25 th image section; ( b) A different orientation view depicting the stack hierarchy of imageJ.
Fig. 2 Stack of imported images
sample in microscope stage or some other reasons can The sub-pixel accuracy can be achieved by using
be corrected in imageJ by manual and automatic ‘Stackreg’plugin. The algorithm used in this plugin
means. There are many imageJ plugins available for provides the recursive alignment of stacks where each
image registration,we used two of them in this study image is used as the template with respect to which the
namely ‘Align3 _ TP ’ [17]
and ‘Stackreg ’ . The [18] next image is aligned,based on a coarse-to-fine itera-
‘Align3_TP’plugin can be located from imageJ menu tive strategy known as“pyramid approach”. For exam-
bar by selecting Plugins > Align Stacks > Align3 _ TP ple,first image is used as the template for second im-
and Stackreg can be located by selecting Plugins > age and after alignment with first one this resulting im-
Stacks > Stackreg. ‘Align3_TP’plugin allows the user age will be used as the template for third image and so
to register two images ( or two image stacks) ,by suc- on. Thus,the alignment process is finished only when
cessively aligning two dimensional ( 2D) sections. We the images are perfectly aligned on each other. Com-
used it for an initial alignment of images by overlaying plete details of the algorithm can be found in [18].
two consecutive images and manually rotating and When the plugin is launched,the current slice acts as
2012 年 第 17 卷 第4 期 Asad Ullah et al: A framework for image processing,analysis and 305
visualization of materials microstructures using ImageJ package
a global anchor. In this study,we used the first image such as dilation,erosion and Euclidean distance map,
of our stack as global anchor and thus got the entire im- which may improve the thresholded images,but a man-
age stack completely registered with sub-pixel accuracy. ual segmentation is necessary to completely clean the
The stack of registered images is shown in fig. 3( d) . remaining artifacts.
Here,we have cropped an area of 300 × 270 μm
1. 3 Image cleanup and segmentation ( note that imageJ can also handle massive datasets but
here we selected a small ROI from our dataset for dem-
Image segmentation is an important step towards
onstration purposes) from our image stack and applied
analysis of grains. Its main objective is to separate the
a brightness threshold to convert the stack into a binary
objects of interest from background and from each other
volumetric data set in a way that each pixel belonging to
as well. Several automatic and manual image segmenta-
the interior of grain is set to white,while each belong-
tion methods are available in the literature,such as
ing to the boundaries is set to black. However,after
thresholding,region growing,watershed segmentation,
thresholding,the images were not cleaned properly and
edge detection and so on. The selection of a specific
there remained some spots and other artifacts. To re-
method depends on the imaging condition under which
move the spots,we have applied some morphological
the image is acquired. However,a suitable segmenta-
operations e. g. morphological opening,in which an e-
tion method must be applied for each type of image ac-
rosion operation is followed by a dilatation that removed
quired. An overview of image segmentation methods
some small spots in the background. These commands
can be found in [19 - 20].
can be reached via Process > Binary > Dilate and
Before starting the segmentation process,the re-
Process > Binary > Erode from the menu. Other re-
gion of interest ( ROI) has to be selected in the image
maining artifacts are corrected manually. It is also
stack and cropped,this can be done by selecting the
usual that in case of space-filling grains,some grain
‘rectangular tool’button from below the menu bar to
boundaries left unfilled within the image sections after
outline the desired area and cropped by using Image >
thresholding ( fig. 3 ( a) ) and in case of particles dis-
crop command from menu bar. After cropping the ROI, persed in matrix phase,some particles may overlap.
the boundaries of objects ( grains / particles) have to be This is actually the result of low contrast between parti-
identified in each 2D image. This is accomplished by cle-particle contacts. There are several options in im-
applying a threshold using Image > Adjust > Thresh- ageJ to address these issues,but for such type of prob-
old command,provided that the objects have homoge- lems a 3D watershed segmentation algorithm is always
neous pixel values and there is a significant difference considered to be a best choice. It does not only correct
between the pixel values of objects and background. these boundary problems but also labels each 3D parti-
Otherwise,the image background should be subtracted cle with a unique identifier,which is very useful for
by using Process > Subtract Background command be- analysis of particles. In some recent studies it was ap-
fore thresholding. There are different options available plied to overcome similar problems[21 - 22].
in imageJ for thresholding 2D images or 3D stacks ( vol- ImageJ have some plugins to implement 3D water-
umetric datasets ) including automatic ( by selecting shed segmentation on image stacks,but unfortunately
different algorithms,e. g. Huang,Isodata,Li,Otsu, its results are not satisfactory. Instead,some alternative
MaxEntroppy,Yen and so on) and manual ( by selec- methods can be applied to fill these gaps in grain
ting an interval of values manually) thresholding. It is boundary interfaces. One way is to apply a binary wa-
often not the case that the objects are thresholded in a tershed algorithm ( note that this algorithm works only
satisfactory way. Mathematical morphology provides on 2D binary images) on the stack of images by selec-
some sophisticated tools for morphological operations ting Process > Binary > Watershed command from
306 中国体视学与图像分析 2012 年 第 17 卷 第4 期
menu,it automatically fills the boundary gaps or sepa- ming. Fig. 3 ( d) shows the final stack of thresholded
rates the overlapping particles in each 2D image,and and cleaned images,in which the images are perfectly
this method works best for smooth convex objects that aligned on each other with sub-pixel accuracy.
do not overlap too much. The second method is to cre- The next step in the segmentation process is labe-
ate an Euclidean Distance Map ( EDM) of each 2D im- ling of objects for quantitative analysis. There exist some
age in the stack and then find the local maxima by se- commands and plugins in imageJ for labeling of parti-
lecting Process > Binary > Distance Map and then cles. The Analyze > Analyze Particles command can be
Process > Find Maxima. Here,we used the second used to label particles in 2D,it can be applied to 3D
method to fill the grain boundary gaps exist in each 2D stacks but it labels particles independently in each 2D
image by selecting a suitable noise tolerance. Actually image section so that the same particle gets different
the‘Find Maxima’command finds the local maxima in identifiers in different sections. This problem can be
an image and creates one segmented particle per maxi- avoided by applying a 3D labeling method. In this in-
mum upon selecting ‘Segmented Particles’from drop stance,the ‘3D object counter’plugin[23] is the best
down menu of ‘Output type’as shown in fig. 3( b) & choice for 3D labeling of particles. It first applies a
( c) . To apply it on whole image stack the‘FindStack- threshold to image stack and labels each particle in 3D,
Maxima’macro was used. Thus,it automatically filled and also computes geometrical measures. Once installed
the missing gaps in each image of our stack. Although in plugins folder,this plugin can be reached via Plugins
these plugins operate in only 2D on a section by section > 3D Object counter. The output of‘3D object counter’
basis,but is far better than manually tracing the grain applied to our images stack is shown in fig. 4.
boundaries on each 2D image,which is time consu-
( a) Showing the gaps exist in grain boundaries after thresholding; ( b) Showing the euclidean distance map of image
followed by‘find maxima’operation. The‘ + ’marks inside the image depict the local maxima of each grain; ( c)
Shows the result of‘find maxima’operation,which filled the gaps in grain boundaries; ( d) Shows segmented
and perfectly aligned ( with sub-pixel accuracy) image stack.
Fig. 3 A step by step process of image segmentation and cleanup
2012 年 第 17 卷 第4 期 Asad Ullah et al: A framework for image processing,analysis and 307
visualization of materials microstructures using ImageJ package
Fig. 4 The output of‘3D Object Counter’plugin showing 3D segmented and labeled grains. Labels are
shown as unique colors as well as integers ( see the integers inside small rounded rectangles on the
upper left portion of the screen shot) . The Log window shows the count of grains and the results
window shows geometrical measurements.
[23]
analysis plugins include ‘3D object counter ’ and It can also compute the 3D distance measurements from
[25]
‘3D Roi Manager’ . In this study,we firstly used one particle to others ( for example,the distance from
‘3D object counter ’ plugin to label each 3D grain centre to centre,border to border,border to centre,
( this plugin also computes geometrical measures as eccentricity,radial distance) ,3D angles between three
shown in fig. 4) and then used ‘3D Roi Manager’to particles and 3D colocalization and contact surface. A
get the geometrical and intensity measurements. screen shot of these measurements on our image stack is
As the particle size and surface area are key char- shown in fig. 5. According to the measurements,there
acteristics which control many properties of materials are a total of 273 grains in our image stack. However,
for example flowability,agglomeration,dusting tenden- for an unbiased quantitative analysis it is better to re-
cy and other mechanical properties ( Hall-Petch effect) move the grains which touching the border of the sam-
and so on. The ‘3D Roi Manager’can compute these ple,this can be done in ‘3D object counter’. Thus,
characteristics and many other geometrical measures in- after removing the outside grains,a total of 91 unbiased
cluding ferret diameter,sphericity or compacity ( ratio grains left in our sample with the largest grain having
between volume and surface) and ellipsoid fitting; the volume 229 201. 41 μm3 ,ferret diameter 120. 875 μm
minimum,maximum and mean distance from the center and the smallest grain having volume 3404. 36 μm3 and
of the particle to its boundary,etc. The intensity meas- ferret diameter 25. 445 μm. Both of these largest and
ures include min,max,mean,integrated density,etc. smallest grains are shown in fig. 7.
Fig. 5 The upper right window is the‘3D Roi Manager’showing a list which contains ID's of grains which are added
via segmented image of‘3D Object Counter’by using‘Add Image’button ( can be seen clearly) . The upper
left window is the segmented image sack which is added for measurements. The windows‘3D Measure’,‘3D
Quantify’and‘3D Distance’show the geometrical,intensity and distance measurement results respectively.
2012 年 第 17 卷 第4 期 Asad Ullah et al: A framework for image processing,analysis and 309
visualization of materials microstructures using ImageJ package
Besides these basic plugins,there available many ume,surface area,Euler characteristic,local thick-
other plugins which can be used for quantitative analy- ness,moments of inertia,Ferret diameter,number of
sis of grains or particles. For instance,the ‘Particle topological holes ( handles) in the particle,number of
[26]
Analyser’in ‘BoneJ’ plugin can be used to meas- enclosed cavities in the particle and coordinates of cen-
ure particles in a 3D binary image stack. This plugin troid of particles. It calculates the surface area by first
was particularly developed for bone image analysis,es- creating a surface mesh of each particle by using the
pecially to study ‘osteocyte ( star shaped cells) lacu- well known marching cubes algorithm[27] and then
nae’in bones,but it can be used to study any porous adding the areas of triangles making up the mesh. The
media. Like‘3D object counter’and‘3D Roi Manag- volume enclosed by surface mesh and the best fit ellip-
er’,it also labels unique particles and analyze each soids to the mesh of each particle can also be computed
particle separately. It can compute many important by using it. Fig. 6 shows the ellipsoids fitted to each
quantities for each individual particle including vol- grain's surface mesh.
Fig. 6 Results of‘Particle Analyser’. The upper left window shows the surface renderings of each grain during
quantification process,while the ellipsoids fitted to each grain are also visible clearly. The upper right
window shows the segmented 3D grains in the image stack. The Results window shows the measurement
results. Log window shows warnings about grains which could not be rendered due to small size.
[28]
Another useful plugin is‘3D Convex Hull’ ,it ualize it in 3D,which can be helpful to determine ap-
calculates the 3D shape descriptors for example 3D so- propriate analysis methods or parameters. ImageJ is
lidity and 3D Convexity based on a convex hull con- considered to be a popular tool to analyze and visualize
structed from the image stack. Other numerous plugins massive datasets of microscopic images. It provides
are freely available online which can cater the needs of practical solutions for memory management and displa-
materials science researchers. ying large datasets without unrealistic hardware require-
ments[29].
4 3D visualization of microstructures Volumes can be visualized by either volume ren-
dering or surface rendering. Volume rendering can be
To better understand the data it is necessary to vis-
310 中国体视学与图像分析 2012 年 第 17 卷 第4 期
defined as the rendering of all the volume data by spec- rithm[32] which is a useful algorithm to preserve the to-
ifying color and opacity of each voxel and surface ren- pology of particles or grains during rendering.
dering is the rendering of the iso-surface of the region In this article,we used ‘ImageJ 3D Viewer’plu-
of interest ( ROI) from volume data. There available gin for both volume and surface renderings. As before
two important and powerful imageJ plugins ‘Volume visualization,the brightness and contrast of the image
Viewer’and ‘ImageJ 3D Viewer’for 3D visualization stack must be adjusted for an improved visualization.
and manipulation of massive datasets. The ‘Volume We adjusted the brightness and contrast by using the
Viewer’plugin can be used for more complex volume command Process > Enhance Contrast,in which there
visualizations in which one can slice in any direction are several options but the ‘Normalize’option is best
inside the volume. The hardware accelerated ‘ImageJ among all,which allows all the image sections in the
[30]
3D Viewer’plugin can be used to visualize the data stack to have almost the same brightness and contrast.
as volume,orthogonal slices and surfaces at the same The 3D volume and surface renderings of our image
time. There exist several ways to implement volume stack are shown in fig. 7. By using ‘ImageJ 3D Vie-
renderings,such as ray-casting[31] and texture map- wer’one can also render each individual grain from
ping. ‘ImageJ 3D Viewer’uses 2D texture mapping image stack for visualization and the rendered dataset
method for volume rendering,that ’s why it is user can be animated and saved as movies. We rendered
friendly and does not need dedicated workstations, here the largest and the smallest grains in our dataset,
rather it can be run on common laptops. For surface as shown in fig. 7.
rendering,it uses a variant of marching cubes algo-
( a) Surface rendered microstructure formed from 100 sections,composing a volume of 300 × 270 × 170 μm3 ,containing
273 grains; ( b) Surface rendered microstructure containing 91 grains,border touching grains are removed for unbiased
quantitative analysis; ( c) The largest and smallest grains in the system; ( d) Volume rendered microstructure.
Fig. 7 Different views of surface rendered and volume rendered microstructures
2012 年 第 17 卷 第4 期 Asad Ullah et al: A framework for image processing,analysis and 311
visualization of materials microstructures using ImageJ package
cal imaging software tools[J]. Nature Methods,2012,9: mensional analysis of particle coarsening in high volume
697 - 710. fraction solid-liquid mixtures [J]. Acta Materialia,
[8] Collins T. ImageJ for microscopy [J]. Bioloty Tech- 2006,54: 2027 - 2039.
niques,2007,43( 1) : S25 - S30. [22] Rowenhorst D J,Lewis A C,Spanos G. Three-dimension-
[9] Abramoff M,Magalhaes P,Sunanda R. Image processing al analysis of grain topology and interface curvature in a
with ImageJ [J]. Biophotonics International,2004,11: β-titanium alloy [J]. Acta Materialia,2010,58 ( 16 ) :
36 - 42. 5511 - 5519.
[10] Schneider C A,Rasband W S,Eliceiri K W. NIH Image [23] Bolte S,CordeliRes F P. A guided tour into subcellular
to ImageJ: 25 years of image analysis [J]. Nature Meth- colocalization analysis in light microscopy [J]. Journal of
ods,2012,9: 671 - 675. 2006,224( 3) : 213 - 232.
Microscopy,
[11] ImageJ [EB / OL]: [2012 - 11 - 20]. http: / / rsb. info. [24] Meijering E H,Niessen W J,Viergever M A. Quantita-
nih. gov / ij / index. html. In. tive evaluation of convolution-based methods for medical
[12] Baldissera M R,Rios P R,Hein L R O,et al. Three-di- image interpolation [J]. Medical Image Analysis,2001,
mensional characterization of pores in Ti-6Al-4V alloy 5( 2) : 111 - 126.
[J]. Materials Research,
2011,14: 102 - 106. [25] Iannuccelli E,Mompart F,Gellin J,et al. NEMO: a tool
[13] Sintay S D. Statistical microstructure generation and 3D for analyzing gene and chromosome territory distributions
microstructure geometry extraction [D]. Carnegie Mellon from 3D-FISH experiments [J]. Bioinformatics,2010,
University,2010. 26( 5) : 696 - 697.
[14] Vanderesse N,Maire ,Chabod A,et al. Microtomo- [26] Doube M,Kosowski M M,Arganda-Carreras I,et al.
graphic study and finite element analysis of the porosity BoneJ: free and extensible bone image analysis in ImageJ
harmfulness in a cast aluminium alloy [J]. International [J]. Bone,2010,
47( 6) : 1076 - 1079.
Journal of Fatigue,2011,33: 1514 - 1525. [27] William E,Harvey E C. Marching cubes: A high resolu-
[15] Wang M Y,Williams J J,Jiang L,et al. Three dimen- tion 3d surface construction algorithm [J]. Computer
sional ( 3D) microstructural characterization and quantita- Graphics,1987,21( 4) : 163 - 169.
tive analysis of solidified microstructures in magnesium- [28] Sheets K G,Zhou Y,Ertel M K,et al. Neuroprotectin D1
based alloys [J]. Metallography,Microstructure,and A- attenuates laser-induced choroidal neovascularization in
nalysis,2012,1( 1) : 7 - 13. mouse [J]. Molecular Vision,2010,16: 320 - 329.
[16] Harimkar S P,Dahotre N B. Characterization of micro- [29] Walter T,Shattuck D W,Baldock R,et al. Visualization
structure in laser surface modified alumina ceramic [J]. of image data from cells to organisms [J]. Nature Meth-
Materials Characterization ,
2008,59( 6) : 700 - 707. ods,2010,7: 479 - 479.
[17] Parker J. Stack Alignment ( Align3 _ TP) [EB / OL]. [30] Schmid B,Schindelin J,Cardona A,et al. A high-level
( 2012 - 11 - 15 ) . http: / / www. med. harvard. edu / 3D visualization API for Java and ImageJ [J]. BMC
jpnm / ij / plugins / Align3TP. html. Bioinformatics,2010,11: 274.
[18] Thevenaz P,Ruttimann U E,Unser M. A pyramid ap- [31] Sabella P. A rendering algorithm for visualizing 3D scalar
proach to subpixel registration based on intensity [J]. fields [J]. Computer Graphics,1988,22: 51 - 58.
IEEE Transactions on Image Processing,1998,7 ( 1 ) : [32] Lewiner T,Lopes H,Vieira A W,et al. Efficient imple-
27 - 41. mentation of marching cubes' cases with topological guar-
[19] Russ J C. The image processing hand book boca raton antees [J]. Journal of Graphics Tools,2003,8: 1 - 15.
[M]. CRC Press Taylor and Francis Group,LLC,2011. [33] Schindelin J,Arganda-Carreras I,Frise E,et al. Fiji: an
[20] Soille P. Morphological image analysis: principles and open-source platform for biological-image analysis [J].
applications [M]. New York: Springer-Verlag,2004. Nature Methods,
2012,9: 676 - 682.
[21] Rowenhorst D J,Kuang J P,Thornton K,et al. Three-di-