Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D filter on hyperstacks #237

Open
jboulanger opened this issue Jan 10, 2024 · 0 comments
Open

3D filter on hyperstacks #237

jboulanger opened this issue Jan 10, 2024 · 0 comments

Comments

@jboulanger
Copy link

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);	
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant