Skip to content

Commit

Permalink
Merge pull request #8 from jburel/links
Browse files Browse the repository at this point in the history
Links
  • Loading branch information
jburel committed Jun 12, 2020
2 parents f64f1bc + e1b4238 commit 10e95f9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
8 changes: 3 additions & 5 deletions docs/headless_notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ See also
**Resources:**

- Data: Samples images from the Image Data Resource (IDR) \ https://idr.openmicroscopy.org/webclient/?show=project-51
- Notebooks https://github.com/ome/training-notebooks/tree/master/Fiji
- Macro: https://github.com/ome/training-scripts/blob/master/practical/other/fiji-macro-segment.ijm
- Macro: :download:`fiji-macro-segment.ijm <../scripts/fiji-macro-segment.ijm>`

**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 https://github.com/ome/training-scripts/blob/master/practical/other/fiji-macro-segment.ijm.
#. 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>`.

**Note:** Not all commands which can be run and recorded in the Fiji user interface can be also run in the Fiji in headless mode.

Expand All @@ -43,7 +41,7 @@ See also

#. Make sure you are selecting your own data. Select the Dataset **A-Fiji-dataset**.

#. Open the *Attachments* harmonica in the right-hand panel and click on the plus icon. Browse and attach the `Fiji macro <https://github.com/ome/training-scripts/blob/master/practical/other/fiji-macro-segment.ijm>`_ to this Dataset as File Annotation.
#. 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

Expand Down
4 changes: 2 additions & 2 deletions docs/threshold_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ Using the User Interface of the OMERO plugin, we will show:
then be downloaded at any time.

#. To save the recorded macro to OMERO.server:
- In Fiji, find the Recorder window and click "Create". A new window will pop up with the macro you just recorded. Verify the macro on a new image. Once the verification succeeds, just close the macro window and in the dialog which pops up select "Yes" to save the macro. Save the macro locally (naded e.g. "your-macco-name.ijm").
- In OMERO.web, select the dataset you would like the macro to be run on and attach the "your-macro-name.ijm" macro you just recorded as file attachment to that dataset. The attachment can then be downloaded at any time. Also, the attached macro can be used by Fiji scripts - see example on https://omero-guides.readthedocs.io/en/latest/fiji/docs/threshold_scripting.html
- In Fiji, find the Recorder window and click "Create". A new window will pop up with the macro you just recorded. Verify the macro on a new image. Once the verification succeeds, just close the macro window and in the dialog which pops up select "Yes" to save the macro. Save the macro locally e.g. "your-macro-name.ijm".
- In OMERO.web, select the dataset you would like the macro to be run on and attach the "your-macro-name.ijm" macro you just recorded as file attachment to that dataset. The attachment can then be downloaded at any time. Also, the attached macro can be used by Fiji scripts - see example on `threshold_scripting.html <https://omero-guides.readthedocs.io/en/latest/fiji/docs/threshold_scripting.html>`_.

.. |image0| image:: images/manual1.png
:width: 0.24105in
Expand Down
9 changes: 4 additions & 5 deletions docs/threshold_scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Using the Scripting editor of Fiji, we will show:
- Java API documentation: \ https://docs.openmicroscopy.org/latest/omero/developers/Java.html

- Script: Groovy script for automatic segmentation of images from OMERO using Fiji
- https://raw.githubusercontent.com/ome/training-scripts/master/practical/groovy/analyse_dataset_save_rois_and_summary_table.groovy
- :download:`analyse_dataset_save_rois_and_summary_table.groovy <../scripts/groovy/analyse_dataset_save_rois_and_summary_table.groovy>`.

**Step-by-Step**
----------------
Expand All @@ -51,8 +51,7 @@ 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 using Groovy.
See \ https://docs.openmicroscopy.org/latest/omero/developers/Java.html\ .
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 All @@ -72,7 +71,7 @@ that Dataset in OMERO.

#. A dialog pops up. In the *Language* menu, select *Groovy*.

#. Copy, into the text script editor of Fiji, the content of the script \ https://raw.githubusercontent.com/ome/training-scripts/master/practical/groovy/analyse_dataset_save_rois_and_summary_table.groovy\.
#. Copy, into the text script editor of Fiji, :download:`analyse_dataset_save_rois_and_summary_table.groovy <../scripts/groovy/analyse_dataset_save_rois_and_summary_table.groovy>`.

#. You will be asked to enter your login credentials when you run the script.

Expand All @@ -89,7 +88,7 @@ that Dataset in OMERO.
Info tab in iviewer and clicking on OMERO.figure in the Open with
line.\ |image1|

#. The script at https://github.com/ome/training-scripts/blob/master/practical/groovy/idr0021.groovy
#. The script :download:`idr0021.groovy <../scripts/groovy/idr0021.groovy>`
was used previously to run on the whole **idr0021** Project
and produce the resulting CSV file. We can now download this file
from OMERO and open it in Microsoft Excel.
Expand Down
5 changes: 5 additions & 0 deletions scripts/fiji-macro-segment.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
run("8-bit");
run("Invert", "stack");
setAutoThreshold("MaxEntropy");
run("Analyze Particles...", "size=10-Infinity pixel display clear add stack");

0 comments on commit 10e95f9

Please sign in to comment.