CONFOCALMICROSCOPY Archives

November 2008

CONFOCALMICROSCOPY@LISTS.UMN.EDU

Options: Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gelman, Laurent" <[log in to unmask]>
Reply To:
Confocal Microscopy List <[log in to unmask]>
Date:
Tue, 25 Nov 2008 11:21:51 +0100
Content-Type:
multipart/mixed
Parts/Attachments:
 

From: Gelman, Laurent 
Sent: mardi, 25. novembre 2008 11:20
To: 'Confocal Microscopy List'
Subject: RE: Protocol for imaging micro beads?

 

Hi Stuart,

 

In order to be able to assess and compare the performance of our
different microscopes over time and also to be able to compare our PSFs
with those obtained at other facilities, we have written a macro for
ImageJ which I attach to this mail. We started also to distribute it to
several facilities and hope we can collect after a while enough pictures
to know really how microscopes in different facilities really perform.

 

We make Point Spread Functions every week for all objectives on our
High-end microscopes on the facility. On our confocals, we typically
take 256x256 pixel images, with a pixel size of 60 to 70nm (zoom is
adjusted for each magnification). We actually make a stack with 100
planes separated by 200nm. Pixel dwell time ranges typically from 2us to
5us. Images are 12-bit.

 

In short, the Macro crops the image to make a region of 15uM around the
center of the bead, which is determined by the user by right-clicking on
it. It then makes XZ and XY projections of the PSF, displays them in a
window of 550x550 pixels together with the MIP of the stack (I can send
an example on request directly per e-mail). It also fit the PSF with a
Gaussian function and extracts FWHM laterally and axially. The functions
and the fits are displayed behind the PSF (one gets at the end a stack
with 2 slices, the PSF on slice#1 and the curves on slice#2).

 

We use beads from Molecular probes (PS-Speck microscope point source
kit, P-7220) and never experienced any photobleaching. We make a
1/10'000 dilution of the beads, lay tiny drops on a slide and let them
dry. Then we add a drop mounting medium (in our case Prolong Gold) and
cover with a coverslide.

 

Do not hesitate to contact me if you have any question or idea to
improve the Macro. I would be glad also if you would accept after a
while to send me some of your PSFs (even if you don't work on a
facility), so I could compare all the PSFs I would get from different
places. I would send this back to all interested users, so everybody can
know how his scopes perform in comparison with others.

 

Very best regards,

 

Laurent.

 

 

 

________________

 

Installation and use of the Macro:

 

You need to install the each time you start ImageJ. Go to
>Plugins>Macros>Install... Select it in the dialog window and click
"open".

 

To run it, you need before to open a stack. Remember, we take stacks of
100 planes, spaced by 0.2um, for all objectives and all microscopes.

Then go to >Plugins>Macros>MIPs for PSFs for all microscopes V2 to run
the Macro.

 

Automatic Macro actions / User actions:

A. Selects the plane with the highest pixel intensity, adjusts display
settings, opens the information dialog box.

1. Enter information in the dialog window which popped up.

2. Zoom in the image to clearly localize the center of the bead (you can
also navigate between planes if needed).

3. Right clicks with the mouse on the center of the bead.

B. Crops the image to get 15umx15um area centered over the pixel clicked
by the user.

C. Makes projections in X and Y of the stack

D. Stitches together the cropped area and the projections

E. Estimates and subtracts background

F. Takes the square root of the image (to minimize photon noise and to
mimic a decrease in histogram gain)

G. Resizes the image to 550x550 pixels, adjusts display, changes LUT and
rename the picture with a standardized name: Date_Scope
name_Magnification_NA.

H. Extracts FWHM and displays curves.

 

Of course you can customize the Macro as we did, for example we don't
enter the name of the scope but we have a scrolling list with our scopes
and the pixel size is then calculated automatically based on the
magnification and the pixel size of our camera chips (for wide-field
microscopes). Only when a LSM scope is selected a second window pops up
asking for pixel size. We have also an additional information about the
presence of an optovar in some of our systems.

 

 

______________________________________

Laurent Gelman, PhD

Friedrich Miescher Institut

Facility for Advanced Imaging and Microscopy

WRO 1066.2.16

Maulbeerstrasse 66

CH-4058 Basel

Tel.: 061 696 43 38 / Cell phone: 079 618 73 69

www.fmi.ch <http://www.fmi.ch/> 

[log in to unmask]

 

 

 




setBatchMode(false); // Select the slice with highest intensity and Set display; Maxstack=0; Minstack=65500; OptSlice=0; for (i=1; i<nSlices+1; i++) { setSlice(i); getStatistics(area, mean, min, max, std, histogram); if (max>Maxstack) { Maxstack=max; Minstack=min; OptSlice=i; } } setSlice(OptSlice); setMinAndMax(Minstack, Maxstack); // Get info on the setup; getDateAndTime(year, month, dayOfWeek, dayOfMonth, hour, minute, second, msec); Dayadjust = ""; if (dayOfMonth<10) {Dayadjust = "0";} month=month+1; Monthadjust = ""; if (month<10) {Monthadjust = "0";} date = ""+year+"-"+Monthadjust+month+"-"+Dayadjust+dayOfMonth; Dialog.create("Image and microscope information"); Dialog.addString("Microscope Name:", ""); Dialog.addNumber("Magnification:", 100); Dialog.addString("NA:", "1.4"); Dialog.addNumber("Pixel size (nm):", 60); Dialog.addString("Date:", date); Dialog.show(); microscope = Dialog.getString(); MA = Dialog.getNumber(); NA = Dialog.getString(); xyVoxel = Dialog.getNumber(); date = Dialog.getString(); MainName=date+"_"+microscope+"_"+MA+"x_"+NA; zVoxel=200; setVoxelSize(xyVoxel, xyVoxel, zVoxel, "nm"); rename("Stack"); ROIsize=round(15000/xyVoxel); halfROIsize = round(ROIsize/2); boucle=1; while (boucle!=0) { getCursorLoc(x, y, z, flags); if (flags==4) boucle=0; } OptSlice=z; zProfileX = newArray(100); zProfileY = newArray(100); for (i=0; i<nSlices; i++) { setSlice(i+1); zProfileX[i] = i; zProfileY[i] = getPixel(x, y); } xROI=x-halfROIsize; yROI=y-halfROIsize; makeRectangle(xROI, yROI, ROIsize, ROIsize); run("Crop"); run("32-bit"); run("Duplicate...", "title=[Stack FWHM] duplicate"); // _______________________Projections_______________________ ; selectWindow("Stack"); makeLine(0, halfROIsize, ROIsize, halfROIsize); run("Reslice [/]...", "input="+zVoxel+" output="+zVoxel+" slice=1"); rename ("xProj"); H=getHeight(); selectWindow("Stack"); makeLine(halfROIsize, 0, halfROIsize, ROIsize); run("Reslice [/]...", "input="+zVoxel+" output="+zVoxel+" slice=1 rotate"); rename ("yProj"); selectWindow("Stack"); SliceNum=getSliceNumber(); run("Z Project...", "start=1 stop="+SliceNum+" projection=[Max Intensity]"); rename("Project"); ProjectWidth=ROIsize+H; run("Canvas Size...", "width="+ProjectWidth+" height="+ProjectWidth+" position=Top-Left zero"); selectWindow("yProj"); run("Canvas Size...", "width="+ProjectWidth+" height="+ProjectWidth+" position=Top-Right zero"); selectWindow("xProj"); run("Canvas Size...", "width="+ProjectWidth+" height="+ProjectWidth+" position=Bottom-Left zero"); run("Image Calculator...", "image1=Project operation=Add image2=xProj"); selectWindow("Project"); run("Image Calculator...", "image1=Project operation=Add image2=yProj"); run("Size...", "width=550 height=550 constrain interpolate"); selectWindow("Stack"); close(); selectWindow("xProj"); close(); selectWindow("yProj"); close(); selectWindow("Project"); run("Square Root"); ROIsizeBG = round(ROIsize/10); makeRectangle(ROIsizeBG, ROIsizeBG, ROIsizeBG, ROIsizeBG); getStatistics(area, mean, min, max, std, histogram); minSelection=min; run("Select None"); getStatistics(area, mean, min, max, std, histogram); setMinAndMax(minSelection, max); run("Fire"); run("8-bit"); run("RGB Color"); // _______________________FWHM axial_______________________ ; selectWindow("Stack FWHM"); Fit.doFit("Gaussian", zProfileX, zProfileY); a=Fit.p(0); b=Fit.p(1); c=Fit.p(2); d=Fit.p(3); // Plot ; Amplitude = 40; XplotLatReal = newArray(Amplitude); YplotLatReal = newArray(Amplitude); MaxGraph = 0; for (i=0; i<Amplitude; i++) { XplotLatReal[i] = (i-Amplitude/2)*zVoxel; YplotLatReal[i] = zProfileY[OptSlice-Amplitude/2+i]; if (YplotLatReal[i]>=MaxGraph) {MaxGraph = YplotLatReal[i];} } XplotLatFit = newArray(Amplitude*4); YplotLatFit = newArray(Amplitude*4); Ymin=66000; Ymax=0; for (i=0; i<Amplitude*4; i++) { XplotLatFit[i] = (i/4-Amplitude/2)*zVoxel; X = OptSlice-Amplitude/2+i/4; YplotLatFit[i] = a + (b-a)*exp(-(X-c)*(X-c)/(2*d*d)); if (YplotLatFit[i]>=MaxGraph) {MaxGraph = YplotLatFit[i];} if (Ymin>YplotLatFit[i]) {Ymin=YplotLatFit[i];} if (Ymax<YplotLatFit[i]) {Ymax=YplotLatFit[i];} } HM=(Ymax-Ymin)/2; k=-2*d*d*log((HM-a)/(b-a)); FWHMa=2*zVoxel*sqrt(k); Plot.create("FWHM axial", "Z", "Intensity", XplotLatFit, YplotLatFit); Plot.setLimits(-4000, 4000, 0, MaxGraph*1.1); Plot.add("circles", XplotLatReal, YplotLatReal); Text="FWHM axial ="+d2s(FWHMa,0)+"nm"; Plot.addText(Text, 0, 0); Plot.show(); run("Canvas Size...", "width=528 height=510 position=Bottom-Center zero"); // _______________________FWHM lateral_______________________ ; x = newArray(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8); selectWindow("Stack FWHM"); setSlice(OptSlice); makeLine(halfROIsize-8, halfROIsize, halfROIsize+8, halfROIsize); y = getProfile(); Fit.doFit("Gaussian", x, y); a=Fit.p(0); b=Fit.p(1); c=Fit.p(2); d=Fit.p(3); // Plot ; XplotLatReal = newArray(17); YplotLatReal = newArray(17); Ymin=66000; Ymax=0; MaxGraph = 0; for (i=0; i<17; i++) { XplotLatReal[i] = (i-8)*xyVoxel; YplotLatReal[i] = y[i]; if (y[i]>=MaxGraph) {MaxGraph = y[i];} } XplotLatFit = newArray(65); YplotLatFit = newArray(65); for (i=0; i<65; i++) { XplotLatFit[i] = (i/4-8)*xyVoxel; X = i/4-8; YplotLatFit[i] = a + (b-a)*exp(-(X-c)*(X-c)/(2*d*d)); if (YplotLatFit[i]>=MaxGraph) {MaxGraph = YplotLatFit[i];} if (Ymin>YplotLatFit[i]) {Ymin=YplotLatFit[i];} if (Ymax<YplotLatFit[i]) {Ymax=YplotLatFit[i];} } HM=(Ymax-Ymin)/2; k=-2*d*d*log((HM-a)/(b-a)); FWHMl=2*xyVoxel*sqrt(k); Plot.create("FWHM lateral", "X", "Intensity", XplotLatFit, YplotLatFit); Plot.setLimits(-8*xyVoxel, 8*xyVoxel, 0, MaxGraph*1.1); Plot.add("circles", XplotLatReal, YplotLatReal); //Text="FWHM lateral ="+d2s(FWHMl,0)+"nm"; Plot.addText("FWHM lateral ="+d2s(FWHMl,0)+"nm", 0, 0); Plot.show(); run("Canvas Size...", "width=528 height=510 position=Top-Center zero"); run("Image Calculator...", "image1=[FWHM lateral] operation=Add image2=[FWHM axial]"); run("Canvas Size...", "width=550 height=550 position=Center"); rename("FWHM"); run("RGB Color"); selectWindow("FWHM axial"); close(); selectWindow("Stack FWHM"); close(); MainName=MainName+" FWHMa "+d2s(FWHMa,0)+"nm - FWHMl "+d2s(FWHMl,0)+"nm"; run("Images to Stack"); rename(MainName);

ATOM RSS1 RSS2