Hi there,
I have a 1 frame, 2 channels, 50 z slices image file that I want to apply a adaptive threshold to. But I only want to apply the threshold to the 1st channel. So I wrote the following macro:
selectWindow("x");
run("8-bit");
Stack.getDimensions(width, height, channels, slices, frames);
Stack.setChannel(1);
for(z=1; z<slices; z++){
setSlice(z);
run("adaptiveThr ", "using=Mean from=127 then=-100 stack");
}
However, I`m getting the first half (the first 25 slices) of both channels analyzed instead of getting the whole 50 slices of channel 1 analyzed. The second half of both channels are left alone. I was wondering what have I done wrong here.
Thanks for any suggestions!