This bug can occur in certain circumstances when using ImageJ1 plugins which update a corresponding ImagePlus. It can be worked around by calling
import imagej
ij = imagej.init(['net.imagej:imagej', 'net.imagej:imagej-legacy'])
imp = ij.py.get_img_plus()
Once you have imp
, the ImagePlus
, you can call subsequently use the synchronize_ij1_to_ij2
function to
update it.
ij.py.synchronize_ij1_to_ij2(imp)
The default UI does not currently work on mac. You can set up a Swing UI based GUI instead by initializing with:
import imagej
ij = imagej.init('/Applications/Fiji.app', headless=False)
ij.ui().showUI("swing")
See this thread for additional information and updates.
This is a known error. While we do not have a direct solution, see this thread for a work around
Version 1.2.1 of pyjnius causes several bugs with pyimagej. These bugs can be fixed by using version 1.2.0. These bugs include
libjvm.so not found
AttributeError: 'some.class' object has no attribute 'function'
This error occurs when you import jnius before imagej.init(). Both use the Java Virtual Machine (JVM), so initializing jnius prevents imagej.init from starting up.
If you try to load an ImageJ1 class of path ij.X
, and get a JavaException: Class not found
error, this is because ImageJ was initialized without ImageJ1. See Initialization.md
You can increase the memory available to the JVM before starting ImageJ. See Initialization.md
PyImageJ does not currently ship a log4j implementation, which results in an obnoxious warning at startup:
log4j:WARN No appenders could be found for logger (org.bushe.swing.event.EventService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
This can safely be ignored and will be addressed in a future patch.