Login  Register

Re: Need trouble shooting advice for deconvolution

Posted by Daniel James White on Jun 15, 2010; 7:48am
URL: http://imagej.273.s1.nabble.com/Need-trouble-shooting-advice-for-deconvolution-tp3687551p3687552.html

>
> Date:    Mon, 14 Jun 2010 15:15:06 -0700
> From:    daschneider9 <[hidden email]>
> Subject: Re: Need trouble shooting advice for deconvolution
>
> Piotr,
>
> Thank you for your suggesting. The original zvi file stores each channel as
> 16 bit grey scale. Am I correct that I should not rescale these to 32 bit
> befoer deconvolution?

you dont need to do it manually.

Your CCD camera is probably 12 bit .... (you should know that)
so it counts up to 4095.
So long as there are no 4095 pixels in the image stack then image is not saturated.
Also, since imageJ/Fiji will open them as 16 bit images,
you have all the numbers from 4095 to 65000 ish to grow up into during the contrast enhancement of  deconvolution.
In fact, as Piotr describes, it actually done in 32 bit float, with masses of dynamic range and precision.

In the end, you need to make sure you to the auto contrast on the result just ot make sure it is displayed within the range of your display (which is only 8 bit)
You might notice that the image seems to be rather dark at the end...
dont worry, thats because the contrast is now so huge, that the bright objets are so much brighter than the dimmer ones,
that your eyes cant see the dim ones from black. Here is where the Fire LUT comes in handy.
There is much more dynamic range in the result than your display can show and your eyes can see with greyscale LUT.

>
> Dave
> --
> View this message in context: http://imagej.588099.n2.nabble.com/Need-trouble-shooting-advice-for-deconvolution-tp5172219p5179557.html
> Sent from the ImageJ mailing list archive at Nabble.com.
> On Jun 15, 2010, at 6:00 AM, IMAGEJ automatic digest system wrote:
>
>
> Date:    Mon, 14 Jun 2010 17:11:13 -0700
> From:    daschneider9 <[hidden email]>
> Subject: Re: Fwd:  Need trouble shooting advice for deconvolution
>
> Dan,
>
> Thank you. I'll try to respond to all your questions:
>
>
> Daniel James White wrote:
>>
>> The bead image shows there is quote bad spherical aberration. The PSF is
>> not symmetrical in Z. If the bead is mounted in different stuff than the
>> sample is, and the sample is more than a micron or 2 away from the
>> coverglass, then it might not be the right PSF for deconvolving the image
>> stack, as the spherical aberration will not be the same.
>
> Is this z-asymetry not typical of widefield or is it particularly bad in my
> image stack?

If

1) the refractive indexed are carefully matched (sample and immersion oil)
2) the coverglass is the correct thickness
        (high NA oil and W lenses are  designed for exactly 0.17mm!
        normal number 1.5 glasses are anywhere from 0.16-0.19
        and vary greatly from batch to batch. You need the more expensive high precision ones from Zeiss, or Hecht Assistent etc. )
3) the lens has not been dropped or scratched

then there should be 0 spherical aberration and the PSF will be very close to symmetrical in Z.

The DeltaVision microscope system comes with a range of immersion oils with different RI
so you can correct for any spherical aberration in your system by using the right RI oil.
Nice trick.

For non dehydrated / watery samples,
I suggest a highly corrected Water immersion lens as made my Zeiss and olymopus and others.
eg 60x 1.2 Water Korr.
The effective NA of the lens is limited by the RI of the sample,
so if it is watery (RI 1.34) then having a NA 1.4 oil imersion lens in no help.

If your samples are thick, then the spherical abberation problem gets worse and worse with depth in Z,
so a water immersion lens for a watery sample is an even better idea.

For a thick sample mounted in Glycerol ish medium, a glycerol immersion lens would be nice.

>
> The slide, coverglass, z-step distance, image dimension were all the same
> for specimen and PSF images.

