Newly added is an initial “ImageJ with Python Kernel” notebook illustrating how to use ImageJ from Python, so that it can be fully combined with other tools available from the Python software ecosystem, including NumPy, SciPy, scikit-image, CellProfiler, OpenCV, ITK and more.
To facilitate this update, I released ImageJ 2.0.0-rc-71 (and Fiji 2.0.0-pre-10) that includes support for images-inside-tables in the vanilla BeakerX Groovy kernel. This is the same code we wrote for the SJJK, but now migrated to imagej-notebook.
The current plan is now to retire the SciJava Jupyter Kernel. If you use this kernel and would prefer it not be retired, please respond here letting us know why not. In my view, the only thing SJJK can do that the Groovy kernel cannot is switch languages per cell, but I personally do not use this feature. It is still possible to mix languages in the Groovy (or other regular BeakerX) kernel by using the script service to run scripts in any supported SciJava script language. Do you know of something else that the SJJK can do that is still missing from plain Groovy notebooks? If so, please speak up, and we can discuss what to do about it.
One huge advantage of plain Groovy notebooks is the
%classpath magic syntax to load whatever artifacts you want upfront, including a specific version of ImageJ itself, so that notebooks are fully reproducible and extensible. SJJK always suffered from the fact that it shipped a particular version of ImageJ, which quickly became outdated, and it was not possible to override this version in the notebook.
One downside of plain Groovy notebooks is that BeakerX always wants to handle rendering of
Map with its
TableDisplay logic. Unfortunately, SciJava
List (I regret this design decision, and am considering changing it, although it would be disruptive to do so), and BeakerX’s built-in table rendering does not support invoking its
Displayer extensions inside table cells. So we cannot register a
Displayer to show the SciJava
Table objects directly as cell outputs. That is why the updated ImageJ tutorial notebooks use
ij.notebook().display([[...]]) around the
[[...]] list-of-maps/table expressions.
The good news is: I have added an extensibility mechanism to
imagej-notebook, such that if a
Converter plugin exists that can go from some type
Foo to a
net.imagej.notebook.mime.MIMEObject (e.g., an
Foo is automatically registered via BeakerX’s
Displayer mechanism. So whenever a cell outputs a
Foo, it will magically render as HTML by calling the appropriate converter.
Happy to elaborate on any of these details with more clarity if anyone is interested; just ask.