|
Re: RGB to 32 Bit Gray: msg#00115java.imagej
I tried your Macro (IJ 1.35g, Windows XP). It worked however the resulting 32 bit gray image turned out to be inverted,a matter of byte order?? The newImage() function was creating an image with an inverting lookup table. Adding 'black' (fill with black) to the second argument fixes the problem. Here is the updated macro. if (bitDepth!=24) exit("RGB image required"); setBatchMode(true); w = getWidth; h = getHeight; rgb = getImageID; newImage("32-bit", "32-bit black", w, h, 1); float = getImageID; for (y=0; y<h; y++) { showProgress(y, h); for (x=0; x<w; x++) { selectImage(rgb); v = getPixel(x,y)&0xffffff; selectImage(float); setPixel(x, y, v); } } resetMinAndMax; setBatchMode(false); //run("16-bit"); -wayne
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | fluorescence measurement in discrete regions of moving cells, Thorsten Vetter |
|---|---|
| Next by Date: | Calling a macro from a macro set, H. Gluender |
| Previous by Thread: | RGB to 32 Bit Gray, Phase GmbH |
| Next by Thread: | Re: RGB to 32 Bit Gray, ij-Newsgroup |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |