Tutorial ImageJ
Tutorial ImageJ
Workshop: Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Montpellier RIO Imaging Volker Baecker 30.04.2010
!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Table of Contents
. Introd$ction.............................................................................................................................% &. Installing ImageJ and MRI Cell Image Analyzer...................................................................% &. Installing ImageJ..............................................................................................................% &.& Memory 'ettings..............................................................................................................% &.# (pgrading ImageJ............................................................................................................) &.% Installing loci*bioformats ................................................................................................) &.) Associating file types with ImageJ...................................................................................) &.+ Installing the Montpellier RI, Imaging pl$gins..............................................................+ #. A -$ick to$r............................................................................................................................+ #. .he tool*b$ttons.............................................................................................................../ #. . .he rectang$lar selection tool.................................................................................../ #. .& Meas$ring and the ImageJ Res$lts .able................................................................./ #. .# 'election br$sh and tool options...............................................................................0 #. .% 1olygon and freehand*selection tools.......................................................................0 #. .) 2ine 'elections ........................................................................................................0 #. .+ 1rofile plots..............................................................................................................." #. ./ Arrow tool3 annotations3 roi*manager and overlays................................................." #. .0 1oint 'elections...................................................................................................... 4 #. ." .he magic wand tool.............................................................................................. #. . 4 .he particle analyzer............................................................................................. & #. . Magnifying glass and scrolling............................................................................. # #. . & 5oregro$nd and 6ackgro$nd Color3 Clear3 5ill3 7raw and Revert....................... # #. . # Macros.................................................................................................................. % #. . % Macro Recorder and batch processing.................................................................. ) #. . ) 1l$gins.................................................................................................................. + #. . ) Image stacks......................................................................................................... / #. . + .he ImageJ #7 8iewer......................................................................................... 0 %. 9elp3 7oc$mentation and :;tensions................................................................................... " %. 9elp and 7oc$mentation................................................................................................ " %.& 1l$gins............................................................................................................................&4 %.# Macros............................................................................................................................&4 %.% .ools...............................................................................................................................& %.) (pdate Macros and .ools...............................................................................................&& ). 7isplay and image enhancements.........................................................................................&# ). <hat is a digital image...................................................................................................&# ).& 6rightness and Contrast ad=$stment...............................................................................&% ).# >on linear display*ad=$stments......................................................................................&+ ).#. ?amma correction.......................................................................................................&/ ).#.& :nhance Contrast.........................................................................................................&" ).#.&. >ormalization or contrast stretching...................................................................#4 ).#.&.& 9istogram :-$alization.......................................................................................# ).% Changing the palettes.....................................................................................................## ).) ,verlay of m$ltiple channels.........................................................................................#+ ).). Aligning channels...................................................................................................%4 ).).& ,verlay of vol$me images......................................................................................%4 [email protected] &!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer ).+ >oise s$ppression...........................................................................................................% ).+. Convol$tion filter...................................................................................................%& ).+. . Mean filter.......................................................................................................%& ).+. .& ?a$ssian bl$r filter..........................................................................................%) ).+. .# :dge enhancing filter......................................................................................%" ).+.& Rank 5ilter..............................................................................................................)4 ).+.# 5iltering in the fre-$ency domain..........................................................................) )./ 6ackgro$nd s$btraction ..............................................................................................)+ )./. Inhomogeneo$s backgro$nd...................................................................................)0 ).0 Increasing the apparent sharpness..................................................................................+ +. 'egmentation.........................................................................................................................+ +. Man$al threshold selection.............................................................................................+ +.& Meas$rements and the R,I*Manager.............................................................................+) +.# Comp$ted thresholds......................................................................................................+0 +.% 'egmentation of more then & ob=ect classes...................................................................+0 +.) <atershed segmentation.................................................................................................+" /. Image types and formats......................................................................................................./ /. 'patial resol$tion............................................................................................................/ /.& Image types...................................................................................................................../ /.&. Conversion from + to 0 bit..................................................................................../& /.&.& R?6 Images.........................................................................................................../& /.&.# 5ile 5ormats............................................................................................................/% 0. Image Analysis....................................................................................................................../% 0. Co$nting ob=ects............................................................................................................./% 0. . Co$nting ob=ects man$ally...................................................................................../% 0. .& Co$nting and meas$ring separated ob=ects a$tomatically....................................../) 0. .# Co$nting and meas$ring ob=ects to$ching each other a$tomatically...................../+ 0. .#. 'tatistical approach........................................................................................./+ 0. .#.& 2ocal .hreshold..............................................................................................// 0. .#.# <atershed.......................................................................................................// 0. .#.% ,ther methods................................................................................................./0 0.& Comparing intensities...................................................................................................../0 0.# Classifying ob=ects........................................................................................................./" ". Annotating images................................................................................................................04 ". 'cale bar3 time stamper and event stamper....................................................................04 ".& Calibration bar................................................................................................................0& 4. <orking with m$lti*dimensional data................................................................................0# 4. .ime series...................................................................................................................0% 4. . Meas$ring velocities..................................................................................................0% . 6iological applications........................................................................................................0) . Colocalization analysis.................................................................................................0) . . 8is$alizing colocalization $sing overlays............................................................0) . .& @$antification of colocalization..........................................................................."4 . .&. Intensity correlation coefficient based methods..........................................."4 . .&. . 1earsonAs coefficient and scatter plot........................................................."4
#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
! Introd"ction
In this workshop yo$ will learn how to apply image analysis and processing techni-$es3 $sing the p$blic domain software ImageJ and some additions Bpl$ginsC made by Montpellier RI, Imaging and others. ImageJ has been written and is maintained by <ayne Rasband at the >ational Instit$te of Mental 9ealth3 6ethesda3 Maryland3 ('A. ImageJ is the s$ccessor of the Macintosh software >I9 Image written by <ayne Rasband. ImageJ is written in Java3 which means that it can be r$n on any system for which a =ava r$ntime environment B=reC e;ists. It can be r$n $nder <indows3 Mac3 2in$; and other systems. It can be r$n as a browser pl$gin3 on a website or as a standalone application. 6eca$se of the easy way in which ImageJ can be e;tended3 $sing macros and pl$gins3 a lot of f$nctionality is available today3 especially in the fields of microscopy and biology.
Illustration 1: The memory and threads settings of ImageJ .he ma;im$m memory sho$ld be set to G of the available memory on yo$r machine. .o find o$t how m$ch memory yo$r machine has3 open the properties of My Computer and look for the amo$nt of available RAM. A dialog tells yo$ that the change will be applied the ne;t time yo$ start ImageJ. .he config$ration is stored in the file ImageJ.cfg in the ImageJ folder. 'ho$ld ImageJ not start after yo$ changed the memory settings3 delete the file ImageJ.cfg3 restart ImageJ and set the [email protected] %!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer ma;im$m memory to a lower val$e. A do$ble*click on the lower part of the ImageJ la$ncher window displays the amo$nt of $sed and available memory. Fo$ can $se lugins>!tilities>Monitor Memory...to monitor the memory $sage.
Illustration ": # dou$le clic% on the &indo& displays memory information. .he n$mber of parallel threads for stac%s is by defa$lt set to the n$mber of processors or cores available in yo$r system.
it! ImageJ
.o open images by do$ble*clicking we have to associate the file type with the ImageJ program. 7ownload the zip*archive of e;ample images from the mri website httpD!!www.mri.cnrs.fr!inde;.phpKmL++ and $nzip the archive. Right*click on a tif*image3 select Hopen withI and Hchoose the programI from the conte;t men$. ,n the dialog click the browse b$tton and select ImageJ.e)e from the ImageJ home directory. Check the Hal&ays use this program to open files of this typeI option and click o% on the dialog. In the same way associate =pg*images with ImageJ.
)!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
'ave the changed 'tart$pMacros.t;t file. Any men$ command that can be fo$nd in the ImageJ la$ncher window can be $sed as an arg$ment to the r$n command and any static =ava method can be called $sing the call command.
$! A %"ick to"r
6efore e;plaining the image analysis tools in ImageJ in more detail3 we will make a -$ick to$r to get an overview of the most important tools. 7ownload and $nzip the images from httpD!!www.mri.cnrs.fr!mriwiki!$ploads!images.zip ,pen the image #0 dapi 1.tif. Fo$ can drag an image from yo$r operating system browser to the ImageJ window to open it.<e will $se this image as an e;ample in the whole chapter #.
figure 1: The e)ample image for chapter 1. Move the mo$se*pointer over image and watch the lower part of the ImageJ window. .he position of the mo$se*pointer and the intensity at that position are displayed in the lower part of the window.
+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
figure 4: The options of the selection $rush tool. .ools can have options. Fo$ can access them by do$ble*clicking on the tool b$tton. Change the size of the br$sh $sed by the selection br$sh tool.
$! !* +ine &elections
.he line selection toolsD straight line5 segmented line and freehand line can be $sed to meas$re length and angles with the horizontal ;*a;is. (se a right click to finish a segmented [email protected] 0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer line. .he angle tool can be $sed to meas$re arbitrary angles. 9owever the line tools have the line width as a parameter. If the line width is bigger than one the selection is an area and all area meas$rements can be applied.
$! !, (rofile plots
Fo$ can $se the line selection tools to create profile plots. 5irst make a line selection across a n$cle$s3 then press the key % Bthe shortc$t for #naly/e,> lot profileC. >ote that when the line width is bigger than one the profile will be averaged over the width. If yo$ want averaged line profiles of horizontal or vertical lines3 yo$ can $se the rectang$lar selection tool instead. If yo$ want to $se vertical lines yo$ have to press alt,% instead of % in this case.
figure 6: # profile plot along a line crossing a nucleus. A profile plot can be $sed to meas$re properties like for e;ample the diameter of an ob=ect by taking into acco$nt only intensity val$es above a baseline3 that is visible in the plot. >ote that the plot is an image itself and that yo$ can make selections on it and meas$re them.
"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
figure 8: # non,destructi+e o+erlay of arro&s and annotations. If yo$ want to be able to modify ob=ects in the overlay3 yo$ have to add them to the roi* manager. Roi stands for region of interest and the roi*manager is the tool that allows to manage m$ltiple selections. (se Image,>O+erlay,>To *OI Manager to add the ob=ects in the overlay to the roi*manager. >ote that yo$ find the roi*manager $nder #naly/e,>Tools.Make s$re that 'ho& #ll and Edit Mode are selected. Fo$ can now select a selection ob=ect by clicking on its n$mber in the image or by selecting it in the list in the roi*manager. Fo$ can modify the selected selection ob=ect and make the change permanent by pressing update on the roi*manager. .o create an rgb*snapshot of yo$r image with overlay $se the flatten command from the roi*manager. >ote that overlay and roi*manager can be $sed with all kinds of selection3 not only arrows and te;t. 7elete all overlays and all seletions in the roi*manager. Make some area selections on the image and add each to the roi*manager. Make s$re that no roi is selected and press the meas$re b$tton. :ach selection will be meas$red independently.
$! !0 (oint &elections
Fo$ can $se the point selection tools to man$ally co$nt ob=ects in an image. <ith the point selection tool $se shift to add points. Fo$ can delete points $sing alt. >ote that the n$mbers of the remaining points change accordingly. If make an error and yo$ loose yo$r selection yo$ can get the last selection back $sing shift7e Bthe shortc$t for edit,>selection,>restore selectionC.Fo$ can add the selection to the roi*manager or meas$re it. .he options allow to directly adding each point to the manager or to meas$re it while yo$ are working. If yo$ $se the m$lti*point selection tool3 yo$ do not have to $se shift to add points3 so yo$ are less likely to accidentally delete the selection. As before yo$ can $se flatten on the roi*manager to create an image that permanently contains the point markers. (sing the more b$tton on the roi* manager yo$ can save and load selections3 in case yo$ need a break in the middle of co$nting.
4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 11: # lo&er threshold is set and the nuclei ha+e $een selected using the &and tool.
&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
$! !
.he magnifying glass tool allows to change the zoom of the image. A left click zooms in and a right click zooms o$t. <hen the image is bigger than the window the position of the c$rrent view is indicated in the $pper left corner. .he scrolling tool allows to move the image in the window by clicking and dragging. .he keyboard shortc$ts for zooming are M and N and the scrolling can be done by holding down space. 'crolling with the space key down allows to scroll while another tool is active.
figure 1": The position of the current +ie& in the image is indicated.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer picker the backgro$nd and foregro$nd colors can be swapped and the colors can be selected from a palette. >ote however that only gray*scale val$es will be $sed as long as the image is not a color image. Fo$ can $se Image>Type>*;< Color to convert the image into a color image. .he foregro$nd color will be $sed by the commands fill and dra& from the men$ edit and the backgro$nd color will be $sed by the commands clear and clear outside. After yo$ have changed yo$r image yo$ can reload the original version from disk by pressing the r key Bshortc$t for =ile,>*e+ertC.
$! ! $ Macros
Macros are small programs written either in the ImageJ macro lang$age or in a scripting lang$age3 that can be r$n by ImageJ to a$tomate image analysis tasks. Click on the de+ men$ and select macros. .his will open a list of macros on the ImageJ website. 'earch the macro with the name -isplayTiffInfo.t)t. 7rag the link from the web*page and drop it onto the ImageJ la$ncher window. .his will open the macro in the ImageJ macro editor. Fo$ can r$n it $sing the command *un Macro from the men$ Macros of the macro editor. .his macro will display some information stored in the header of the image.
figure 11: The macro displays information from the header of the image file. <e will try another macro. .he macro R,IJColorJCoder.i=m can mark ob=ects with a color according to the val$e of a given property3 for e;ample area or ro$ndness. ,pen the macro by dropping it on the ImageJ la$ncher window. .o $se the macro we need the selections of the ob=ects in the roi*manager and the corresponding meas$rements in the res$lts table. 'et the threshold and $se the 1article Analyzer and the meas$re command from the roi*manager to achieve this3 then r$n the macro.
%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
figure 10: The roundness of the o$(ects is mar%ed &ith a color, code.
Illustration 12: The color code for the roundness in the left image.
,pen the first image from the folder 11,$atch and r$n the macro. 1ress shift,o Bthe shortc$t for 5ile*O,pen >e;tC to open the ne;t image in the folder and r$n the macro again. Repeat this $ntil all images are analyzed. ,f co$rse we can still do better. <e do not have to load each image man$ally. Copy the te;t of the macro3 then open 1rocess,><atch,>Macro and paste it into the te;t part of the dialog. [email protected] )!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer 'elect the inp$t folder. Create a new folder and select it as res$lt folder3 then press the process b$tton. As a res$lt yo$ will get the meas$rements in the results ta$le and the labeled images in the res$lts folder.
$! ! * (l"gins
1l$gins are =ava mod$les that can be $sed to add f$nctionality to ImageJ. A large n$mber of pl$gins concerning microscopy is available. 'elect 1lugins from the -e+ men$ b$tton. .his will open the pl$gins page on the ImageJ website in yo$r browser. 2ook for the 'I,E B'imple Interactive ,b=ect :;tractionC pl$gin and click on the link. .his pl$gin will allow to segment color images by giving e;amples of backgro$nd and foregro$nd areas. .o install the pl$gin drag the sio;J.=ar link from the webpage and drop it onto the ImageJ la$ncher window. A file*save dialog will pop*$p. (se it to create a s$bfolder .egmentation of the folder plugins and save the pl$gin into this s$bfolder. It will now be available in the lugins men$ in ImageJ. ,pen one of the images from the 90 > plant ?ro$oter@ folder. R$n the sio;*pl$gin from the plugins men$. (se a selection tool and select m$ltiple foregro$nd zones holding down the shift key. .hen switch to backgro$nd and select m$ltiple backgro$nd zones. 1ress the segment b$tton. If yo$ want yo$ can create a mask for f$rther processing.
+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
$! ! * Image stacks
'tacks can either represent vol$me data or time series. ,pen the e;ample stack T1 'ead from the .t% men$ b$tton. >ote the slider below the image. Fo$ can $se it to select the visible slice of the stack.
/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
figure 16: # stac% of images in ImageJ .he play and pa$se b$tton ne;t to the slider allow to start and stop the animation of the stack. A right click on the same b$tton opens the options*dialog for the animation. .ry the commands / pro(ect3 1d,pro(ect and ma%e montage. Com$ine allows to combine to stacks one ne;t to the other or one above the other3 while concatenate allows to add the slices of one stack at the end of another.
0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 18: # 1d scene. art of the data has $een cut, off &ith the fill command.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Q 'pringer &440 I'6>D "/0* *0%+&0*#/"*+ .he McMaster 6iophotonics 5acility offers an ImageJ man$al and a collection of pl$gins $nderD httpD!!www.macbiophotonics.ca!image=! Fo$ can find more detailed e;planation of some image processing techni-$es in the hyperlink image processing resso$rce BhiprC atD httpD!!homepages.inf.ed.ac.$k!rbf!9I1R&!inde;.htm
4.2 )l%gins
>ew f$nctions can be added to ImageJ by installing pl$gins. 1l$gins either add commands to some men$s or they can be r$n from the lugins men$ and its s$b*men$s once they have been installed. Fo$ can access the ImageJ pl$gin*site from the men$ 'elp> lugins.... If the pl$gin is available as a .=ar or a .class file3 yo$ can install it by dragging the link directly from yo$r web*browser onto the ImageJ la$ncher window. .his will ca$se ImageJ to download the pl$gin. It then opens a dialog that lets yo$ copy the pl$gin into the pl$gins folder or into one of its s$b*folders. As an e;ample we will install a pl$gin that draws random ovals into a new image. (se the help men$ to go to the pl$gin site. 'croll down to the category ;raphics and click on the link *andom O+als. 7rag the link *andomCO+als.class onto the ImageJ la$ncher window. 'elect the folder ;raphics in the .a+e lugin... dialog or create it if it doesnAt e;ist. Fo$ can now directly r$n the newly installed pl$gin from the lugins men$3 $sing lugins>;raphics>*andom O+als.
Illustration "9: The result of running the D *andom O+als E plugin. 'ho$ld the pl$gin come as a zip file3 $nzip it into a temporary folder. If the content consists of .(ar or .class files3 yo$ can drag them to the ImageJ la$ncher window in the same way to install them. ,therwise follow the instr$ctions on the web*site from which yo$ downloaded the pl$gin.
4.3 Macros
Macros are scripts in the ImageJ*macro lang$age. A n$mber of macros is available in the folder macros in the ImageJ base*folder. Fo$ open them by dragging them onto the ImageJ la$ncher window or by $sing 1lugins>Macros>Edit.... [email protected] &4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Fo$ can access the ImageJ macro site from the men$ 'elp>Macros. Fo$ can directly drag a link to a macro from the web*browser onto the ImageJ la$ncher window. .his will open the macro in the ImageJ macro editor3 from which yo$ can r$n the macro $sing the men$ Macros>*un Macro Bor ctrl7rC. .ry to r$n the macro Mandel$rot.t)t this way.
'!' Tools
.ools are macros that add a tool b$tton to ImageJAs toolbar. >ote that the name of the tool is displayed in the stat$s line3 when yo$ move the mo$se over a tool*b$tton. .here is a difference between action*tools and tools. Action*tools e;ec$te a single command. .hey do not change the active tool. <hen yo$ press the b$tton of a tool3 that is not an action tool3 yo$ change the active tool. .he active tool will $s$ally do something when yo$ click in an image. An e;ample of a tool is the *ectangular .election tool. An e;ample of an action tool is the a$ort macro or sample tool. .here can be m$ltiple tools hidden behind one tool*b$tton. If this is the case a small red arrow is displayed on the b$tton. A right*click on the b$tton shows the list of tools and allows to change the tool. 2ook for e;ample at the second b$tton from the left. .his is the elliptical selection tool. A right*click on the b$tton gives access to the selection $rush tool.
Illustration "": # right clic% allo&s to select $et&een different tools. A tool or a gro$p of tools Bthose that share the same b$ttonC can have options. .he options can be accessed by a do$ble*click on the tool*b$tton.
& !"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "1: The options of the selection $rush tool. 5rom the men$ 'elp select Macros. ,n the web*page scroll down to the tools folder and enter the folder. 'earch for *;< rofilesTool.t)t and drag the link onto the ImageJ toolbar. All tools right of the color pic%er will disappear and there will be a new tool b$tton for the rg$ profiles tool.
Illustration "0: #n rg$ e)ample Illustration "2: The rg$ profile along image. the line in the image.
>ew macros and tools will be downloaded into the ImageJ:macros and ImageJ:macros:tools folders. :;isting macros and tools will be $pdated if a newer version is available on the website. [email protected] &&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "3: The first e)ample image. (se the magnifying glass tool from the tool*bo; and click m$ltiple times on the image to get the ma;im$m zoom. Fo$ can now see the individ$al pi;els. If the zoomed image appears bl$rred3 deselect Interpolate Foomed Images in the men$ Edit>Options>#ppearance.
&#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer .he coordinates and the intensity val$e of the pi;el $nder the mo$se pointer are displayed at the bottom of the ImageJ window. Fo$ can $se the right mo$se b$tton to zoom o$t again. .o scroll the image hold down space*bar3 press the left mo$se b$tton and move the mo$se. Remark that the origin of the coordinate system is in the $pper left corner of the image with increasing coordinates from left to right and top to bottom. 'ave the image as a te;t image to the desktop and open it with a te;t editor or drop it on the ImageJ window. Fo$ see the image as a matri; of intensity val$es.
&%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "8: The intensities are to lo& to distinguish details in the Illustration 19: image. The $rightness and contrast ad(uster.
Illustration 1": #fter the ad(ustment intensities $elo& 1 &ill $e displayed as $lac% and intensities a$o+e "3 as the "22.
1ress the #uto b$tton to make an a$tomatic ad=$stment. <ith *eset yo$ can go back to the original display. (se the fo$r sliders to ad=$st brightness and contrast man$ally. Remark that only the displayed intensities are changed3 the pi;el val$es remain $nchanged. 1ress the meas$re b$tton on the toolbo; or select the image and press Ctrl7m3 then change the brightness!contrast and meas$re again. Compare the val$es mean and Int-en3 which give the average and total intensity in the image. If yo$ canSt find mean or Int-en in the res$lts table3 open the dialog #naly/e>.et Measurements... and check Mean ;ray Balue and Integrated -ensity.
Illustration 11: The ImageJ results ta$le. 9ow does the ad=$stment workK <hen the image is displayed two points are stored together with the image. .he point Bmin3 4C and the point Bma)3 ma)IntensityC. All intensity val$es below min are displayed with the intensity zero3 all intensity val$es above ma) will be displayed with the intensity val$e ma)Intensity. 8al$es between min and ma) are mapped by the line e-$ation that is defined by the two points Bmin34C and Bma)3 ma)IntensityC. [email protected] &)!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer In the beginning when we opened the e;ample image3 min was 4 and ma) was &)) and the ma)Intensity is &)). 'ince this defines a line with the gradient 3 each intensity val$e is mapped to itself. After we applied the a$to ad=$stment3 min becomes & and ma) &/3 so pi;els that have the intensity &/ are displayed with the val$e &))3 pi;els that have the intensity &4 with the val$e 0%3 and so on. >ow look at the image in the $pper part of the 6TC window. <hat yo$ see there is the histogram of the image. ,n the ;*a;is are the intensity val$es from 4 to &)). ,n the y*a;is yo$ find the co$nt of pi;els in the image that have the intensity ;. <eSll come back to the histogram later when we talk abo$t thresholding. 5or the brightness and contrast ad=$stment it shows yo$ how many pi;els yo$ set to the ma; intensity and to zero. ,n the left yo$ find the min display val$e and on the right the ma) display val$e. .he line that is drawn in the histogram shows the mapping of the val$es between min and ma). If yo$ move the brightness slider to the right the whole line will move to the left and lower intensity val$es will be mapped to higher display val$es3 making the display brighter. If yo$ move the contrast slider to the right the gradient of the line increases so the intensity val$es closer together will be mapped to display val$es with a bigger distance. Fo$ can $se the set b$tton to enter the min and ma; val$e directly. If yo$ press apply3 the pi;el intensity val$es in the image will be changed to the val$es displayed. .he a$to ad=$stment will look at the histogram of the image and ad=$st the min and ma; val$es in a way that a small percentage of the pi;els become zero and ma)Intensity. 'ometimes this doesnSt yield the desired res$lts3 especially when the ob=ect is very small compared to the backgro$nd. In this case yo$ can make a selection on the image and the a$to ad=$ster will $se the histogram of the selection to comp$te the min and ma) val$es that are then applied to the whole image. (se the rectang$lar selection tool from the toolbo; to make a selection on the image and press the a$to b$tton. .ry this for different regions in the image.
Another way to ad=$st the display is the Gindo&&He+el ad(uster. In this case yo$ choose a middle val$e Bthe levelC and a range aro$nd the middle val$e Bthe windowC. If yo$ choose for e;ample le+el ) and &indo& &% yo$ get a min val$e of # and a ma) of &/.
&+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 10: The lo& intensities are in+isi$le in the original image.
Illustration 12: # linear display ad(ustment ma%es lo& intensities +isi$le $ut saturates high intensities.
,pen the image cells.tif or cells&.tif. (se rocess>Math>;amma to ad=$st the image intensities $sing a gamma*f$nction. Fo$ can select the re+ie& checkbo; and try different val$es. <hen yo$ click o% the gamma f$nction is applied to the image3 i.e. the pi;el val$es are modified accordingly.
Illustration 16: The dialog for applying a gamma,correction. .he e;act f$nction $sed by this command isD
Illustration 18: The gamma, correction has $een applied to the image.
&/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer f i =e
log i &))
&))
.his command in the men$ Math is there to modify the pi;el val$es of the image not to make a display ad=$stment. .o ad=$st the display witho$t affecting the pi;el val$es the macro H?ammaCorrection.oolI can be $sed. ImageJ provides a convenient way to r$n macros and pl$gins from a toolset. <e will install the tool on a new toolset3 so that it can be r$n by pressing a tool b$tton. 2ook at the rightmost b$tton on the ImageJ la$ncher window. Clicking on it allows to change the c$rrent tool*set.
Illustration 09: The $utton >> on the ImageJ launcher displays the list of a+aila$le toolsets 5irst we need to get the macro from the ImageJ website. (se 'elp>-e+. *esources... to open the developer reso$rces page on the ImageJ website. Click on Macro Tools. 'croll down to ;ammaCorrectionTool.t)t and click on the link. Fo$ sho$ld now see the macro code in yo$r web*browser B7onAt worry yo$ donAt need to $nderstand the code3 at least not right nowC. 'elect the macro te;t BctrlMaC and copy it into the system clipboard BctrlMcC. >ow go back to ImageJ. 5rom the toolset list Bclick on the rightmost b$tton to get itC select Toolset Creator.
Illustration 01: Creating a ne& toolset. :nter -isplay #d(ustments as the name of the new toolset and enter as the n$mber of tools. .he Toolset Creator is normally there to create toolsets from the pl$gins in the pl$gins men$. <e will =$st $se it to create a new toolset and we will overwrite the created content. >ormally yo$ wo$ld now enter information for each tool on the toolset. Fo$ can ignore this and press ok. Close the log window. <e will now open the code of the newly created toolset. 9old [email protected] &0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer down the shift*key3 display the toolset*list and select -isplay #d(ustments. .he code of the toolset is now displayed in a te;t window. Replace the content with the content of the macro. .o do so click in the te;t window3 press ctrlMa to select all and ctrlMv to paste the code of the macro that we copied into the clipboard before. 'ave the changed file $sing the =ile men$ from the te;t window Bor ctrlMsC. .o $pdate the display3 reselect the -isplay #d(ustments toolset again. Fo$ sho$ld see a b$tton with the ?reek letter gamma. ,pen the image cells.tif or cells&.tif again or $se =ile>*e+ert to reload it. >ow select the gamma*correction tool by pressing the b$tton with the letter gamma and click in the image. .he gamma f$nction is displayed on the image and yo$ can change the val$e of gamma by moving the mo$se. <hen yo$ have fo$nd a good val$e $se ctrlMshiftMa to get rid of the f$nction display in the image. 6e caref$l to not click into the image again3 before yo$ selected another tool. In contrast to the command above this macro only changes the display3 not the pi;el val$es.
Illustration 0": The gamma function is displayed on the image. Fo$ might have noticed that $sing the same gamma val$e with the 1rocessingOMathO?amma command and with the ;ammaCorrectionTool macro yields different res$lts. .his is beca$se the later $ses a different gamma f$nctionD i f i = &)) &))
&"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
#4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 03: The image after histogram normali/ation. (sing the enhance contrast tool with the normalize option has the same effect as $sing it witho$t the normalize option and then pressing apply on the brightness and contrast ad=$ster.
# !"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 04: The input image. Illustration 06: The histogram of the input image.
Illustration 08: The image after histogram eLuali/ation in the Illustration 29: The histogram sLuare root +ersion. of the image after histogram eLuali/ation in the sLuare root +ersion.
Illustration 21: The image after histogram eLuali/ation in the Illustration 2": The histogram standard +ersion ?alt %ey do&n@. of the image after histogram eLuali/ation in the standard +ersion ?alt %ey do&n@. 9istogram e-$alization a$gments the local contrast and is most $sef$l when ob=ects and backgro$nd contain high and low intensities3 as for e;ample in brightfield microscopy. Compare the res$lts of a linear ad=$stment a gamma ad=$stment and the histogram e-$alization on the image cells".tif. .ry the histogram e-$alization on the image roots.tif. [email protected] #&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 21: # graphical representation of the loo%up, ta$le. ?o to the men$ image>color>sho& lut. Above the color table yo$ see how each color of the l$t is mi;ed from the red3 green and bl$e components.
Illustration 20: The red5 green and $lue components for each inde) of the loo%up, ta$le. If yo$ click on the list b$tton3 yo$ get the look$p*table in n$merical form. <hat are the R?6* components of the intensity 44K
##!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 22: art of the loo%up,ta$le. ,pen the image cells and click on *ain$o& *;< l$t again. <hen images are opened the look$p*table will be applied to the active image. .ry different look$p tables.
.he look$p table 'iHo is $sef$l to ad=$st the display of o$r image. 4 will be displayed in bl$e3 &)) in red and val$es in between will be displayed in gray. Can yo$ describe how this look$p table looks likeK
Illustration 28: The hilo loo%up, ta$le. Apply it to the image and ad=$st the brightness and contrast in a way that most of the backgro$nd is zero and only a small portion of pi;els becomes sat$rated.
#%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 39: !se the hilo lut to ad(ust $rightness and contrast.
Illustration 31: The $rightness and contrast ad(ustment has $een applied and the lut has $een changed $ac% to grays.
?o to image>color>edit>lut or press the Edit H!T b$tton from the 2ook$p .ables tool set. Change the look$p table in a way that 4 will be displayed in green3 &)) in yellow and val$es between 44 and &4 in different shades of red3 becoming lighter with higher intensity. 'ave the look$p table $nder a new name3 apply it to the image and ad=$st the <&C again.
,pen the M*IHoo%upTa$leTool $nder lugins>Montpellier *IO Imaging. .he tool allows yo$ to see the look$p tables and to apply them either to the active image or to all open images. Remark that the e;ternal look$p tables listed in the tool m$st be in the folder Clut.
#)!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 30: The M*I loo%,up ta$le tool. Another convenient way to access all look$p tables is to tear off the Image>Hoo%up Ta$les men$ by $sing lugins>!tilities>Control anel.
Illustration 32: Menus can $e %ept on the screen using the Control anel.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer hyperstacks. 9yperstacks allow to work with m$ltidimensional images. .he different dimensions are the ;3y and z a;is3 the time and the channel Brepresenting the color or wavelengthC. ,pen the images dapi 1.tif and rhod 1.tif from the folder 11 > o+erlay.
Illustration 36: -ialog to create hyperstac%s5 i.e. multidimensional images. 'elect Create Composite and press o%. Fo$ now see an overlay of the two channels. ,pen the Channels dialog from the men$ Image>'yper.tac%s and the 6rightness and Contrast Ad=$ster by pressing shift7c on the image. <ith the slider on the bottom of the stack window yo$ select the channel to manip$late. If yo$ move it to the right the histogram in the 6rightness and Contrast tool becomes green indicating that the green channel is selected. If yo$ move the slider back to the left the histogram becomes red again. Fo$ can change the colors by applying look$p tables from the H!T menu. Ad=$st the display of the two channels [email protected] #/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer $sing the <&C tool. Remark that the display ad=$stment of one channel remains when yo$ change to the other channel. Fo$ donAt need to press the apply b$tton. Fo$ can save a hyperstack and reload it witho$t loosing the display ad=$stment. 'ave it in tif format $sing =ile>.a+e or =ile>.a+e #s. Close the hyperstack window and reload the saved file $sing =ile>Open. If yo$ want to create a snapshot of the overlay click on the More b$tton in the Channels window BImage>'yperstac%s>Channels Tool...C and select Con+ert to *;<.
#0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 49: The channel dialog allo&s to sho& and hide selected channels.
Illustration 41: Illustration 4": The <&C tool Changing the &or%s on the selected channel selected channel automatically and displays the changes the histogram in the channel on &hich color of the the <&C tool selected channel. &or%s. Create a second hyperstack from the images dapi 2 and rhod 2. Imagine that yo$ want to compare the intensities in the two images. .o be able to do this yo$ need to set the same display ad=$stments for both images. 'elect the red channel in both images. Ad=$st the display for the first image Bfor e;ample by pressing reset followed by a$toC3 then press the b$tton set. 'elect ropagate to all open images and press o%. .he display of the red channel in the [email protected] #"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer second image has been ad=$sted in the same way as the one in the first image now. 'elect the green channel in both images and repeat the proced$re.
Illustration 41: The display settings can $e propagated to all open images ?same channel@.
Illustration 40: The display settings ha+e Illustration 42: The display settings ha+e $een optimi/ed for the first image. $een transferred to the second image. Create an overlay from the three images $"*= Cgem-eltaC"C$lue.tif3 $"*= Cgem-eltaC"Cgreen.tif and $"*= Cgem-eltaC"Cred.tif and ad=$st the display.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Fo$ now have a window with two sliders3 one to select the channel and one to select the slice in the stack.
Illustration 43: # hyperstac% of a +olume image &ith three channels. .wo create a composite with more than fo$r channels yo$ can $se the command Image>'yperstac%s>.tac% to 'yperstac%.
Illustration 44: Gith the .tac% to 'yperstac% command hyperstac%s &ith more than 0 channels can $e created.
% !"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 48: i)el +alues in $ac%ground and o$(ect are changed in a random manner. Illustration 46: #n image &ith a high le+el of noise. .here are different possible so$rces of noise in an image. ,ne kind of noise stems for e;ample from the digital camera. In the camera incoming photons are transformed into an electrical charge by a charge co$pled device or CC7. 9owever some electrons are created within the CC7 randomly. Another so$rce of noise is the random emission of photons from yo$r specimen3 which is a -$ant$m physical phenomenon. .he noise can pose a problem for the analysis of the image3 for e;ample in the separation of the ob=ects from the backgro$nd. If we have a light ob=ect on a dark backgro$nd we co$ld for e;ample look for the lowest intensity val$e in the ob=ect and separate the ob=ect from the backgro$nd by searching all pi;els that have an intensity val$e higher than this threshold val$e. 9owever the noise has changed the intensities in the backgro$nd and in the ob=ect3 so that there are very high intensities within the backgro$nd and very low intensities in the ob=ect. <e might have to pre*process o$r image to red$ce the dist$rbing effect of noise.
%&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
,pen the image rectangle. Fo$ see a filled rectangle with intensity val$es &)) on a black backgro$nd. <hat will be the intensity val$es of the edge and corner pi;els after applying a mean filter with radi$s K
Illustration 61: The &hite rectangle after applying a mean filter of radius 1.
Compare the histograms of the original plant image and the plant image after a mean filter has been applied. (se a large radi$s3 for e;ample ). 1ress h on the image or $se AnalyzeO9istogram to display the histograms of the images. (se the brightness and contrast ad=$ster to make the backgro$nd as dark as possible and the plant as light as possible.
%#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 60: .eparation of o$(ect and $ac%ground is impossi$le in the noisy image.
Illustration 62: The separation $ecomes possi$le after application of a mean filter.
Illustration 64: The histogram after a mean filter of radius 12 has $een applied.
A mean filter can be applied in the following wayD 5or radi$s r create a matri; of size > L &rM ; &rM filled with val$es !>. .he matri; is called the kernel of the filter. Move the center of the kernel across the image. 5or each positionD o M$ltiply each matri; element with the corresponding intensity val$e and calc$late the s$m of the res$lts. o In the res$lt image replace the intensity of the c$rrent pi;el with the calc$lated res$lt. A generalization of this techni-$e is called convol$tion. A convol$tion is an operation that calc$lates the overlap of two f$nctions. In the general case the kernel and the image can have infinite size. Instead of simply calc$lating the average3 we can calc$late a weighted average by $sing different val$es in the matri;. Convol$tion filters can not only be $sed for smoothing b$t also for other p$rposes3 for e;ample to enhance edges. .o apply a convol$tion filter go to 1rocessO5iltersOConvolve and enter the matri; in the dialog. .o create a mean filter of radi$s p$t in a #;# matri;3 in which all elements are . [email protected] %%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer >ormally we wo$ld have to $se !"3 b$t we can select the Hnormalize kernelI option and the comp$ter will do this for $s.
Illustration 66: #pplying a mean filter $y doing a con+olution. Apply the convol$tion filter. Compare the res$lt with the res$lt from the mean filter. .o test whether the res$lts are absol$tely identical yo$ can s$btract one res$lt image from the other. If the images were identical the res$lt image m$st be all black. (se 1rocessOImageCalc$lator to s$btract one image from the other. Apply the hilo l$t to the res$lt to see if intensities other than 4 are present.
Illustration 68: .u$tracting one image from another image. .he smoothing red$ces the deranging effect of noise b$t in the same time bl$rs the ob=ect3 so that less details are visible.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer A normal distrib$tion is $sed to describe random processes. .hrow a coin 44 times and co$nt the times the head is $p. Repeat this 444 times and draw a histogram of the o$tcomes. Most of the time yo$Sll get val$es aro$nd )43 res$lting in high bars aro$nd )4 in the histogram. .he case that in 44 throws only head t$rns $p will not occ$r very often. .he same will be the case for 44 heads in 44 throws. If yo$ connect the top points of the bars yo$ get a c$rve that looks like a normal distrib$tion and if instead of throwing the coin 444 times yo$ throw it an infinite n$mber of times yo$Sll get a normal distrib$tion. A two dimensional normal distrib$tion has the form of a bell.
Illustration 89: # gaussian function. In older versions of ImageJ the ?a$ssian 6l$r filter had the radi$s as a parameter. In newer versions Bfrom .#0-C the parameter is sigma3 the standard deviation of the distrib$tion. .o get the same res$lts the val$es in the old version have to be m$ltiplied by &.). ,pen the file ;aussian.t)t. 9ere yo$ see the val$es of a normal distrib$tion. 9ow does it look like as an imageK ,pen the file as an image by $sing =ile>Import>Te)t Image. Apply the ice l$t. >ow go to #naly/e>.urface lot or $se the Interacti+e 1- surface plot pl$gin B1l$ginsO#7C to get an impression of the #7 form. 6eca$se of the discrete nat$re3 what yo$ see looks less smooth then the real form. 6esides the real c$rve never drops down to zero3 b$t val$es will be very low o$tside the central area so that we can $se a tr$ncated ?a$ssian as an appro;imation.
Illustration 81: The %ernel as surface plot. Illustration 8": The %ernel as image.
%+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 80: The %ernel as a surface plot created &ith the Dinteracti+e 1surface plotE plugin. Apply the ?a$ssian bl$r filter with sigma .& from rocess>=ilters>;aussian $lur to the rectangle image and compare the res$lt with the res$lt of the mean filter with radi$s #.
Illustration 82: Mean filter &ith radius 1 applied to the rectangle image.
Illustration 83: ;aussian $lur filter &ith sigma 1." applied to the rectangle image.
Altho$gh both images are bl$rred3 the res$lt from the ?a$ssian filter looks more like the original form. .he ?a$ssian filter while removing noise as well3 keeps edges better. Apply a ?a$ssian bl$r filter with a sigma of + and a Mean filter of radi$s ) to the image roots and compare the res$lts.
%/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 86: # mean filter of radius 12 has $een applied to the image.
Illustration 88: # gaussian $lur filter of radius 3 has $een applied to the image.
,pen the plant*noise image. ,pen the convol$tion tool and load the ?a$ssian.t;t into it. R$n the convol$tion filter on the image.
Illustration 199: The plant image after the con+olution &ith the gaussian %ernel has $een applied.
%0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 19": *;<, merge of the original image and the result after application of the filter.
Illustration 191: -etail of the rg$,merge of the roots image and the result from the con+olution that detects hori/ontal lines. 9ow will a filter that enhances vertical or %) degree edges look likeK [email protected] %"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 192: .alt,and, pepper noise consisits of the addition of &hite and $lac% pi)els to the image.
Apply a median filter of radi$s # from 1rocessO5iltersOMedian to the image. Compare the res$lt with the res$lt from the mean filter. .he median filter is more effective in removing salt*and*pepper noise.
)4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Fo$ can r$n a median filter with radi$s $sing rocess>Moise>-espec%le. In rocess>Moise>*emo+e Outliers3 yo$ find a selective median filter3 that replaces a pi;el by the median in the neighborhood if the val$e of the pi;el differs more than a threshold val$e from the median. (se it to remove the dark and light components of the salt and pepper noise separately.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer If we filter o$t the high fre-$encies3 we apply a low pass filter. .his has a smoothing effect on the image3 since the fine details have a high fre-$ency. Another reason why the 5o$rier .ransform is important is beca$se we can calc$late a convol$tion more efficiently in the 5o$rier 7omain. .he Convol$tion .heorem states that a convol$tion in the spatial domain is e-$ivalent to a m$ltiplication in the fre-$ency domain. ,pen the image ierre.tif. Apply the 5o$rier transform from rocess>==T>==T.
Fo$ can $se the l$t tool to make visible different cl$sters of fre-$encies. 7o yo$ see the two cl$sters in the $pper left and lower right -$adrant. 7raw a selection aro$nd the first. .hen add a selection aro$nd the second by pressing shift when yo$ start the selection. Fo$ can release the shift key once yo$ started the second selection. >ow r$n the fill command from Edit>=ill or press CT*H7f.1 <e have set the intensities in the selection to zero and in this way s$ppressed the corresponding fre-$encies. Apply the inverse 5o$rier transform from rocess>==T>In+erse ==T. At first look the image doesnSt seem to have changed. Uoom in on the image and on the res$lt image behind the ear. Fo$ see that the lines of the window blinds have disappeared in the filtered image3 since we s$ppressed the corresponding fre-$encies.
5ill act$ally $ses the c$rrent foregro$nd color. 7o$ble click on the color picker tool and set the c$rrent foregro$nd color to black.
)&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 119: =illing parts of the po&er spectrum image &ith the $ac%ground color filters out the corresponding freLuencies.
'$btract the filtered image from the inp$t image to see what e;actly has been filtered o$t. Instead of b$ilding the difference yo$ can as well go back to the power spectr$m and fill the inverse of the mask.
Illustration 111: The difference of the original image and the filtered image. (se rocess>==T>*edisplay o&erspectrum to redisplay the original power spectr$m. .ry to smooth the plant*noise image. <hich fre-$encies do yo$ have to filter o$tK
)#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 110: !sing clear instead of fill lets the corresponding freLuencies pass.
.ry to enhance the edges in the roots image. Always b$ild the difference of the original image and the filtered image to see what e;actly has been filtered o$t.
Illustration 114: The roots image after a high pass filter has $een applied.
Illustration 116: The difference of the original and the filtered image.
)%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer If we set everything3 e;cept for a ring3 to zero in the power spectr$m3 we will filter o$t all fre-$encies higher then a certain val$e and all fre-$encies lower then a certain val$e. .his is called a band*pass filter3 since the only fre-$encies that pass are those within the ring. .ry it for e;ample with the image pierre.tif. 7raw a circ$lar selection and then remove a second circle from within the selection by pressing the alt key while making the second selection. (se the I from the toolbo; to invert the selection and apply fill from the conte;t men$.
))!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 1"1: The $ac%ground should $e $lac%5 $ut contains some intensity in reality.
Illustration 1"": The line plot displays the intensities along the selected line.
?o to 1rocessOMathOs$btract and s$btract the mean backgro$nd val$e from the image. (se the R b$tton from the toolbo; to get back the line selection and create the profile plot again. .his time the val$es go down to zero. .he command lugins>*OI><; .u$traction from *oi [email protected] )+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer s$btracts the ne;t integer val$e3 above the mean intensity within the selection3 from the image.
Illustration 1"0: The line plot goes do&n to /ero no&. Illustration 1"1: The image after the +alue 1 has $een su$tracted from each pi)el +alue.. Another way to get rid of the backgro$nd is to divide the image by the average backgro$nd val$e. Most backgro$nd val$es will be afterwards and yo$ can s$btract from the image to set them to zero. .ry it with rocess>Math>di+ide.
Illustration 1"2: The image after it has $een di+ided $y 1.1 and 1 has $een su$tracted. .here is an a$tomatic operation that tries to find and s$btract the backgro$nd. ,pen the vis$al scripting pl$gin from lugins>Montpellier *IO Imaging>M*I Bisual.cripting. ?o to Operations>#ll and search the 5ind and '$btract 6ackgro$nd operation. 7rag it from the list and press the ,ptions b$tton B,C. 'et the n$mber of iterations to . R$n the operation by pressing the b$tton in the middle. .he operation searches for the highest intensity val$e aro$nd the intensity minima and s$btracts it from the image. [email protected] )/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 1"6: The image after the find and su$tract $ac%ground operation has $een applied.
)0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 119: The line plot re+eals a gradient from the top to the $ottom of the image.
Illustration 111: #fter su$traction of the a+erage $ac%ground intensity the gradient is still present.
Apply the operation rocess>.u$tract <ac%ground to the image and create the profile plot. .he gradient has disappeared. .he command $ses a rolling ball algorithm that3 ro$ghly described3 moves a sphere along the image and considers intensity val$es o$tside the radi$s to be backgro$nd. In this way the local information is taken into acco$nt.
Illustration 11": The options dialog of the su$tract $ac%ground command. Illustration 111: The su$tract $ac%ground command remo+es the gradient using a rolling $all algorithm. ,ne very elegant way to remove backgro$nd is to make an image of the empty scene along with the image of the specimen. ,ne can than divide the specimen image by the backgro$nd image and m$ltiply the res$lt with the mean intensity in the backgro$nd image . .his is often [email protected] )"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer possible in microscopy and the techni-$e is called flat field correction. If it is not possible to take the HemptyI image we can sim$late the process by applying a very large filter that will remove the ob=ect from the image. <e then have to divide the res$lt from the original image and m$ltiply with the average intensity of the filtered image. .his can be done with rocess>=ilters> seudo =lat =ield. 'elect the keep flat field bo; to see the generated backgro$nd image. 2ook at the profile plot from the res$lt. Again the gradient has disappeared. .he 1se$do 5lat 5ield correction applies a mean filter to the image. Fo$ can do the same thing $sing other filters. .ry a ?a$ssian bl$r filter for e;ample.
Illustration 113: The generated $ac%ground that is su$tracted from the image.
Illustration 116: Hine plot after pseudo flatfield correction. The gradient has disappeared.
+4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 109: #fter applying the unsharp mas% filter the image appears less $lurred.
,! &egmentation
'egmentation is the process of separating the ob=ects from the backgro$nd and from one another. .he simplest way of segmentation is based on the difference in the intensities of ob=ects and backgro$nd. ,ne looks for a minim$m and ma;im$m intensity val$e3 so that all pi;els belonging to the ob=ects one is interested in have intensities between min and ma; and all other pi;els have intensity val$es below min or above ma;. .he res$lt of a segmentation is often represented as a binary mask. A binary mask is an image that contains only two val$es. .he first val$e signifies that the pi;el belongs to the backgro$nd and the second signifies that a pi;el belongs to the ob=ect. In ImageJ the val$es 4 and &)) are $sed. ,nce we created a masked3 we can combine it with the original image3 for e;ample to s$ppress everything b$t the ob=ects we are interested in. Another way of presenting the res$lt of a segmentation is a selection. .he selection represents the borders of the ob=ects we are interested in. A selection itself is not an image. ImageJ stores the selection together with the image. A selection is called a region of interest or R,I in ImageJ. <e can t$rn a mask into a selection and vice versa and $se the representation the most practical for a given task. A selection can be created from a mask with the help of the magic wand or tracing tool. ?iven a selection3 a mask can be created by $sing fill on the mask3 then inverting the mask and $sing clear. .he command Edit>.election>Create mas% can be $sed to create a mask from a selection in one step. .he command Edit>.election>Create .election can be $sed to create a selection from a mask or from an image on which the lower and $pper threshold are set in one step.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer ,pen the image plant.tif. ,pen the threshold ad=$ster from Image>#d(ust>Threshold or click shiftMt on the image. Fo$ can choose between three modes in the threshold tool. .he first displays selected pi;el in red and pi;els not selected with their original intensities. .he second displays the mask that will be the res$lt after applying the threshold3 i.e. backgro$nd in white and ob=ects in black. In the third mode3 selected pi;els are displayed with their intensities3 pi;els below the lower threshold are displayed in bl$e and pi;els above the $pper threshold are displayed in green.
Illustration 10": Illustration 101: Illustration 100: O$(ect O$(ect red5 O$(ect $lac%5 grayle+els5 $ac%ground $ac%ground $ac%ground $lue $lac%. &hite. ?$elo& first threshold@ and green ?a$o+e second threshold@ .
Ad=$st the threshold to select the plant. .he wand tool works together with the threshold tool. 'o if yo$ want to select the plant3 there is no need to create the mask. (se the wand tool to select the plant. (se the alt key to keep o$t the two holes between the leaves. Fo$ can add to a selection by $sing shift and s$btract from a selection by $sing alt. Alternatively yo$ can $se Edit>.election>Create .election after yo$ changed the lower and $pper threshold with the threshold ad=$ster. In contrast to the create selection command3 $sing the wand tool allows to select one separated ob=ect in an image containing m$ltiple ob=ects. If yo$ press the meas$re b$tton on the toolbo; or the m key on the image3 yo$ get a res$lt table with meas$rements of the selection.
+&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 103: *esults ta$le &ith the measurements from the selection. Illustration 102: .election created &ith the threshold ad(uster and the &and tool. Remove the selection by clicking on the > b$tton in the toolbo;. R$n the 1article Analyzer to meas$re all ob=ects with intensities between the selected thresholds. (se the Apply b$tton if yo$ want to create a mask.
Illustration 104: The particle analy/er. Fo$ can filter o$t ob=ects by their size and circ$larity and yo$ can create a mask image or an o$tline image containing the conto$rs of the meas$red ob=ects. In the later image the ob=ects will be n$mbered3 as well. Fo$ can choose to e;cl$de ob=ects to$ching the image borders and to incl$de or not incl$de holes in the ob=ects in the mask.
+#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 108: #n outline of the plant created &ith the particle analy/er.
Fo$ can config$re the val$es that will be meas$red by the 1article Analyzer $nder #naly/e>.et Measurements or $nder Options>Measurements on the toolbo;. 9ere yo$ can as well config$re a redirect image. In this way yo$ can $se a mask b$t the intensities will be meas$red in the redirect image3 for e;ample the original image the mask was created from. (se the 1article Analyzer to meas$re the plant with the intensity val$es from the original image and display the o$tline res$lt.
Illustration 129: The set measurements dialog. The settings are used $y the measure command and $y the particle analy/er. Another way to $se a mask to meas$re in another image3 is by $sing the wand tool on the mask and then transferring the mask to the other image by activating the image and pressing R on the toolbo; or shiftMe on the image. Fo$ can then $se the meas$re command to meas$re the content of the selection. [email protected] +%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer ,pen the plant,noise.tif image and try to segment it with the help of the threshold ad=$ster. Fo$ will see that the noise prevents yo$ from making a good segmentation. .ry one of the noise s$ppression techni-$es we disc$ssed and try the segmentation again.
Illustration 121: The roi manager displays the rois of all particles.
Illustration 12": The rois of the particles ha+e $een added to the roi manager.
Illustration 121: The measurements of the rois in the roi manager. Remove particle 4 and ". (se the wand tool to select particle 4 again and add it again to the roi manager. 'ave all rois3 then close and re*open the roi*manager and open the saved rois again.
+)!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Compare the meas$red val$es of different particles. <hat is the meaning of the meas$red val$esK
Area: The sur&ace o& the roi. It is measure Mean: The a0erage gray 0alue within the roi. StdDev: The stan ar e0iation o& the mean gray 0alue within the roi. in s.uare+!i/el i& no s!acial scale is set.
Mode: The most &re.uently occurring gray 0alue within the roi. This corres!on s to the highest !ea' in the histogram o& the roi. I& you is!lay the histogram the mo e will -e shown together with the num-er o& occurrences. Min: The minimal gray 0alue within the roi. Max: The ma/imum gray 0alue within the roi. X: The /+coor inate o& the centroi . This is the a0erage o& the /+coor inates o& the !i/els in the roi. Y: The y+coor inate o& the centroi . This is the a0erage o& the y+coor inates o& the !i/els in the roi. XM: The /+coor inate o& the center o& mass. This is the -rightness weighte coor inates o& the !i/els in the roi. YM: The /+coor inate o& the center o& mass. This is the -rightness weighte coor inates o& the !i/els in the roi. Perim.: The length o& the outsi e -oun ary o& the roi. BX: The /+coor inate o& the u!!er+le&t corner o& the -oun ing -o/ o& the roi. The -oun ing -o/ is the smallest rectangle, that entirely contains the roi. BY: The y+coor inate o& the u!!er+le&t corner o& the -oun ing -o/ o& the roi. Width: The wi th o& the -oun ing -o/ o& the roi. Height: The height o& the -oun ing -o/ o& the roi. Major: The length o& the ma1or a/is o& the -est &itting elli!se. The elli!se has the same area, orientation an centroi as the original selection. Minor: The length o& the minor a/is o& the -est &itting elli!se. Angle: The angle o& the ma1or a/is o& the -est &itting elli!se against the /+a/is o& the image. Circularity: 42(area/perimeter^2). A 0alue o& ) in icates a !er&ect circle. As the 0alue a!!roaches *, it in icates an increasingly elongate !olygon. 3alues may not -e 0ali &or 0ery small !articles. The !erimeter o& a circle is ! " 42r an the area is a " 2r5. a0erage o& the /+
++!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
eret:! The longest istance -etween two !oints on the -oun ary o& the roi. 6ou can use the macro Draw Ferets Diameter to raw the &eret iameter o& a selection into the image. 7se Plugins>Macros>Install an select the macro &rom the macros &ol er in the Image8 -ase+&ol er. Ma'e a selection in the image an call the macro &rom the Plugins>Macros menu. "ntDen:! The integrate ensity is the sum o& the gray+0alues o& all !i/els within the roi.
Median: The me ian gray 0alue o& the !i/els within the roi, i.e. The gray 0alue that lies in the mi le or the 0alue -etween the two 0alues in the mi le, when all gray+0alues are sorte their numerical 0alue. S#e$ne%%: A measure o& the asymmetry o& the roi. istri-ution o& the gray 0alues aroun
-y
&urto%i%: A measure o& the "!ea'e ness" o& the istri-ution o& the gray 0alues aroun the mean within the roi. 9igher 'urtosis means more o& the 0ariance is ue to in&re.uent e/treme e0iations, as o!!ose to &re.uent mo estly+size e0iations. 'Area: The !ercentage o& the sur&ace that has an intensity 0alue a-o0e the min+threshol or a-o0e * i& no min+threshol is set. ,oosely s!ea'ing this is the !ercentage o& !i/els within the o-1ect that o not -elong to holes. eretAngle: The angle o& the &eret iameter with the /+a/is o& the image (*+):*).
Min eret: This is a measure o& the !article;s wi th. It is calle the minimum cali!er iameter as well. It is e&ine as the shortes istance -etween two !arallel !lanes touching the !article on o!!osite sites, &or any orientation o& the !article. A(: The as!ect ratio o& the !article. This is the length o& the ma1or a/is o& the minor a/is o& the &itte elli!se. i0i e -y the length
(ound: The roun ness o& the !article, e&ine as< =>area?2>(ma1or a/is)5. The roun ness is ) &or a circle an a!!roaches * &or 0ery alongate o-1ects. The ma1or a/is o& a circle is ! " 4r an the area is a " 2r5. Solidity: The area o& the !article i0i e -y the area o& the con0e/ hull o& the !article. 6ou can see the con0e/ hull that is use -y creating it &rom a selection using Edit> election>!on"e# $ull.
+/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
.he a$to*threshold separates the histogram in a way that the threshold val$e e-$als half of the s$m3 of the average backgro$nd and the average ob=ect intensity. In other words it is trying to find a threshold in a way that half of the average intensity belongs to backgro$nd and half of it to ob=ects. .he entropy threshold searches a threshold val$e for which the inter class entropy is ma;imal. .he ,ts$ threshold $ses a threshold val$e for which the inter class variance is ma;imal. .he mean threshold $ses the mean intensity of the image as threshold val$e.
+0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 131: Image segmented into four classes: 1. $ac%ground , $lac%5 ". dar% areas , $lue5 1. $righter areas , read5 $rightest areas , green. .he k*means cl$stering works for color images as well. .ry it on the image flamingo.png and on one of the images from the plant robot folder. (se a bigger n$mber of classes Babo$t )C on the later. .he k*means*cl$stering interprets the intensity val$es in n*colors as coordinates in an n* dimensional space. :ach cl$ster is represented by its centroid. Centroids are initially randomly set and optimized afterwards. 1i;els are gro$ped by their pro;imity to a cl$sterSs centroid.
Illustration 13": The thresholded image contains t&o o$(ects touching each other. [email protected]
Illustration 131: The $inary &atershed algorithm separated the t&o o$(ects. +"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer 'tarting from the binary image a distance map is comp$ted. .his gives a grayscale image where the intensities represent the distance from the border for each ob=ect. Fo$ can create the distance map from the original image with rocess><inary>-istance Map. Imagine the intensity val$es as height above the gro$nd. .his way the image becomes a landscape with mo$ntains in places of high intensities and valleys in places of low intensities. Apply #naly/e>.urface lot or $se Interacti+e 1- surface plot pl$gin B lugins>1dC the to see the image this way. .he watershed slowly fills the image with water starting from the level 4 and going $p one level in each step. In the beginning some separated basins will be created. <henever the rising water $nites two basins a dam is b$ild and remembered.
Illustration 130: The distance map5 pi)els &ithin the o$(ect are dar%er5 the further a&ay from the $order they are.
.he watershed can be $sed with a grayscale image directly. .o try this we need to install the watershed pl$gin from httpD!!bigwww.epfl.ch!sage!soft!watershed!. 7ownload the zip3 copy it into the pl$gins folder and $nzip it. Restart ImageJ. >ow letSs try to segment the image compartments* .=pg with the help of the watershed. ,pen the image and start the pl$gin from lugins>Gatershed>Gatershed. (se a high val$e for the smoothing. 1ress the 'mooth b$tton. Invert the res$lt image so that the basins are dark3 $sing :ditOInvert or shiftMI on the image. 'elect 0*connected. .his means every pi;el has 0 neighbors3 & above3 & below and the % corners. R$n the watershed.
/4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 133: The red lines represent the dams found $y the &atershed. The image is slightly o+ersegmented. Can yo$ get a better res$lt by applying an edge enhancing filterK .ry 1rocessO5ind :dges or shiftMf on the image before $sing the watershed.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer #& bit floating point n$mber images B$ses signed floating point n$mbersC 0*bit color Bval$es from 4 to &))C3 an 0 bit image with a look$p table R?6 Color B# channels of val$es from 4 to &))3 bit depth &%C
<hat happens if we convert an 0*bit grayscale image into a +*bit grayscale imageK .ry itW ,pen the image cells&.tif and look at the histogram Bpress h on the imageC. .hen convert it to +bit $sing ImageO.ypeO + bit. 7isplay the histogram again. As yo$ see the intensity val$es have not been changed.
Illustration 134: The 13,$it images contains intensity +alues from 1999 to 12346.
In Edit>Options>Con+ersions yo$ can t$rn the scaling off. 9owever then all val$es above &)) will simply be tr$ncated when converting to 0 bit. .he res$lt image will be all white3 since the smallest val$e in the original image is 444. Compare the histograms of the res$lts of Converting the + bit image to 0 bit (se rocess>Enhance Contrast>Mormali/e on the + bit image before converting to 0 bit. Convert the + bit image to 0 bit and do the normalization
/&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 141: The color profile along the line. Illustration 149: #n *;<,color image. An R?6 image can be split into its three components with Image>Color>*;< .plit and two or three 0*bit grayscale images can be combined into an R?6 color image. 6esides this3 an R?6 image can be converted into a R?6 stack or into a 9'6 stack $sing the type men$. 9'6 stands for h$e3 sat$ration and brightness.
Illustration 14": *ed Illustration 141: ;reen Illustration 140: <lue component of the component of the component of the image. image. image.
Illustration 144: Illustration 143: .aturation component <rightness component of the image. of the image.
An R?6 image can be converted into an inde;ed color image. Fo$ can choose the n$mber of colors that will be $sed and a look$p table will be created accordingly.
/#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Create two images of same size and draw a white rectangle on a dark gro$nd into the two images in a way that the two rectangles are overlapping when the images are combined. Apply rgb merge and p$t the images into the red and into the green channels. <hat will be the color of the overlapping regionK
Illustration 146: ;reen and red mi) to yello& in an additi+e color model.
0! Image Analysis
5or o$r p$rpose we can define the term image analysis in the following wayD Image analysis is the e)traction of meaningful information from digital images $y means of digital image processing techniLues.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer either on the same3 or on another image. :;port image creates an image where the markers are drawn into the image. Fo$ can save this image to show which cells yo$ co$nted3 however in contrast to saving the markers3 yo$ canAt contin$e the co$nting later on with the e;ported image.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer Fo$ can e;cl$de particles by their size and circ$larity. 1$t in a minim$m size of 444. 'elect outlines in the show field and select -isplay *esult3 .ummari/e and Include 'oles. As a res$lt yo$ get a res$lts table with the meas$rements for each particle3 a res$lts table with the s$mmary and an image of the n$mbered o$tlines of the particles taken into acco$nt. Fo$ find the total n$mber of ob=ects in the s$mmary res$lts table.
Illustration 161: -etail of the o+erlay of the original image and the outlines of the particles ta%en into account $y the particle analy/er.
Illustration 160: The summary of the measurements includes the total count.
As an alternative to $sing the o$tlines to mark which particles have been taken into acco$nt3 yo$ can $se the #naly/e>Ha$el command to stick a n$mber to each ob=ect. .his is only possible if yo$ config$red the particle analyzer to meas$re the centroids of particles.
/+!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 162: articles $igger then the a+erage pariticle si/e are counted multiple times.
Illustration 164: The image after application of the local threshold plugin.
8.1.3.3
atershed
<e can $se the greyscale watershed pl$gin to separate the cells in the hst,9.tif image. Invert the image3 so that the n$clei are dark and the space aro$nd them is bright. (se a small radi$s for the smoothing filter. 'elect the show the watershed dams only option. R$n the watershed. Invert the watershed image and s$btract it from the original hst,9.tif image. .he borders between the cells are now set to zero and yo$ can $se the threshold ad=$ster to get a mask for the separated cells.
//!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
/0!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 181: Measuring the intensity in the nuclei and in the cytoplasm.
In general more then one feat$re might be necessary to classify ob=ects. ,ne $sef$l set of feat$res are the moments of ob=ects and val$es derived from moments of ob=ects. Fo$ can $se the Moment Calc$lator pl$gin B lugins> article #nalysis>Moment CalculatorC to comp$te them. [email protected] /"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 182: =eatures $ased on moments of the circles ?first 1 ro&s@ and triangles ?last three ro&s@ . 5$rther feat$res can for e;ample be calc$lated with the 1article0 1l$s or other morphological pl$gins from ?abriel 2andini B lugins>morphology> articles6 lusC.
Illustration 183: =urther features of the circles ?ro&s 15 05 3@ and triangles ?ro&s "5 15 2@.
1! Annotating images
5.1 Scale bar6 time stamper and e1ent stamper
,pen the image ot.tif. .his opens a stack of image which represents a time series. Fo$ can cycle thro$gh the images with the slider at the bottom of the window. <e want to add three annotations to the imagesD A scale bar indicating the length of a known distance3 the time point from the beginning of the series and a marker for images in which the flower appears. .o add a scale bar we first have to calibrate the image. <e either need to know the pi;el size or the length of an ob=ect in the image. 2etAs say that the diameter of the pot is +cm. Make a line selection from one side of the pot to the opposite side. .hen open #naly/e>.et .cale.... :nter the distance + and the $nit cm and press ok. <hen the scale is set ImageJ will $se for all meas$rements3 i.e. res$lts will now no longer be in pi;el b$t in cm.
04!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration 186: .etting the scale. Illustration 184: .electing a %no&n distance. ?o to #naly/e>Tools>.cale <ar and p$t a black scale bar of &cm length into the lower left corner. 'elect Ha$el all .lices to p$t the scale bar into all images of the series.
Illustration 188: The $lac% line segment has a length of t&o centimeter.
<e will now add a te;t indicating the time when the image was made. 2etAs say the image have been made with an interval of day between to images. Make a rectang$lar selection in the place where the stamp sho$ld appear. 7o$ble click the pipette icon and set the foregro$nd color to the color yo$ want the stamp to have. .hen open the time stamper from lugins>Mo+ie>Time .tamper.
0 !"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "9": The time stamp has $een added to each image of the series.
5inally add a label $looming on the slices % to /. .his is done in a similar way as adding the time stamp3 only that the command lugins>Mo+ie>E+ent .tamper is $sed.
Illustration "91: The e+ent stamper dialog. Illustration "90: # te)t has $een added to some images of the series.
0&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer *amp. .his will add a ramp with the colors of the l$t from the bottom with the val$e 4 to the top with the val$e &)). It only works for 0 bit images.
Illustration "92: # ramp sho&s &hich color represents &hich intensity. .he other way is to first calibrate the image intensities $sing #naly/e>Cali$rate... A calibration bar can then be stamped into the image $sing #naly/e>Tools>Cali$ration <ar... .o calibrate the image yo$ have to enter a n$mber of pairs of $ncalibrated and calibrated val$es. Fo$ can select the form of a c$rve that will be fitted to the entered data. 5or a calibrated image3 intensity val$es will be displayed in the calibrated form3 followed by the greylevel val$e in brackets. Meas$rements will be in calibrated form. Call #naly/e>Cali$rate... and enter the points 43 4 and &))3 . 'elect the f$nction straight line. .hen $se #naly/e>Tools>Cali$ration <ar... stamp the calibration bar into the image.
0#!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "93: ImageJ &ith the stac% tool set selected. As yo$ see the camera position is not e;actly the same for each image which makes the plant somewhat =$mp aro$nd. (se lugins>.tac% .huffling>#lign slices for an a$tomatic stack registration. Choose either rigid body or translation as transformation. Make a rectang$lar selection3 so that the black borders that have been created by the stack registration are o$tside of the selection and d$plicate the stack Bctrl7shift7dC. Fo$ can e;port the series as a movie in one of the following formatsD animated gif avi movie -$icktime movie (se =ile>.a+e #s and one of these formats to e;port the series as a movie. If yo$r image se-$ence is to big to fit into memory at once3 yo$ can still create a movie from it by $sing the virt$al stack opener B=ile>Import>Birtual .tac%C.
0%!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer In principal this co$ld be done man$ally $sing for e;ample the polygon selection tool. ?o to the first slice set the first polygon point to the into the first particle3 then go one slice ahead $sing the AOA key and set the ne;t point and so on. <hen the path is finished press ctrl7m to meas$re its length. Another possibility is to create a pro=ection of the stack BImage>.tac%>F ro(ect...C and $se the polygon selection tool on it. .he Mtrac%" pl$gin meas$res the track length a$tomatically. ,pen it from lugins> article #nalysis>Mtrac%".
Illustration "11: The plugin ans&ers the distance tra+elled $y the particles ?length@ and the linear distance from the start point to the end point of the trac%.
! 4iological applications
11.1 ,olocali8ation analysis
! ! 6is"alizing colocalization "sing o/erlays
In principle an overlay of the two channels3 $sing two appropriate look$p*tables3 like for e;ample red and green or cyan and magenta3 sho$ld give as a hint if two fl$ochromes are in the same place. In the red!green case places in which the red and green intensities are close to each other will appear yellow in the image. Another possibility is to $se magenta3 green and bl$e. [email protected] 0)!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "1": The o+erlay of the channels. The green channel has lo&er intensities and is in+isi$le. 6$t there are some problems with this approach. Fellow spots will only become visible if the intensities in both channels are similar3 both channels m$st have similar histograms. 9istogram normalization can be $sed b$t may s$ggest false res$lts since intensities donAt represent the real -$antities of molec$les anymore. ,pen the images coloc,*hod3 coloc,;= and coloc,'oechst from the coloc folder. Create an overlay of the channels that shows the colocalization between gfp and rhodamine. Instead of an additive overlay of channels the diference can be $sed. Apply magenta and cyan look$p tables3 convert the images to R?6 and calc$late the difference $sing the image calc$lator. .he same res$lt can be achieved $sing the Colo$r merge command from the men$ lugins>Colour functions. Check !se difference operator in the dialog.
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "10: O+erlay of the red and green channel after histogram normali/ation.
0/!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "14: The histogram Illustration "16: The of the red channel after histogram of the green channel normali/ation. after normali/ation.
00!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
0"!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
! !# ?"antification of colocalization
"4!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration ""1: Illustration ""0: # noisy image. #nother similar noisy image.
Illustration ""2: # Illustration ""3: scatter plot of The color o+erlay correlated images of the input images.
Illustration ""4: Illustration ""6: # noisy image. #nother similar noisy image5 rotated $y 89N.
Illustration ""8: Illustration "19: .catter plot of The color o+erlay uncorrelated images of the input images.
Illustration "11: Illustration "1": # noisy image. #nother similar noisy image5 rotated $y 89N.
Illustration "11: Illustration "10: .catter plot of anti, The color o+erlay correlated images of the input images.
" !"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "12: earsonJs coefficients for different scatter plots. ,pen the images coloc,;= and coloc,'oechst from the folder 1" , coloc. (se the J#Co pl$gin to calc$late the scatter plot. R$n the pl$gin from the 1l$gins men$3 select the images in the dialog3 select cytofl$ogram and #dd the /ero line. .he scatter plot will be created and the fitted line will be shown. .he 1earsonAs Coefficient will be written to the log window as Correlation Coefficient. If yo$ want to calc$late the 1earsonAs Coefficient witho$t the scatter plot3 check earsonJs coefficient instead of cytofluogram in the dialog.
"&!"#
Image processing and analysis with ImageJ and MRI Cell Image Analyzer
Illustration "14: The o+erlay of the t&o input images. Illustration "16: The scatter plot and the fitted line calculated $y the J#Co plugin.
Illustration "13: The dialog of the J#Co colocali/ation plugin. 'catter plot and 1earsonAs coefficient indicate colocalization3 especially when it is complete. 9owever they rarely discriminate differences between partial colocalization. Mid*range coefficients between *4.) and 4.) do not allow concl$sions to be drawn. .he res$lt is dependent on noise and backgro$nd or the threshold $sed to s$press the backgro$nd. 6leadthro$gh of the fl$orescents can lead to false res$lts as well. 5inally there co$ld be a non linear relationship between the two signals3 that co$ld not be detected $sing this method.
"#!"#