Skip to content

Commit

Permalink
add fiji steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Aug 23, 2019
1 parent 52f34e1 commit 0d527f2
Show file tree
Hide file tree
Showing 19 changed files with 490 additions and 12 deletions.
Binary file added docs/images/manual1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/manual2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/manual3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/manual4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/manual5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/setup1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/setup2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold_script1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold_script2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold_script3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/threshold_script4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 7 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
Welcome to guide template's documentation!
==========================================
Fiji
====

Contents:

.. toctree::
:maxdepth: 2



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
:maxdepth: 1

installation
manual_analysis
threshold_manual
threshold_scripting
57 changes: 57 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
How to install the OMERO plugin for Fiji/ImageJ
===============================================

Description:
------------

Fiji is a free open-source image processing package based on
ImageJ, \ https://imagej.net/Fiji\ . The following workflow should how to
install the OMERO plugin for Fiji and ImageJ.

The OMERO plugin does not have yet and update site.

**Setup step-by-step:**
-----------------------

We assume that you have already Fiji/ImageJ installed locally.

In this section, we will cover the steps required to install the
OMERO.imagej plugin for Fiji. If you wish to install it for ImageJ,
an additional step is needed.

We first describe how the common installation steps for ImageJ and Fiji.
We then describe how to install the *Bio-Formats Package* for ImageJ.

Installing the OMERO.imagej plugin also adds the dependencies
required to connect to OMERO using the Script Editor of Fiji.

Installation of the OMERO.imagej plugin for Fiji and ImageJ, the
common steps:

- Download from \ https://www.openmicroscopy.org/omero/downloads \
the latest 5.x.x version of ImageJ/Fiji plugin for OMERO

.. image:: images/setup1.png

- Extract the downloaded .zip archive. Remember where you extracted it to.

- Copy the extracted folder and paste it to the *plugins* folder
of Fiji.

- **Note:** Some Windows unzip apps create a double folder enclosing the
plugin. If that is the case, copy the inner OMERO.imagej-5.x.x
folder into *Fiji.app > plugins* folder.

- Now, restart Fiji. If you are using ImageJ, follow with the
additional step below.

**Installation of Bio-Formats Package, ImageJ only:**

- Download the latest version of the *Bio-Formats Package* from:
https://www.openmicroscopy.org/bio-formats/downloads

.. image:: images/setup2.png

- Move the downloaded file into the *ImageJ > plugins* folder.

- Restart ImageJ.
142 changes: 142 additions & 0 deletions docs/manual_analysis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
Analyze manually OMERO data using the OMERO plugin for Fiji/ImageJ
==================================================================

**Description:**
----------------

The following workflows should work
both with ImageJ and Fiji, after these have been correctly set up with
the OMERO plugin for Fiji/ImageJ.

Using the User Interface of the OMERO plugin, we will show:

- How to connect to OMERO using the OMERO plugin for ImageJ/Fiji.

- How to open an image from OMERO.server into Fiji/ImageJ.

- How to manually save ROIs and measurements as CSV back to the
original image in OMERO.server.

- How to import a newly created image from Fiji/ImageJ into OMERO.

**Setup:**
----------

- Install Fiji on the local machine with the OMERO.insight-ij plugin.
The installation instructions can be found at :doc:`installation`.

**Resources:**

- Samples images from the Image Data Resource (IDR) \ https://idr.openmicroscopy.org/webclient/?show=project-51\ .

..
**Step-by-step:**
-----------------

**Example 1: ROIs and measurement creation**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this first example we show how to open an OMERO image in Fiji, draw ROIs, measure those ROIs and show how to save the ROIs and the measurement back to OMERO.

1. Launch Fiji/ImageJ.

2. Go to *Plugins > OMERO > Connect* To OMERO. This will show a login
screen where you can enter the name of the server to connect to,
the username and password. The OMERO plugin will allow you to
browse your data in a similar manner to OMERO.web.

3. In the OMERO login dialog, click the wrench icon\ |image1| and then
add the server address in the dialog. By default, only "localhost"
is listed. Click on the *plus* icon to add a new line to the list
and type into the line the server address.

4. Click Apply.

.. image:: images/manual2.png

5. Enter your credentials and click *Login*.

6. Select the **A-Fiji-dataset** Dataset.

7. Double-click on a thumbnail or on an Image in the left-hand tree to
open an Image in ImageJ.

8. Go to *Analyze > Tools > ROI Manager...*

9. Draw a shape using for example the Freehand selection tool.

10. In the ROI manager, click the button *Add [t]* to add the shape to the
ROI Manager.

.. image:: images/manual3.png

11. Move to another channel, using the *c slider*.

12. Draw other shapes if desired. Add drawing a shape. Click *Add [t]* to
add it to the Manager.

13. When done with the drawing, click the button *Measure* in the ROI Manager.

14. A dialog with measurements for each shape pops up.

15. To save the ROI and the measurement back to OMERO,
go to *Plugins > OMERO > Save ROIs To OMERO*.

16. In the dialog popping up, under the *Save* section select ROI and Measurements.

17. The measurements are saved back to OMERO as a CSV file and linked to
the Image.

.. image:: images/manual4.png

18. Go back to OMERO.web, in the right-hand panel.

19. Select the image opened in Fiji/ImageJ.

