30. Insight as Plugin ImageJ/Fiji
To test in: ImageJ, Fiji
Purpose of the test is to check that the OMERO insight works as plugin for ImageJ/Fiji and the bioformats_package.jar or loci_tools.jar missing is not causing a crash.
Test on Linux as well as Windows (XP and Win7 if possible)
Download the
OMERO.insight-ij*build and unzip it [or copy it into] in ImageJ/plugins folder [InsightIJI001]
ImageJ and ImageJ2
Note: You can download ImageJ2 from https://imagej.net/Downloads.
Add neither
bioformats_package.jarnorloci_tools.jarto the Plugins folder of ImageJ (or ImageJ2). If it is there, remove it.Start ImageJ (or ImageJ2) and go
Plugins>OMERO>Connect to OMEROCheck that a popup appears indicating that
bioformats_package.jarorloci_tools.jaris missing.[InsightIJI002]
(For the release-day testing only.) Click on the hyperlink in the popup and Check it brings you to the last release version of Bio-formats. Download
bioformats_package.jar[InsightIJI005] from this Bio-formats release Download page which is being coupled with the OMERO for the release, e.g.https://downloads.openmicroscopy.org/bio-formats/<version>. Note that this does not have to be matching version with the OMERO version, as Bio-formats is decoupled from OMERO.(For non-release-day testing only.) Download
bioformats_package.jarfrom CI in case you are testing a Bio-formats PR.Quit ImageJ. Copy
bioformats_package.jarintoPluginsfolder of ImageJ [InsightIJI001].Restart ImageJ (or ImageJ2), and go
Plugins>OMERO>Connect to OMEROCheck the
bioformats_package.jarversion. To check thebioformats_package.jarversion, open ImageJ (or ImageJ2), goHelp > About Plugins > Bio-Formats PluginsorHelp > About Plugins > LOCI Plugins[InsightIJI004].Check that Insight splashscreen is displayed.
Check that if you rename the
bioformats_package.jartobioformats_package<substitute-any-string>.jarand restart ImageJ, andConnnect to OMERO`again, the Insight plugin still starts and no warning is being displayed.
Log in.
Go to the left-hand pane and select an image or import one if no images available.
Double-click on the image and then click
OKin theBio-Formats Import Optionswindow [InsightIJI006].Check that the image opens in ImageJ [InsightIJI007].
Replace the
bioformats_package.jarwithloci_tools.jarand repeat the steps 3 (on release day only) or 4 (non-release day only) and 5, 6, 7, 8 and 9 (on both release and non-release days).Put both
bioformats_package.jarandloci_tools.jarinto Plugins folder and restart ImageJ (or ImageJ2).Check that a duplication warning appears [InsightIJI007b].
Check that you can still connect to OMERO and open an image.
Go through all steps using ImageJ64 and the platform independent version of ImageJ (download from ImageJ homepage).
ImageJ - ROI and OMERO upload (This section is just pre-release testing scenario (unless stated otherwise), do not do on release day, on release day go to section Fiji)
Open an image in ImageJ, draw regions using IJ toolbar on a particular z, t and c plane and click
Analyze > Tools > ROI Manager. Each time you draw a new region clickAddin theROI Manager(The keytcan be used as keyboard shortcut).export the image using
Plugins > Bio-formats > Bio-formats Exporterto the local drive on your machinemake sure the
Export ROIstickbox in the second dialog (Bio-Formats Exporter Options) is ticked BY DEFAULTclose the image
close the
ROI Managerreimport the saved image using
Plugins > Bio-formats > Bio-formats Importer, selecting the checkboxesDisplay ROIs,Display OME-XML metadataandDisplay Metadatain theBio-formats importeroptions)Check that the OME-XML has all the saved ROIs listed as shown in example below
Check that also the Shape Properties are listed in the OME-XML, for example StrokeColor and StrokeWidth. (See example below. Note: Shape FillColor is not being saved.)
Check that when you tick the
Show alltickbox inROI Manageryou see the regions just as you saved them on the image
example of OME-XML with Shape Properties:
<ROI ID="ROI:0:0" xmlns="http://www.openmicroscopy.org/Schemas/ROI/2015-01">
<Union>
<Shape FillColor="-16776961" ID="Shape:0:0" StrokeColor="65535" StrokeWidth="13.0" StrokeWidthUnit="pixel" Text="0001-0052-0076" TheC="0" TheT="0" TheZ="0">
<Rectangle Height="49.0" Width="91.0" X="31.0" Y="28.0"/>
Import the image you created into OMERO (using OMERO.insight). - Check that the image has regions as you have drawn them in ImageJ and the regions are correctly displayed in Insight and Web.
Repeat steps 1., 2. this time draw regions using IJ toolbar and
Image > Overlay > Add selectionor use the shortcutcmd B. Note that any regions inROI Managerwill be ignored in case the image has anOverlayto it. Do this workflow also for a stack (not hyperstack) image, e.g.test_images_good/tiff/QA images/Artificial_xyt_8bit.tifand for a hyperstack image (e.g. a multi z, c, tdv).Open an image in ImageJ, create a rectangular region, and make a crop (
Image > Crop).create a region in the cropped image and go
Plugins > OMERO > Save Image(s) to OMEROCheck that the Data Manager of Insight opens followed immmediately by Importer [InsightIJI007c]
Select in a row both the radio button options in the Importer
Add image from current windowandAdd image from all image windowsCheck that when you click
Add to Queuethe image(s) gets added to the right-hand pane of importer according to the option of the radio button which you selected.Do not create a new project nor select an existing one, and Check that after you imported, you have the image in Orphaned folder.
Now create a new Project or select an existing project and use the default
New From Folderoption for Dataset andCheck that after import, a new Dataset has been created under the Project you selected/created with the name identical to the folder containing the image opened in ImageJ (e.g. if you opened the image in ImageJ from
users/your_name/localimages/on your machine, the name of the Dataset should belocalimages)
Open 2 images in ImageJ from your local drive and combine the 2 images (
Image > Stacks > Tools > Combine). - goPlugins > OMERO > Save Image(s) to OMERO- Check that the generated image can be added to the queue and imported.Testing
Save ROIs to OMEROfeatureopen an image from OMERO in ImageJ and also
open another image, this time from your local disk (not from OMERO)
draw ROIs on both images, add them to Overlay and select
Save ROIs to OMEROin the first dialog select
Save image from all open windowsoption and clickSaveCheck that another dialog pops up [InsightIJI007e] asking you whether you want to also upload images not yet stored in OMERO
select
Yesand Check that anImport Location...dialog [InsightIJI007f] pops up for selection of P/D to import the image toselect an existing P/D or create a new P/D and click
Add to the QueueCheck that import immediately starts.
Check that the
Results saveditem in Activities pops upCheck that the new image(s) are imported with the associated regions to the chosen location.
Check that also the other image which was already stored in OMERO has the new regions now associated to it in OMERO.
close all images and ROI Manager in ImageJ
Recognizing the image which was freshly uploaded to OMERO.
Open an image from your local drive in imageJ
Use``Save Image(s) to OMERO`` to save the image into OMERO.
Draw a ROI on the image and add it to ROI Manager in ImageJ.
Click
Save ROIs to OMERO.Check that the dialog indicating that the image is not imported does not pop up.
Check that the ROI you just drawn is added to the previously imported image.
Using
Save ROIs to OMEROto upload non-saved images as well.Open at least two images stored in OMERO in ImageJ using the imageJ plugin
draw ROIs on both images and add them to Overlay (use
Alt + B)select
Plugins > Save ROIs to OMEROCheck that a dialog
Save ImageJ Resultspops up [InsightIJI007d]select in a row both
Save image from current windowandSave image from all open windowsradio button optionsselect
Savein the dialog and Check that the regions are now saved in OMERO as chosen in the dialogDraw a ROI and add it to the ROI Manager in ImageJ
crop the image (draw a rectangle encompassing the region you have just drawn and select
Image > Crop)select “Save ROIs to OMERO” item in
Plugins > OMEROCheck that the image is imported as ome-tiff WITH the region you have drawn on it.
close all images and ROI Manager in ImageJ
Draw a ROI specifically on a z or t plane.
open a multi-z and multi-t image stored in OMERO in ImageJ using the ImageJ plugin
draw several ROIs (including an ellipse) in ImageJ on a particular z/t plane(s) and add them to ROI Manager in ImageJ (Note that Overlay in ImageJ does not support t information, but does support the z information.)
also open
test_images_good/tiff/QA images/Artificial_xyt_8bit.tifand draw several ROIs (including ellipse) in IJ on a particular plane and add them to Overlay (Ctrl + B)save the ROI using
Save ROIs to OMEROon both imagesCheck that the ROI in OMERO is associated with the correct z/t plane(s)
in ImageJ, go to
ROI Manager > More > Optionsand tick theAssociate Show All...boxrestart ImageJ
in OMERO, prepare another image with ROIs associated to different z/t planes
open the image you prepared from OMERO in ImageJ using the plugin, ticking the options
Display Metadata,Display OME-XML MetadataandDisplay ROIsoptions in theBio-formats import optionsdialog andCheck that now the ROI is associated to a particular z and t plane(s) in ImageJ and these plane(s) correspond with the plane(s) in OMERO
Check the OME-XML to see if the newly added ROI’s have the correct Z,C and T information.
example of OME-XML with Z, C and T information:
<ROI ID="ROI:0:0" xmlns="http://www.openmicroscopy.org/Schemas/ROI/2015-01">
<Union>
<Shape ID="Shape:0:0" StrokeColor="-1" Text="0611-0860" TheC="1" TheT="1" TheZ="1">
<Rectangle Height="390.0" Width="780.0" X="470.0" Y="416.0"/>
<ROI ID="ROI:1:0" xmlns="http://www.openmicroscopy.org/Schemas/ROI/2015-01">
<Union>
<Shape ID="Shape:1:0" Text="1162-2035" TheC="1" TheT="1" TheZ="1">
<Rectangle Height="584.0" Width="250.0" X="1910.0" Y="870.0"/>
Testing
Save Results to OMEROfeatureopen an image from OMERO in ImageJ, draw an ROI and add to ROI Manager of IJ
go to
Analyze > Measureselect
Plugins > Save Results to OMEROCheck that a dialog
Save ImageJ Resultspops up [InsightIJI007d]input a
<name>for the .csv file to save (do not use periods in the name)Check that the
Results saveditem in Activities pops upCheck that the csv file with the name
<name>.csvis attached to the image in OMEROCheck that when you leave the box for the name empty, the file is named
ImageJ-<NameOfImage>-Results-<Date>.csv
Using
Save Results to OMEROto upload non-saved images as well.Repeat the steps above with an image opened from your local disk
Check that the image is imported and the measurements saved as
<name>.csvfile.
Open and save workflows for images
open a z-stack image from OMERO in ImageJ
open another z-stack image from OMERO in ImageJ
go in IJ
Image > Stacks > Tools > Concatenate...Upload and Save to OMEROthe resulting imageCheck that the concatenated image has been imported successfully
MIF workflows
in ImageJ, using Bio-Formats Importer, open
test_images_good/leica-liff/Beta Catenin.lifselect
Select Allin the popup window and click OK5 images should be open
draw a region on 3 of the images, adding it to Overlay every time
use
Save image(s) to OMEROto upload the MIF and ROIs to OMEROselect in a row
Add images from current windowandAdd images from All open windowto test both workflowsCheck that in both cases, you have the whole MIF imported 1x with each ROI associated with the image you have drawn it on in ImageJ
Fiji
Start Fiji
Go
Help>Update Fiji-> the update process will start. Restart Fiji andCheck that you have the last release version of Bio-formats. To check the Bio-Formats version, go
Help > About Plugins > LOCI Plugins[InsightIJI004]. Note that this does not have to be matching version with the OMERO version, as Bio-formats are decoupled from OMERO.
Add the
OMERO.insight-ij*plugin to thePluginsfolder of Fiji - on Mac, use rigth-click on Fiji icon &Show package content[InsightIJI003] to get toPluginsRestart Fiji
Go
Plugins>OMERO>Connect to OMEROCheck that Insight splashscreen is displayed.
Log in.
Go to the left-hand pane and select an image or import one if no images available.
Double-click on the image and then click
OKin theBio-Formats Import Optionswindow [InsightIJI006].Check that the image opens in Fiji.
Note that during the update, there might be a problem with the class org.joda.time.Instant which can be found here:
/Applications/Fiji.app/jars/jruby.jar
/Applications/Fiji.app/jars/loci_tools.jar
/Applications/Fiji.app/plugins/OMERO.insight-ij-5.0.0-rc1-ice35-b10/libs/joda-time.jar
The warning looks as follows:
WARNING: multiple locations found! java.lang.NoSuchMethodError: org.joda.time.Instant.parse(Ljava/lang/String;Lorg/joda/time/format/DateTimeFormatter;)Lorg/joda/time/Instant;
Solution: Delete the jruby.jar.
InsightIJI001
InsightIJI002
InsightIJI003
InsightIJI004
InsightIJI005
InsightIJI006
InsightIJI007
InsightIJI007b
InsightIJI007c
InsightIJI007d
InsightIJI007e
InsightIJI007f
InsightIJI008
InsightIJI008b
InsightIJI009