Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add Bio-Formats to a SciJava Jupyter notebook
#@ImageJ ij
// -- Functions --
registerAndCreatePlugin = { pluginClass, pluginType ->
info = new org.scijava.plugin.PluginInfo(pluginClass, pluginType)
registerService = { serviceClass ->
service = registerAndCreatePlugin(serviceClass, org.scijava.service.Service.class)
// -- Add Bio-Formats support --
#@dependency(group = "io.scif", module = "scifio-bf-compat", version = "2.0.3")
#@dependency(group = "ome", module = "formats-gpl", version = "5.5.2")
bff = registerAndCreatePlugin(, io.scif.Format.class)
// -- Load something! --
myAwesomeData ="/path/to/myAwesomeImageThatOnlyBioFormatsCanRead")

This comment has been minimized.

Copy link
Owner Author

@ctrueden ctrueden commented Jun 22, 2017

The above snippet should work for SciJava Jupyter Kernel version 0.4.0.

Future versions of the kernel will improve matters. If you are reading this and the date stamp above is old, please be aware that this gist has probably become obsolete. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.