View
6
Download
0
Category
Preview:
Citation preview
Latestrevision:11/30/2011
1
Illumination Correction tutorial
I. Introduction TheCorrectIllumination‐CalculateandCorrectIllumination‐Applymodulesareintendedtocompensateforthenon‐uniformitiesinilluminationoftenpresentinmicroscopyimages.Itisnotuncommonfortheintensitywithinafluorescenceimagetovarybymorethantwo‐foldacrossthefieldofviewduetotheopticsofthemicroscope,imperfectionintheslideorsensorbias.Correctingtheilluminationvariationcanbeimportantbothforaccuratesegmentationandforintensitymeasurements.II. Creating an illumination function TheCorrectIllumination‐Calculatemoduleisusedtocreatetheilluminationfunction,animagethatisrepresentativeoftheoverallpatternofilluminationintheimageorimageset.Generally,itisnecessarytocreateadifferentfunctionforeachsetofimagingorsamplepreparationconditionsbecauseeithercanyieldchangesinthepatternofillumination.Forexample,theilluminationpatternwillchangeifyouuseadifferentstainingreagentforabatchofimagesorchangeanycomponentsorsettingsintheopticalpathofthemicroscope.Infact,sometimestheilluminationpatterncanchangethroughoutthecourseofthedayasthemicroscopelampchangestemperature,orbetweendifferentbatchesofwhatshouldbeidenticalstainingreagents.Inourexperience,aseparateilluminationfunctionshouldbecalculatedforeachseparateplateinamulti‐wellplateexperiment.Additionally,whilethepatternofilluminationmaylookverysimilarforeachimagedwavelength,theabsoluteintensitieswillmostlikelyvarybetweenwavelengths(channels).Therefore,aseparateilluminationfunctionshouldbepreparedforeachchannel.Decidingonaworkflow:TherearetwoworkflowoptionsavailableinCellProfilertocreateandapplyilluminationfunctionsforaproject:(1)createandsaveilluminationfunctionsusingoneCellProfilerpipeline,thenlaterretrieveandapplytheilluminationfunctionsusingaseparateCellProfileranalysispipeline;or(2)createandapplyilluminationfunctionswithinasingleCellProfileranalysispipeline.Forexperimentswhereadifferentilluminationfunctionwillbecalculatedforeachindividualimage,(2)isthebetterchoice.Fortypicalhigh‐throughputexperimentsinvolvingmorethan100imagesthatwillshareanilluminationfunction,(1)ismoreconvenientbecauseitallowsyoutoreadilyinspecttheilluminationfunctionsthatareproducedforqualitycontrolpurposes,priortoapplyingthemtoanalyzeimages.Itofferstheopportunitytotweakthepipelinethatcreatestheilluminationfunctionspriortoanalyzingimages.Aswell,ifcreatingtheilluminationfunctionistime‐consuming(i.e.,manyimagesarebeingprocessed),itisworthwhiletocreatethefunctioninapipelineseparatefromtheoneusedforanalysis,tomaketheanalysispipelinemoreefficient.Examplepipelinesfollowingbothworkflowsareavailableatwww.cellprofiler.org/examples.shtmlintheIlluminationCorrectionexamplepipeline.
Latestrevision:11/30/2011
2
Figure1:ScreenshotoftheCellProfilerinterfacefortheCorrectIllumination‐Calculatemodule.
ConfiguringtheCorrectIllumination–Calculatemoduletocreateilluminationfunctions:AnexampleoftheCorrectIllumination‐CalculatemoduleisshowninFig.1.Somemodulesettingsonlybecomevisiblebasedonyourresponsetoothersettings,soonlysomeoftheavailablesettingsareshownhere.Foroverallguidanceonusingthemodule,seethefullhelpforthemodulebyselectingitinthemodulepanelatthetopleftoftheCellProfilerwindow,thenclicktheClicktheHelpbutton underthemodulepanelontheleft.ClicktheHelpbuttonstotherightofeachmodulesettingforadetaileddescriptionofthatsetting.Ifsavinganilluminationfunctionforlaterretrieval,besuretoselect'.mat'asthefileformatforsavingsincethisformatusesfloatingpointpixelvalues,whichisnecessaryforthemathematicaloperationsinvolvedinilluminationcorrection.III. Applying the illumination function IntheCorrectIllumination‐Applymodule(somesettingsofwhichareshowninFig.2),youhavetheoptiontoeitherdivideorsubtracttheilluminationfunctionfromtheinputimage(theimagetobecorrected).Iftheilluminationfunctionwasrescaledtobe1orgreaterinCorrectIllumination‐Calculate,selectDivide.Otherwise,ifthefunctionwasnotrescaled,selectSubtract.SeethehelpfortheBackgroundvs.RegularsettingintheCorrectIllumination‐Calculatemoduleformoreguidance.Inbothcases,thisshouldleavetheimageintherangeof0to1.
Latestrevision:11/30/2011
3
Ifthegradientacrossthefinalcorrectedimageremainslarge,youmaywanttorescaletheintensitiesaftertheApplystepbyusingtheRescaleIntensitymoduleonthefinalimage.Sincedoingsowillstretchtheintensitiesinthefinalimage,thisfunctionshouldbeusedcarefully.Rescalingisnotrecommendedwhenyouintendtomeasureandcompareintensitiesamongrescaledimagesintheimageset.Itisalsonotrecommendediftheimagesetmaycontainimagesthathavenoobjects;insuchcasestherescaledimagewillsetthebrightestpartoftheblankbackgroundoftheimagetobeverybright,thusconfusinglatermodulessuchasIdentifyPrimaryObjects.SeethehelpfortheRescaleIntensitymoduleformoreinformationontherescalingoptionsavailable.
Figure2:ScreenshotoftheCellProfilerinterfacefortheCorrectIllumination‐Applymodule.
IV. Inspecting the illumination function and its results ThequalityoftheIlluminationcorrectiondependsentirelyonthesettingschosenforCorrectIllumination‐Calculate.Yourchoiceastowhatcombinationsofsettingsareappropriatewilldependonthespatialarrangementofthefeaturesofinterestinyourcellularimagesandwhethereachimageislikelytohaveadifferentilluminationpatternorwhethermultipleimagesarelikelytosharethesamepattern.Inthissection,wewillinspectexampleilluminationfunctionsandassesswhethertheyareappropriate.
Latestrevision:11/30/2011
4
Example1:InthisexamplefromacollectionofimagesofU2OScells(Fig.3):
1. Thecellsareuniformlydistributedacrosstheimage(thatis,theyarenotpreferentiallylocatedincertainpartsoftheimage).
2. Theyoccupymostoftheforeground.3. Thereseemstobeacomplexilluminationpatternwheretheilluminationseems
dimmerinthetopleftandpossiblythebottomleftandtoprightcorners.4. Theimageispartofabatchofimagespreparedunderthesamesamplepreparation
andimagingconditions,allofwhichshowasimilarilluminationpattern.
Figure3:RawgrayscaleimageofU2OScells.
ThisimagesetshouldbecorrectedusingtheRegularmethod,whichtendstoproducemoreaccuratecorrectionwhentherebrightobjectsacrossmuchoftheimage.Becauseof(2),thereisinsufficientbackgroundintheimageforthealternativeBackgroundmethod.Althoughotheroptionsmightwork,wewillchooseMedianasthesmoothingmethodbecauseof(3)–thepatternappearstoberathercomplexasisoftenthecaseforfluorescenceimages.Becauseof(4),weshouldchooseAll(tocalculateafunctionbasedonmanyimagestogether)ratherthanEach(whichcalculatesadifferentfunctionforeachimage).IfweweretoincorrectlychoosetheRegularmethoduponEachimageindividually,wewouldobtainapoorilluminationfunctionthatresemblestheoriginaldistributionofthecells,showingdarkregionspreciselywherecellsareabsentandbrightregionswheremanycellsarepresent(Fig.3A).Sincethisfunctionismorereflectiveoftheextrinsicfeaturesofinterest(thecellsthemselves),andnottheintrinsicqualitiesoftheacquisitionsystem,thisisnotadesirableilluminationfunction.However,becausethisimageispartofasetproducedbyanautomatedmicroscope,itwouldbebettertotakeadvantageofthewholeimagesettoproduceamorerobustilluminationfunctionthatislesssensitivetovariationsineachparticularimage.ItisthuspreferabletouseAllinsteadofEach,averagingtogethermanyimagespriortosmoothing.Theresultisanensembleilluminationfunctionthatismorerepresentativeofthefluorescencevariationintrinsictoallimagescapturedduringtheexperiment(Fig.4B).Evenso,theilluminationpatternstillhassomeforeground
Before proceeding: Please gain a basic understanding of the options within Correct Illumination – Calculate and Correct Illumination – Apply by reading the help for the module: select it in the module panel at the top left of the CellProfiler window, then click the Click the Help button under the module panel on the left.
Latestrevision:11/30/2011
5
variationsoriginatingfromthecelldistributioninsteadoftheimagingsystem.Increasingthesmoothingfiltersizeyieldsanilluminationfunctionthat(Fig.4C).
Figure4:IlluminationfunctionsproducedfromtheimagesetcontainingFig.3(A)UsingRegular+Each+MedianfilteringontherawimageinFig.3.(B)UsingRegular+All+Medianfilteringonthefullimageset.(C)
UsingRegular+All+Medianfilteringonthefullimagesetwithalargersmoothingfiltersize.Figure5showstheresultsoftheilluminationcorrectiontothisexample.AfterapplyingtheilluminationfunctioninFig.4CtotheoriginalimageusingDivisioninCorrectIllumination‐Apply,wegetthefollowingresultinFig.5B.Thecellsaremuchmoreeveninintensity,withlessvariationbetweentheouteredgesandthecenteroftheimage.Cautionshouldbeusedtomakesuretheimagesarenotover‐corrected–thatis,tomakesurethatrealvariationinthebrightnessofcellsisnotremovedusingilluminationcorrectiontechniques,disturbingthemeasurementsmadefromthecells.
Figure5:Theoriginalimageofcells(A)correctedforilluminationvariation(B).
Example2:Inthisexampleofanimageofnucleistainedwithhistone‐2Bcherryandcontainingalargeimageartifact(Fig.6A):
1. Theorganismsaresparselydistributed.2. Thebackgroundoftheimageseemstoshowthepatternofillumination.3. Theilluminationpatternvariessubstantiallybetweendifferentimagesintheset
(notshown).Anattempttoidentifythenucleiintheoriginalimagewillresultindetectionoftheartifactinadditiontothenucleipresent(Fig.6B).Becauseof(1)and(2),theBackgroundmethodisthemoreappropriateoptionforcorrectingtheimageasopposedtoRegular.Becauseof
A B C
A B
Latestrevision:11/30/2011
6
(3),weshouldselectEachratherthanAll,sinceeachimagewillneeditsownilluminationcorrectionfunction.
Figure6:(A)Originalimageofnucleicorruptedwithanintensityartifact.(B).Downstreameffectonnuclei
identification.UsingBackground+Each+MedianasinExample1yieldstheilluminationfunctionsshowninFig.7AandB.TheilluminationfunctioninFig.7A,however,usedablocksizethatwastoosmallinCorrectIllumination‐Calculate,sowhilethebackgroundintensitydistributionisvisible,someforegroundpixelswereincludedinthefunction.Uponinspection,itiseasytoseethenucleiintheilluminationfunction,whichisundesirable–portionsofthenucleiwillbeimproperlyremovedfromtheimageifthisilluminationfunctionisapplied.UsingBackground+Each+Medianwithalargerblocksizeyieldsanilluminationfunctionwhichbetterreflectstheactualbackgroundintensitydistribution(Fig.7B).
Figure7:Azoomed‐inviewofIlluminationfunctionsproducedfromtheimageinFigure6.(A)UsingRegular
+Each+Medianfiltering.(B)Sameas(A)withalargerblocksize.Figure8AandBdepictthecorrectedimagewiththeresultsofnucleiidentification.Withtheartifactremoved,thenucleiarenowsegmentedmuchmoreaccurately.
B
B
A
A
Latestrevision:11/30/2011
7
Figure8:(A)Correctedimageofnuclei.(B).Downstreameffectonnucleiidentification.
Example3:InthisexampleofC.elegansnematodescontainedinawell(Fig.9):
1. Theorganismsaresparselydistributed.2. Thebackgroundoftheimage(whiteportioninFig.9A)seemstoshowthepatternof
illumination.3. Theilluminationpatternvariesbetweendifferentimagesintheset(notshown).4. Thepatterntendstobeaverysimpleonethatisbrighttowardsthemiddleanddim
towardstheedgesofthewell.Thispatternistypicalforbrightfieldimages.Becauseof(1)and(2),theBackgroundmethodisthemoreappropriateoptionratherthanRegular.Becauseof(3),weshouldselectEachratherthanAll,sinceeachimagewillneeditsownilluminationcorrectionfunction.Inthisinstance,twopre‐processingstepsareperformedpriortoilluminationcorrection.First,theimageisinvertedinintensityusingtheImageMathmodule(Fig.9B),sincetheBackgroundmethodassumesthatthebackgroundiscomprisedoflowintensitypixels.Second,theregionoutsidethewellismaskedoutusingtheMaskImagemoduleinordertorestricttheareaofinteresttothewellinterior.Withoutthismethod,CorrectIllumination–Calculatewillassumethattheilluminationwasextremelydimattheedgesoftheimageandattempttocorrectthedarkregions,resultinginaveryskewedilluminationpatternneartheedgesofthewell.WechooseBackground+Each+FitPolynomialdueto(4)fromthelistabove–thepatternappearstobesimpleasisoftenthecaseforbrightfieldimages.ThisyieldstheilluminationfunctionshowninFig.9C.
Figure9:(A)Rawimageofnematodesinawellingrayscale.(B)Theimagein(A)invertedinintensity.(C)
Illuminationfunctionsproducedfrom(B)usingBackground+Each+FitPolynomial.
B
A B C
A
Latestrevision:11/30/2011
8
However,anothercorrectionmethodisavailablewhichyieldssimilarresultsaswellasbeingeasiertouse.TheRegular+Each+ConvexHullmethodisoptimizedfortransmittedlightimageswithilluminationpatternssimilartotheoneillustratedinthisimage.Inbrief,themethodeffectively“erases”darkobjectsfromthelightbackground,whichhasthefollowingadvantagesovertheBackgroundmethodabove:
1. Therearenorequirementsregardingthedistributionoforganismsintheimage.2. Noinversionofpixelintensities(asinFig.9B)isneededsincethemethodassumes
theimageconsistsofadarkforegroundonalightbackground.Theimagecorrectionisappliedbydividingtheoriginalimagebytheresultantilluminationfunctioni.e.,usingDivideinCorrectIllumination–Apply.ThismethodproducestheilluminationcorrectionfunctionshowninFig.10B.Applyingthisilluminationfunctiontotheoriginalimageyieldsacorrectedimageinwhichthebackgroundilluminationwithinthewellisabsent(Fig.10C).
Figure10:Imagesoftherawimage(A),theilluminationcorrectionfunction(B)andthecorrectedimage(C).
A B C
Recommended