Posted by
Daniel James White on
URL: http://imagej.273.s1.nabble.com/Normalising-XY-data-by-Z-direction-in-stacks-tp3685096p3685097.html
Hi James,
On Apr 8, 2011, at 2:13 AM, IMAGEJ automatic digest system wrote:
> Date: Thu, 7 Apr 2011 16:14:56 +0800
> From: James Cleverley <
[hidden email]>
> Subject: Normalising XY data by Z-direction in stacks
>
> Hi All,
>
> I am using ImageJ to process spatial XANES maps where we map an area in X-Y and each image is taken at a different energy over a specific element K-edge.
Interesting.... in a former life I did EXAFS on molybdenum complexes.... Mop, and ModG molybdate binding proteins....
> By combining into a stack the Z direction represents energy step and the pixel records intensity. Because the data is slightly noisy and I am only interested in peak positions I would like to normalise the data in the stack by z-direction so that the intensities at each X-Y position are scaled throughout the Z-direction to between 0 and 1. In other words if I plot a Z-profile for a single pixel in the stack it will show a profile scaled between 0 and 1.
Ok, so mathematically speaking its easy....
convert the whole image to 32 bit if its not alrady (Image - type- 32 bit)
Measure the mean intensity of each z slice,
and divide each slice by that mean
Now there is the same mean intensity in each z slice,
you can make the plot profile,
save the plot x, y numbers from that
then normalize those from 0 - 1 in a spread sheet, mat lab, R etc.
if you wanted you could make a little macro or script, that
iterates through the z stack , finds the mean of each one,
and divides that slice by that mean.
see
http://pacific.mpi-cbg.de/wiki/index.php/Introduction_into_Macro_Programminghttp://pacific.mpi-cbg.de/wiki/index.php/Jython_Scripting
>
> I have searched high and low but can't seem to find the method to do this exact problem. Does anyone have a suggestion?
>
you could also pretend the stack is a time sereis, and do a "bleaching correction"
which attempts to correct images for gradula lodd of intensity down the stack...
but it might not work in your case, if expects a high start, and a gradual loss of signal...
not sure how it works, but you can look at the code and see...
http://www.embl.de/eamnet/html/bleach_correction.htmlcheers
Dan
> Thanks
>
> James
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 )