ImageJ
ImageJ copied to clipboard
3D filter on hyperstacks
Hello,
I didn't find an opened issue on this so here it is. The filter3d function behaves differently on stacks and hyperstack in an unexpected way. Here is an example:
function test(type, nframes) {
newImage("HyperStack", type + " grayscale-mode", 300, 200, 1, 10, nframes);
for (t = 1; t <= 20; t++) {
Stack.setFrame(t);
for (z = 1; z <= 4; z++) {
Stack.setSlice(z);
makeOval(50, 50, 200, 100);
setColor(1);
fill();
}
}
run("Select None");
run("Maximum 3D...", "x=2 y=2 z=2");
Stack.setFrame(1);
Stack.setSlice(10);
val = getPixel(150,100);
setMinAndMax(0, 1);
if (val == 0) print(type + ", nframes :" +nframes + ": ok");
else print(type + ", nframes :" +nframes + ": failed");
}
run("Close All");
for (nframes = 1; nframes <= 3; nframes++) {
test("8-bit",nframes);
}