20. Check that there is a new CSV file under the Attachments harmonica.

21. Open the image in OMERO.iviewer to the see the ROIs and make sure
that you can interact with them.

**Example 2: Cropping and import**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this example, we show how to open an OMERO image, crop the image and
import the cropped image back to OMERO as OME-TIFF.

In this example we assume that the user is already logged in. If this is
not the case, go back to the first step of Example 1.

1. Select the *A-Fiji-dataset* Dataset.

2. Double-click on a thumbnail or on an Image in the left-hand tree to
open an Image in Fiji/ImageJ.

3. Draw a Rectangle on the Image.

4. Select the option *Image > Crop*.

5. A new Image will be displayed in a Fiji/ImageJ window.

6. Go to *Plugins > OMERO > Save Image(s) To OMERO*.

7. An Import dialog (specific to the OMERO Fiji/ImageJ plugin) will pop up.

.. image:: images/manual5.png

8. Check that the option *Add Image from current window* is selected

9. Select where to import the cropped Image e.g. **A-Fiji-dataset** Dataset.

10. Click *Add to the Queue* button.

11. Then click *Import*. The import will start.

12. When the import is done, go back to the Tree view in the Fiji plugin
or OMERO.web. Refresh. Check the new Image.

.. |image1| image:: images/manual1.png
:width: 0.24105in
:height: 0.24105in

143 changes: 143 additions & 0 deletions docs/threshold_manual.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
Segment manually OMERO data using Fiji/ImageJ
=============================================

**Description:**
----------------

The following workflows should work both with ImageJ and Fiji,
after these have been correctly set up with
the OMERO plugin for Fiji/ImageJ.

Using the User Interface of the OMERO plugin, we will show:

- How to connect to OMERO using the OMERO plugin for Fiji/ImageJ.

- How to open an image from OMERO.server into Fiji/ImageJ.

- How to manually segment an image opened from OMERO in Fiji/ImageJ
using the plugin *Thresholding and Analyze particles* in Fiji/ImageJ.

- How to record this workflow in Fiji/ImageJ, using the *Recorder* plugin, for later use.

**Setup:**
----------

- Fiji has been installed on the local machine with the
OMERO.insight-ij plugin. The installation instructions can be
found at :doc:`installation`.

**Resources:**

- Samples images from the Image Data Resource (IDR) \ https://idr.openmicroscopy.org/webclient/?show=project-51

**Step-by-step:**
-----------------

1. Launch Fiji/ImageJ.

2. Go to *Plugins > OMERO > Connect* To OMERO. This will show a login
screen where you can enter the name of the server to connect to,
the username and password. The OMERO plugin will allow you to
browse your data in a similar manner to OMERO.web.

3. In the OMERO login dialog, click the wrench icon\ |image0| and then
add the server address in the dialog. By default, only "localhost"
is listed. Click on the *plus* icon to add a new line to the list
and type into the line the server address.

4. Click Apply.

..
|image1|

5. Enter your credentials and click *Login*.

6. Browse to the Project **idr0021**, open any Dataset and double-click once
on an Image to open it in Fiji. Bio-Formats is used to view the
Image.

- Make sure to select *View stack with: Hyperstack* in the *Bio-Formats
Import Options* dialog.

- Note that each plane will be transferred from the server to the
client machine so this may take a few moments.

7. To open the Recorder, go *Plugins > Macros > Record...*, select
Macros to record the actions. The steps will then be used in
the Scripting workflow.

8. Convert floating-point pixel-type to 8-bit using *Image > Type > 8-bit*.

9. Go to *Image > Adjust > Auto Threshold*, to open the *Auto Threshold* dialog:

- Select *MaxEntropy* for the *Method* parameter.

- Check the checkbox *Stack*.

..
|image2|\ |image3|

10. Click *OK*.

11. Then open *Analyze > Analyze Particles...*.

12. In the dialog

- Set *Size* to *10-Infinity* and check *Pixel units*.

- Check the following checkboxes:

i. *Display results*

ii. *Clear results*

iii. *Add to Manager*

- Click *OK* then *Yes* in the popup dialog indicating asking to
*Process all X images?*.

..
|image4|

13. To save the thresholded Image back to OMERO with the generated ROIs
and the measurements:

- Select *Plugins > OMERO > Save Image(s) to OMERO*.

- Create a New Dataset for the image

i. Click the *New...* button next to the selection box on the
Dataset row.

ii. In the dialog that pops up, enter a name and a description
(optional).

iii. Click Create.

- The newly created Dataset will automatically be selected.

- Click *Add to the Queue* then *Import*.

- Go to OMERO.web and check that the measurements have been saved
in a CSV file and attached to the Images. The attachment can
then be downloaded at any time.


.. |image0| image:: images/manual1.png
:width: 0.24105in
:height: 0.24105in
.. |image1| image:: images/manual2.png
:width: 5.10938in
:height: 2.5465in
.. |image2| image:: images/threshold1.png
:width: 3.33854in
:height: 3.32695in
.. |image3| image:: images/threshold2.png
:width: 2.25521in
:height: 2.69626in
.. |image4| image:: images/threshold3.png
:width: 2.57813in
:height: 2.5947in

0 comments on commit 0d527f2

Please sign in to comment.