If you used normal 1.5 coverglasses (please tell me they were not number 1!!!!!)
then they might be close to beng the same.... but they miught not be, see above.
For high resolution microscopy you must use the high precision coverslides.

>
> The PS-Speck slide used to create this PSF image was made by me as described
> by the manufacturer. Basically dried diluted PS-Speck onto a slide

nope, dry the beads on to the coverglass, not the slide.

> and then
> used the provided coverslip media.

no good really, unless you know its refractive index.
mowiol/Dabco for dead dehydrated samples works but it can shrink the sample and distort it.
Modern glycerol non hard setting media are great,
eg prolong gold , etc.

> I too wondered about the potential for
> different indices for the two mounting mediums used. I will make a new
> PS-Speck slide with the mounting media used on the specimen slide.
> However,...


that a very good idea.

>
>
> Daniel James White wrote:
>>
>> You must make sure the coverslip thickness is exactly the same for the
>> bead sample and the actual sample, else again you will get different
>> spherical aberration of the PSF.
>>
>
> So is it best to dry the PS-Specks onto the slide (which is how the 5-um
> specimen sections were processed) or onto the coverslip?

Always the coverslip.... if you dry them on.
Else you can use a hard setting medium (for the sample aswell)
and suspend the beads in that,
so a bead of interest might be about the same distance from the coverslide as the sample is .

>
>
> Daniel James White wrote:
>>
>> But are the pixel spacings the same for the real image stack and the bead
>> stack? Same optovar? Same Camera, same binning? Same z-spacing?
>>
>
> Yes. All of these details are the same. Sometimes the number of slices
> captured is different,

thats OK

> but not the z-spacing.

Good.

Actually, if you like, one can oversample the bead image to get a even better PSF with more high frequency info in it,
(say 40nm in xy and 100 nm in z... so long as there is no bleaching)
but then you really need to resample it down to the voxel spacing of the sample image for the deconvolution....
so maybe no point in this case.

> I always center the best focal
> plane of the bead within the stack used for deconv (presuming that is best).

the PSF must be exactly centered!!!!
In X Y and Z or else you will generate garbage.

The Fourier transforms in the methods will be wrong if the PSF is not perfectly centered.  

>
>
> Daniel James White wrote:
>>
>> open the zvi file directly using the LOCI bio-formats
>> importer-plugins-LOCI-bio-formats importer.
>>
>
> I can do that. However I get the following exception log after opening using
> the separate channels option only:
>
> java.lang.NullPointerException
> at ij.gui.ImageWindow.close(ImageWindow.java:371)
> at ij.gui.StackWindow.close(StackWindow.java:139)
> at ij.ImagePlus.close(ImagePlus.java:331)
> at loci.plugins.importer.Importer.displayStack(Importer.java:691)
> at loci.plugins.importer.Importer.showStack(Importer.java:559)
> at loci.plugins.importer.Importer.run(Importer.java:401)
> at loci.plugins.LociImporter.run(LociImporter.java:77)
> at ij.IJ.runUserPlugIn(IJ.java:189)
> at ij.IJ.runPlugIn(IJ.java:155)
> at ij.Executer.runCommand(Executer.java:147)
> at ij.Executer.run(Executer.java:78)
> at java.lang.Thread.run(Thread.java:619)

Ummm, yeah, that can happen with zvi file currently with bio-fortmats... i think they know about it,
but you could send the bio-foromats team a sample image that behaves badly.

>
> The images seem fine despite this message. They are 16 bit as expected and
> not B/C adjusted.  Do I need to do B/C adjustment (pressing auto and then
> apply) before deconvolution?

Nope, only if ou want it to be Displayed nicer  on the screen.

> I tested with and without doing this and see no
> apparent difference.
>
indeed it should make no difference.

