Skip to content

Commit

Permalink
Merge pull request #12 from jburel/cleaning
Browse files Browse the repository at this point in the history
cleaning
  • Loading branch information
jburel committed Jul 13, 2020
2 parents 38eba42 + bd8a5f0 commit dddfd19
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 55 deletions.
35 changes: 13 additions & 22 deletions docs/headless_notebook.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Segment OMERO data using Fiji run headlessly in notebook
========================================================

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

The following examples follow up on the script shown in :doc:`threshold_scripting`.
But, unlike in :doc:`threshold_scripting`, here, Fiji is included into a `Docker <https://www.docker.com/>`_ image and run in headless mode.
Expand All @@ -13,23 +13,19 @@ The scripts are embedded into a Jupyter Notebook. The Groovy language is used, w
- How to crop an image in OMERO using Fiji cropping functionality.


**Setup:**
----------
Fiji has been installed in a Docker image.
Setup
-----
Fiji has been installed in a Docker image using repo2docker.

See also

- https://github.com/ome/training-notebooks/blob/master/Dockerfile
- https://github.com/ome/training-notebooks/tree/master/Fiji
Resources
---------


**Resources:**

- Data: Samples images from the Image Data Resource (IDR) \ https://idr.openmicroscopy.org/webclient/?show=project-51
- Data: Samples images from the Image Data Resource (IDR) `idr0021 <https://idr.openmicroscopy.org/webclient/?show=project-51>`_.
- Macro: :download:`fiji-macro-segment.ijm <../scripts/fiji-macro-segment.ijm>`

**Step-by-Step**
----------------
Step-by-Step
------------

#. Create a Fiji macro, for example by recording it and save it locally. You can for example use adjusted macro created in :doc:`threshold_manual`. See :download:`fiji-macro-segment.ijm <../scripts/fiji-macro-segment.ijm>`.

Expand All @@ -43,9 +39,7 @@ See also

#. Open the *Attachments* harmonica in the right-hand panel and click on the plus icon. Browse and attach the :download:`fiji-macro-segment.ijm <../scripts/fiji-macro-segment.ijm>` to this Dataset as File Annotation.

#. Go to https://idr-analysis.openmicroscopy.org/training

#. Look under *Notebooks > Fiji* for *run_attached_macro.ipynb*.
#. Run the notebook `run_attached_macro.ipynb <https://mybinder.org/v2/gh/ome/omero-guide-fiji/master?filepath=notebooks/run_attached_macro.ipynb>`_.

#. Select the first Step and click on the Run button to execute each step in turn.

Expand All @@ -57,7 +51,7 @@ See also

#. The next cell is asking for input about the types of data which should be saved back to OMERO (ROIs, Results or Images). This is of course dependent on the type of results your Macro is producing in Fiji. For this example, we select ROIs and Results.

#. The script in the next cell will process all the Images in the specified Dataset, applying threshold, analyzing particles, i.e. steps which are captured inside your macro file. Further, it will save ROIs back in OMERO and create a CSV to be attached to each image in that Dataset in OMERO.
#. The script in the next cell will process all the Images in the specified Dataset, applying threshold, analyzing particles, i.e. steps which are captured inside your macro file. Further, it will save ROIs back in OMERO and create a CSV to be attached to each image in that Dataset in OMERO.

#. Return to OMERO.web and open an Image from this Dataset in OMERO.iviewer.

Expand All @@ -77,9 +71,7 @@ See also
#. In the *Settings* tab, turning channels on/off will also show/hide ROIs
assigned to those channels.

#. Go to https://idr-analysis.openmicroscopy.org/training

#. Look under *Notebooks > Fiji* for *crop_image.ipynb*.
#. Run the notebook `crop_image.ipynb <https://mybinder.org/v2/gh/ome/omero-guide-fiji/master?filepath=notebooks/crop_image.ipynb>`_.

#. Run through the notebook, logging in as previously and indicating the Image ID of the image you want to crop.

Expand All @@ -88,4 +80,3 @@ See also
.. |image1| image:: images/threshold_script2.png
:width: 1.89583in
:height: 0.36458in

5 changes: 5 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ Contents:
threshold_scripting
headless_notebook
imagej_python

Contribute
----------

Changes to the documentation or the materials should be made directly in the `omero-guide-fiji repository <https://github.com/ome/omero-guide-fiji>`_.
12 changes: 6 additions & 6 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
How to install the OMERO plugin for Fiji/ImageJ
===============================================

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

Fiji is a free open-source image processing package based on
ImageJ, \ https://imagej.net/Fiji\ . The following workflow should how to
`Fiji <https://imagej.net/Fiji>`__ is a free open-source image processing package based on
ImageJ. 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:**
-----------------------
Setup step-by-step
------------------

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

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

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

The following workflows should work
both with ImageJ and Fiji, after these have been correctly set up with
Expand All @@ -19,20 +19,20 @@ Using the User Interface of the OMERO plugin, we will show:

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

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

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

**Resources:**
Resources
---------

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

..

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

**Example 1: ROIs and measurement creation**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
17 changes: 9 additions & 8 deletions docs/threshold_manual.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Segment manually OMERO data using Fiji/ImageJ
=============================================

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

The following workflows should work both with ImageJ and Fiji,
after these have been correctly set up with
Expand All @@ -19,19 +19,20 @@ Using the User Interface of the OMERO plugin, we will show:

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

**Setup:**
----------
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:**
Resources
---------

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

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

#. Launch Fiji/ImageJ.

Expand Down
21 changes: 11 additions & 10 deletions docs/threshold_scripting.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Segment OMERO data using the Scripting editor in Fiji
=====================================================

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

The following workflows should work in
Fiji, after these have been correctly set up with the OMERO plugin for
Expand All @@ -27,31 +27,32 @@ Using the Scripting editor of Fiji, we will show:

- Save them as a CSV file and link it to the Dataset.

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

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

**Resources:**
Resources
---------

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

- Java API documentation: \ https://docs.openmicroscopy.org/latest/omero/developers/Java.html
- `Java API documentation <https://docs.openmicroscopy.org/latest/omero/developers/Java.html>`__.

- Script: Groovy script for automatic segmentation of images from OMERO using Fiji
- :download:`analyse_dataset_save_rois_and_summary_table.groovy <../scripts/groovy/analyse_dataset_save_rois_and_summary_table.groovy>`.

**Step-by-Step**
----------------
Step-by-Step
------------

We will now repeat the manual analysis :doc:`threshold_manual` on a
Dataset using the scripting facility available in Fiji.

Let’s go over the script to understand the logic and see how it matches
the UI steps.

This script explores the `JAVA API <https://docs.openmicroscopy.org/latest/omero/developers/Java.html>`_ using Groovy.
This script explores the `JAVA API <https://docs.openmicroscopy.org/latest/omero/developers/Java.html>`__ using Groovy.

It will process all the Images in the specified Dataset,
applying threshold, analyzing particles and saving ROIs back in
Expand Down

0 comments on commit dddfd19

Please sign in to comment.