-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Description
Hi,
I have successfully setup and used Py ImageJ. However, I am not able to call upon any of the numerous plugins from python.
from skimage import io
import cv2
import os
import imagej
ij = imagej.init('<my-local-path>/Fiji.app')
import imglyb
from PIL import Image
Returns:
Added 375 JARs to the Java classpath.
However, when I attempt to run a Macro:
def improve_raw(impath):
macro = """open("{}");
run("Normalize Local Contrast", "block_radius_x=40 block_radius_y=40 standard_deviations=3 center stretch");
run("Enhance Local Contrast (CLAHE)", "blocksize=127 histogram=256 maximum=3 mask=*None*");
run("Gaussian Blur 3D...", "x=2 y=2 z=2");
saveAs("TIFF", "{}");""".format(impath, impath.replace("Tiff_masks", "Tiff_masks_cleaned"))
ij.script().run('Macro.ijm', macro, True).get()
return(1)
I receive the following error message:
Unrecognized command: "Normalize Local Contrast"
The macro successfully runs from within ImageJ. Any idea why the same macro doesn't work from within Python?
Thanks.
Best,
Noah
Metadata
Metadata
Assignees
Labels
No labels