Skip to content

hanslovsky/imagey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imagey - ImageJ with CPython REPL

NOTE: Currently, legacy-imglib1-1.1.8.jar cannot be on class path (see #3). This should make it work:

mv /path/to/Fiji.app/jars/legacy-imglib1-<VERSION>.jar{.bkp,}

This uses ImageJ2 because shared memory would not be possible with ImageJ1 ImageProcessor data structures.

Matplotlib inline plot from ImagePlus

Dependencies

  • imglyb
    • Follow build instructions, or
    • install from conda: conda install -c hanslovsky imglib2-imglyb
  • PyQt5
    • Install through your package manager, or
    • pip install pyqt5
  • QtConsole
    • Install through your package manager, or
    • pip install qtconsole
  • Fiji

Run

python /path/to/imagey/imagey/imagey.py [-j '<java options>'] /path/to/Fiji.app

Switch to modern mode:

Help>Switch to Modern Mode

To start the CPython repl, navigate the Fiji menu to

Plugins>Scripting>CPython REPL

For conevenience, these variables are exposed to the IPython interpretor:

Variable Description
ij ImageJ instance
factory ImgFactory instance for numpy convertibale Img
opener ImgOpener instance
display DisplayService used by active ImageJ instance
open_imgs Open all images at path through ImgOpener
open_img Open image at path through ImgOpener
show_img Show image (numpy or imglib2) through DisplayService used by active ImageJ instance
imglyb imglib2-imglyb module
util imglyb.util
types imglyb.types
np numpy package
autoclass jnius.autoclass
cast jnius.cast
java_method jnius.java_method
PythonJavaClass jnius.PythonJavaClass
jnius_config config module for jnius

These keyboard shortcuts are available:

Shortcut Action
C-+ Increase font size
C-- Decrease font size
C-0 Reset font size
C-p Reload initial variables

About

ImageJ with CPython REPL

Resources

Stars

Watchers

Forks

Packages

No packages published