An ImageJ plugin to run a script on a batch of images from/to OMERO.
- Install the OMERO.insight plugin (if you haven't already).
- Download the JAR file for this library.
- Download the JAR file (for this plugin).
- Place these JAR files in your "plugins" folder.
Once installed, the plugin is accessible from "Plugins > OMERO > Batch process...".
Specify if you want to process images from OMERO or from a local folder. If you choose "OMERO", a connection window will appear.
If you want to process images from OMERO, once connected, select the dataset you want to process in the "input" panel. You may have to change the group, user or project to get to the required dataset. You can also specify if you want to load ROIs from the images or if these should be removed before saving the results (useful if you want to replace ROIs).
If you chose to process local images, you have to browse and select a folder in the "input" panel. To treat subdirectories, you have to check the "recursive" option.
In the "macro" panel, you have to browse and set the script file that will be used to process each image. If you use the plugin in ImageJ2/Fiji, you should be able to choose a script in any supported language. You can then set the arguments for this script:
- If script parameters are expected in ImageJ2, a window will appear to set the values.
- For ImageJ1 macros, a command line will be passed as an argument (the macro has to use
getArguments()
though).
You also have to specify which output is expected for this script: new image(s), tables, ROIs and/or logs.
Finally, you have to specify if the results have to be saved locally, on OMERO or both. Furthermore, if you save new images, you can set a suffix to append to the images names.
You only have to set the output folder.
You have to select a project you own, or a dataset if you want to save new images. Be aware of the following:
- Only new images will be saved, unless the original image is not owned by the current user and ROIs should be saved.
- If new images are imported:
- ROIs from each image overlay will be saved to the corresponding image.
- ROIs from the ROI manager will be saved to the last image selected in ImageJ.
- If only ROIs are to be saved, they will be added to the input image on OMERO, provided the user has the rights to do so.
As OMERO handles 3D ROIs, it is possible to store these. However, the script used should generate ROIs and add a "ROI" property to each, and set the same numeric value for those who belong to the same 3D object.
Conversely, if ROIs are loaded from OMERO, they will have two properties set, "ROI" and "ROI_ID":
- "ROI" has the 3D ROI local index (eg: for the current image) which contains the 2D shape.
- "ROI_ID" has the OMERO ID corresponding to the 3D ROI the current 2D shape belongs to.