Hi Haider,
On Jul 8, 2014, at 12:54, haider <
[hidden email]> wrote:
> IJ.runPlugIn('plugin.Filters3D.MEDIAN', 'imp')
>
> When I print image pixels statistics before and after, I see no difference.
Using the macro recorder I get IJ.run(imp, "Median 3D...", "x=4 y=4 z=4")
which works. But why not use the ImageJ API directly?
from ij import IJ
from ij import ImagePlus
from ij.plugin import Filters3D
# 1. get image
get = IJ.openImage("
http://imagej.net/images/clown.jpg");
# 2. get the image stack within the ImagePlus
stack = get.getStack()
# 3. Instantiate plugin [1]
f3d = Filters3D()
# 4. Retrieve filtered stack
newStack = f3d.filter(stack, f3d.MEDIAN, 4.0, 4.0, 4.0)
# 5. Construct an ImagePlus from the stack
newImage = ImagePlus("Filtered Clown", newStack);
# 6. Display result
newImage.show()
-tiago
[1]
http://imagej.nih.gov/ij/developer/api/index.html?ij/plugin/Filters3D.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html