Skip to content

Commit

Permalink
Merge pull request #265 from kephale/scijava-repl
Browse files Browse the repository at this point in the history
Add a REPL widget that supports the SciJava ScriptREPL
  • Loading branch information
gselzer authored Oct 1, 2024
2 parents 7052365 + 4dbbc62 commit 3a0fe0b
Show file tree
Hide file tree
Showing 27 changed files with 567 additions and 333 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
# Create env with dev packages
auto-update-conda: true
python-version: "3.10"
miniforge-variant: Mambaforge
miniforge-version: latest
environment-file: dev-environment.yml
# Activate napari-imagej-dev environment
activate-environment: napari-imagej-dev
Expand Down
2 changes: 1 addition & 1 deletion bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd "$dir/.."
modes="
| Testing ImageJ2 + original ImageJ |NAPARI_IMAGEJ_INCLUDE_IMAGEJ_LEGACY=TRUE
| Testing ImageJ2 standalone |NAPARI_IMAGEJ_INCLUDE_IMAGEJ_LEGACY=FALSE
| Testing Fiji Is Just ImageJ(2) |NAPARI_IMAGEJ_IMAGEJ_DIRECTORY_OR_ENDPOINT=sc.fiji:fiji:2.13.1
| Testing Fiji Is Just ImageJ(2) |NAPARI_IMAGEJ_IMAGEJ_DIRECTORY_OR_ENDPOINT=sc.fiji:fiji:2.15.0
"

echo "$modes" | while read mode
Expand Down
10 changes: 10 additions & 0 deletions doc/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ Note that these buttons are only enabled when there is a ``Layer`` that can be t
Using the |advanced export| button, users can provide metadata for richer data transfer to the ImageJ UI

The |import| button can be used to transfer the **active** ImageJ window back into the napari application.

Using the SciJava REPL
--------------------------------

You can use the SciJava REPL to interactively run SciJava code. This makes it possible to do things like paste existing SciJava scripts into the REPL. More information on scripting in SciJava can be found `here <https://imagej.net/scripting/interpreter>`_.

.. figure:: https://media.imagej.net/napari-imagej/0.2.0/script_repl.png

The REPL can be shown/hidden by clicking on the command prompt icon.

4 changes: 4 additions & 0 deletions src/napari_imagej/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@

import scyjava as sj

from napari_imagej.model import NapariImageJ

__author__ = "ImageJ2 developers"
__version__ = sj.get_version("napari-imagej")

nij = NapariImageJ()
Loading

0 comments on commit 3a0fe0b

Please sign in to comment.