>
> Daniel James White wrote:
>>
>> ...you can subtract 10 from the whole image using Process - math -
>> subtract.
>> you might also want to so sometinhg similar in the sample  image .
>>
>
> Yes, this does improve the deconv image some. Slightly better when the same
> is done to specimen image.

deciding the background in the bead image is rather easy.
But in the sample its harder.
You can take a background image of an area in the sample where there are no objects
using the same filter and CCD exposure time, and use that mean value.

Donr use a rolling ball or other hard threshold.
What you want to remove is the +ve offset and dark current background  of the ccd camera.
But not remove any real fluorescence intensity.

>
>
> Daniel James White wrote:
>>
>> For some of the methods 5 iterations might not be nearly enough.
>>
>
> I agree but the abberations only get worse with more interation and I was
> just trying to show how badly things were right off the starting block.
>

that means that the PSF is very wrong and/or the imput image data is intensity clipped/saturated.

>
> Daniel James White wrote:
>>
>> the images you posted are all very bady saturated.... this is because you
>> made the 8 bit, and then im bot sure the deconvolution handles 8 bit
>> images properly....you needs 16 bit ot even 32 bit fload images for the
>> deconv to not run out of headroom. Deconv will greatly increase the
>> dynamic range of the image....
>>
>
> Yes, the 8 bit conversion is a mistake I should not have made and I thank
> you and Poitr for pointing this out--A rooky mistake for sure.

You are by no means the only one who made that mistake.
I spend a lot of time trying to convince people to think of digital images as just a bunch of numbers.... not analogue art
(I'm really a spectroscopist you see......)
the fisrt thing i always do when i open an image is immediately look at the intensity histogram (analyse - histogram)
in log scale for fluorescence, as only in that representation can you really see intensity clipping and bad 0 offsets!!!

> However, I
> still get the "oversaturated" appearance of the 16 bit images imported from
> zvi using LOCI and after first subtracting background.

before or after deconv.
Go to the middle of the stack where there is stuff,
and do the auto brightness/contrast there.

> Separation of the
> different organisms is better than before, but are still appearing to be
> nearly saturated after deconv.

it might just be the display that needs adjusting.

> Am I still missing something else? Perhaps
> there is still too many problems as yet with my PSF. I'll get on making new
> PSF files and try again.

try and get your system to have as little spherical aberation as possible,
it greatly improves resolution, esp in z, and also strongly increases contrast.
>
> I'd be happy to post the original zvi files (~16 MB each) but nabble is
> refusing them (too big is the reply). Is there another site people are using
> for posting such image links? I will also provide them directly to any who
> would like to help.

there are a bunch of file share sites, but they are mostly annoying....
I have a drop box account....

>
> I can't thank you enough for your time. I really apprecaite the linked
> resources as well. I've read them a few times but obviously have to keep
> re-reading them to see what details I'm not picking up on.

any questions, just yell.
>
> I look forward to more questions/suggestions. I really want to learn how to
> do this appropriately.

So do I, and I am also still learning!


cheers

Damn


>
> Dave
> --
> View this message in context: http://imagej.588099.n2.nabble.com/Fwd-Need-trouble-shooting-advice-for-deconvolution-tp5177845p5179893.html
> Sent from the ImageJ mailing list archive at Nabble.com.

Dr. Daniel James White BSc. (Hons.) PhD
Senior Microscopist / Image Visualisation, Processing and Analysis
Light Microscopy and Image Processing Facilities
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 DRESDEN
Germany

+49 (0)15114966933 (German Mobile)
+49 (0)351 210 2627 (Work phone at MPI-CBG)
+49 (0)351 210 1078 (Fax MPI-CBG LMF)

http://www.bioimagexd.net  BioImageXD
http://pacific.mpi-cbg.de                Fiji -  is just ImageJ (Batteries Included)
http://www.chalkie.org.uk                Dan's Homepages
https://ifn.mpi-cbg.de  Dresden Imaging Facility Network
dan (at) chalkie.org.uk
( white (at) mpi-cbg.de )