This macro calculates the inverse cosine of every pixel in a 32-bit
stack.
w=getWidth; h=getHeight;
for (i=1; i<=nSlices; i++) {
showStatus(i+"/"+nSlices);
setSlice(i);
for (y=0; y<h; y++) {
for (x=0; x<w; x++) {
value = getPixel(x,y);
setPixel(x, y, acos(value));
}
}
}
-wayne
On Aug 21, 2007, at 9:41 PM, Shelley wrote:
> Hello
> I opened a 3d dataset and try to get inverse cosine of the intensity
> of each
> pixel, but the math functions only allow me to do simple algebraic
> calculations such as add/subtract/multiply/divide, etc.
>
> any way I can get acos of a stack? or even just a 2D image?
>
> thank you!!
>