CONFOCALMICROSCOPY Archives

December 2012

CONFOCALMICROSCOPY@LISTS.UMN.EDU

Options: Use Monospaced Font
Show Text 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:
Reply To:
Confocal Microscopy List <[log in to unmask]>
Date:
Sat, 22 Dec 2012 02:25:07 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (175 lines)
*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

George said: " You would be better off taking the median (for 3 pixels, the middle value)"

Something I proposed some years ago ... 

G.C. Cox and Colin Sheppard, 1999  Appropriate Image Processing for Confocal Microscopy.  In: P.C. Cheng, P P Hwang, J L. Wu, G Wang & H Kim (eds) Focus on Multidimensional  Microscopy.  World Scientific Publishing, Singapore, New Jersey, London & Hong Kong.  Volume 2, pp 42-54  ISBN 981-02-3992-0

My method was to use a median filter with a cruciform structuring element (compare a pixel with its immediate neighbours, not diagonal ones).  This scales linearly with the number of dimensions, rather than as the power of the number of dimensions.  Back around 1995, when I did the work, computers weren't so powerful and this was important.  

You can see an example of this on a projection of a 3D stack in my chapter in the Pawley book.  (Given that I admit the original publication is a bit obscure).  

								Guy

-----Original Message-----
From: Confocal Microscopy List [mailto:[log in to unmask]] On Behalf Of George McNamara
Sent: Saturday, 22 December 2012 11:03 AM
To: [log in to unmask]
Subject: Re: "smartass" projection /// PiMP your cells

*****
To join, leave or search the confocal microscopy listserv, go to:
http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
*****

Hi Ronan,

But if the brightest value is noise (ex. high gain PMT, no light), you are averaging a bright noise value with two much dimmer values. You would be better off taking the median (for 3 pixels, the middle value).

///

My University tech transfer office arranged with VIB a license for the Munck et al 2012 PiMP plugin described at
http://jcs.biologists.org/content/early/2012/02/21/jcs.098939
(now free online access for the paper).
I've been using an early version of the plugin for months - it works. 
PiMPing 25 confocal frames (no averaging for each frame) gives a much nicer result than simply averaging the 25 timepoints - an extreme version of what Ronan is talking about.


George
p.s. for PiMPing LSM710 and SP5 inverted data I like to use for 1.4 NA objective lens: 30 nm pixel size (1/2 the 60 nm I usually use to meet sampling criteria), 25 frames, no averaging, modest gain (500, 550 or 600). PiMP runs as a plugin in Fiji ImageJ. simplest to acquire and save one time series, one channel per LSM or LIF file. The PiMP plugin reports the amount of photobleaching - usually is less than the 5% they estimate as being optimal. Works fine anyway.


On 12/21/2012 6:34 AM, Ronan Chéreau wrote:
> *****
> To join, leave or search the confocal microscopy listserv, go to:
> http://lists.umn.edu/cgi-bin/wa?A0=confocalmicroscopy
> *****
>
> Hi fellows,
>
> Following the post on smart average
> (http://labrigger.com/blog/?s=smart+average), I propose another way to 
> perform a projection of a z-stack that does not involve any 
> thresolding or any filtering.
> As when you select the brightest pixel of the z-serie to obtain a 
> maximum projection, my idea is to look for the z-plane from which the 
> brightest pixel was taken and then average this pixel with the ones 
> from the plane before and after.
> As a result, stochastic noise is greatly reduced and the real signal 
> is consolidated knowing that it's always contained in more than one plane.
>
> I think some could be interested in this.
> regards
>
> Ronan Chéreau
>
> Here is the matlab code to perform the projection (2 functions: 1 to 
> do the projection and 1 that is used by the first one to import a 
> imagej like tiff
> stack):
>
>
>
> function result=smartass_projection(tiffstack,name_result,bin)
>
>
> %%%% Ronan Chéreau %%%%% 121030 %%%%
> %Do a max projection but special.
> %Look for the max pixel thru the stack + take the pix before and after 
> in the z-dimension and %average them to give the final image
>
> %INPUTS: tiffstack     name of the tiff stack
> %        name_result   specify a name for the smartass projection image
> %        bin           number of pixels to bin around zmax (1 makes an
> average of 3 pixels)
>
> %REQUIRES: being in the directory that contains the tiff stack
> %          import_tiffstack.m
>
> if nargin==2, bin=1; end
> if nargin==3, end
>
> nb_frames=size(tiffstack,3);
>
> max_proj=zeros(size(tiffstack,1),size(tiffstack,2));
> numero=zeros(size(tiffstack,1),size(tiffstack,2));
> result=zeros(size(tiffstack,1),size(tiffstack,2));
>
>
> %Does a max projection
> for x=1:size(tiffstack,1);
>      for y=1:size(tiffstack,2);
>          max_proj(x,y)=max(tiffstack(x,y,1:nb_frames));
>      end
> end
>
> %Finds the image from which the max pixel is coming from and stores it 
> in %numero.
> for x=1:size(tiffstack,1);
>      for y=1:size(tiffstack,2);
>          for z=1:nb_frames;
>                  if tiffstack(x,y,z)==max_proj(x,y),
>                      numero(x,y)=z;
>                  end
>          end
>      end
> end
>
> %Does the smartass projection: for every x,y position on the stack, it 
> %goes to the z-plane that has the max intensity and average it with 
> the pixel %from the plane before and the plane after.
> for x=1:size(tiffstack,1);
>      for y=1:size(tiffstack,2);
>          if numero(x,y)<bin+1,
>
> result(x,y)=sum(tiffstack(x,y,numero(x,y))+tiffstack(x,y,numero(x,y)+1));
>          elseif numero(x,y)>nb_frames-bin,
>
> result(x,y)=sum(tiffstack(x,y,numero(x,y)-1)+tiffstack(x,y,numero(x,y)));
>          else
>          result(x,y)=sum(tiffstack(x,y,numero(x,y)-bin:numero(x,y)+bin));
>          end
>      end
>
> end
>
> %8 or 16 bit result
> maxpix=max(result(:));
>
> if maxpix>255,
>      result=uint16(result);
> else
>      result=uint8(result);
> end
>
> imwrite(result,name_result,'tif');
>
>
>
>
>
>
> function FinalImage=import_tiffstack(FileTif)
> %from "http://www.matlabtips.com/how-to-load-tiff-stacks-fast-really-fast/"
>
> %Imports a tiff stack.
> %requirement: be in the directory
> InfoImage=imfinfo(FileTif);
> mImage=InfoImage(1).Width;
> nImage=InfoImage(1).Height;
> NumberImages=length(InfoImage);
> FinalImage=zeros(nImage,mImage,NumberImages,'uint16');
>
> TifLink = Tiff(FileTif, 'r');
> for i=1:NumberImages
>     TifLink.setDirectory(i);
>     FinalImage(:,:,i)=TifLink.read();
> end
> TifLink.close();
>
>    

ATOM RSS1 RSS2