Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature MDE - metadata editor for OMERO.importer #69

Merged
merged 58 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
57670ea
add mde implementation
Aug 21, 2019
2da0f3e
Merge tag 'v5.5.3' into dev_MDE
Aug 21, 2019
a443a9d
update mde implementation
Aug 21, 2019
7280b01
accept modification in 5.4.10_dev_redesign
Aug 21, 2019
987ba06
Update README.md
Aug 21, 2019
cae7d23
add configuration example and images for README.md
Aug 21, 2019
bca55da
Update README.md
Aug 21, 2019
fe0628e
Merge branch 'feat_MDE' of https://github.com/sukunis/omero-insight i…
Aug 21, 2019
c67d7fa
Update README.md
Aug 21, 2019
aaa5a05
Update README.md
Aug 22, 2019
1bf99c5
GUI inputField images for README.md
Aug 22, 2019
69bb08d
Bugfix: add mde annotation for formats with multiple files
Aug 22, 2019
667ec7a
Merge branch 'feat_MDE' of https://github.com/sukunis/omero-insight i…
Aug 22, 2019
bfb431f
resize tagLabel; redesign unit handling for tag; reload view after ob…
Aug 23, 2019
6423a53
Update README.md
Aug 23, 2019
95ed77b
move NodeContainer to util package
Aug 23, 2019
19144f2
Update README.md
Aug 23, 2019
30c6670
example enhancement
Aug 23, 2019
6dde696
Update README.md
Aug 23, 2019
0231bc4
Merge branch 'feat_MDE' of https://github.com/sukunis/omero-insight i…
Aug 23, 2019
813aad7
Update README.md
Aug 23, 2019
174e77f
Merge branch 'master' into feat_MDE
Aug 23, 2019
4022270
Merge branch 'feat_MDE' of https://github.com/sukunis/omero-insight i…
Aug 23, 2019
acbae49
treenode conversion
Aug 23, 2019
2395e6c
Add workflow images
Aug 26, 2019
911a448
Update README.md
Aug 26, 2019
13371cf
clean up output and remove unused code
Aug 28, 2019
37148a0
Merge branch 'feat_MDE' of https://github.com/sukunis/omero-insight i…
Aug 28, 2019
72b22c2
clean up output; bugfix: overwrite former input from parent; bugfix: …
Sep 1, 2019
23c1e98
fix: agent classes should not be visible by classes in the env direct…
Sep 5, 2019
e35df3a
add option to turn on/off mde
jburel Aug 30, 2019
759414a
roll back readme changes
jburel Sep 6, 2019
02d2e44
add mde doc
jburel Sep 6, 2019
6e4ad88
add missing bracket
jburel Sep 6, 2019
c425d8c
adjust formatting
jburel Sep 6, 2019
b4b5407
Merge pull request #1 from jburel/feat_MDE
Sep 12, 2019
5e9c0a4
add flag to turn on/off mde on importer
jburel Sep 17, 2019
4c4b34a
Merge pull request #2 from jburel/import-mde
Oct 8, 2019
9b45136
copyright and author
Oct 8, 2019
9587823
replace slf4j logger by available logger from registry
Oct 8, 2019
94f620e
Clean up consolen output; Bugfixes;
Oct 10, 2019
c11a737
change label "Object Specification" -> "Setup"; Add tooltip for reset…
Oct 10, 2019
4bccb31
update example xml
Oct 10, 2019
9f883df
bugfix: update object configuration for existing tree if new setup is…
Oct 10, 2019
df0cf0a
Merge branch 'master' into feat_MDE
Oct 10, 2019
3ba91ac
Update mde-extension.md
Oct 10, 2019
db9ac51
forgot to add new classes
Oct 11, 2019
77831e1
adjust doc
jburel Oct 21, 2019
2695084
rename property
jburel Oct 21, 2019
dcfee8a
Introduce Console logger
jburel Oct 21, 2019
7ab39c7
Bugfix: unit conversion
Oct 25, 2019
3b59fd8
Bugfix: doesn't show MDE input forms for non import objects (txt etc.…
Oct 25, 2019
8dd257e
bugfix: select predefine object-> overwrite deleted input fields
Oct 25, 2019
8287bae
bugfix: no debug output if object node is the root node
Oct 25, 2019
2ac8c69
ensure MDE has no effect to import in OmeroImageServiceImpl if it's s…
Oct 28, 2019
b2ec402
clean up import setup description
Oct 28, 2019
e786889
Clean up MDE after import event; Bugfix: if you have multi import qu…
Nov 11, 2019
2dc8154
rename button: Reset -> Reset object tree
Nov 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 42 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
automated by means of a Gradle (https://gradle.org/) build file.
In order to perform a build, all you need is
a JDK -- version 1.8 or later. From the command line, enter:

gradle build

This will compile, build, test and create a distribution bundle.
To run OMERO.insight from the distribution bundle unzip
`omero-insight.zip` then go to the `omero-insight` directory and from
Expand All @@ -48,81 +48,92 @@
To run OMERO.importer, from the command line, enter:

gradle runImporter

Packaging OMERO.insight
-----------------------

OMERO.insight uses the Gradle [java-packager-plugin](https://github.com/ome/omero-javapackager-plugin)
and is capable of creating an installer for the platform the deployment task is run on.
and is capable of creating an installer for the platform the deployment task is run on.

__Note, a Java runtime is included with the bundled installer. It is recommended to use
[OpenJDK](https://openjdk.java.net) as the system's JRE to avoid potential licensing issues.__

In order to be able to successfully create an installer, a JDK with
[`javapackager`](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html) or
an [OpenJFX SDK](https://gluonhq.com/products/javafx/) matching the version of the system JDK
is required (particularly if you intend to build with JDK 11 or higher).

### OSX

If you are using [Homebrew](https://brew.sh/), you can install, for example, [OpenJDK 8](https://www.azul.com/downloads/zulu/)
which comes bundled with JavaFX.
To install run:

brew cask install zulu8

### Windows

#### Scoop:

scoop bucket add java

scoop install zulufx8

#### Chocolatey:

choco install zulu8

#### Manually:
To set up a build environment with Windows without using a package manager such as [Scoop](https://scoop.sh) or
[Chocolatey](https://chocolatey.org) perform the following:
#### Manually:

To set up a build environment with Windows without using a package manager such as [Scoop](https://scoop.sh) or
[Chocolatey](https://chocolatey.org) perform the following:

**JDK:**

1. Download [ojdkbuild](https://github.com/ojdkbuild/ojdkbuild/releases/download/1.8.0.191-1/java-1.8.0-openjdk-1.8.0.191-1.b12.ojdkbuild.windows.x86_64.msi).
2. Run the installer.
3. Once at the _custom setup_ page of the setup select the _OpenJDK Runtime_ drop-down and install the _JAVA_HOME_
3. Once at the _custom setup_ page of the setup select the _OpenJDK Runtime_ drop-down and install the _JAVA_HOME_
feature.
4. Whilst on the _custom setup_ page, select to include the _OpenJFX Runtime_.

**Inno Setup (required to create .exe installer):**

1. Download and install [Inno Setup](http://www.jrsoftware.org/isdl.php).
2. Add the Inno Setup install directory (default `C:\Program Files (x86)\Inno Setup 5`) to the PATH.

**WiX (required to build .msi installer):**

1. Download and install [WiX 3.0 or greater](http://wixtoolset.org/).
2. Add WiX to the PATH.

### Packaging

To run the application packager, from the command line enter:

**Windows**

gradle packageApplicationExe

**OSX**

gradle packageApplicationDmg

Developing OMERO.insight
------------------------

See https://docs.openmicroscopy.org/latest/omero/developers/index.html#insight.

OMERO.insight extension
-----------------------

1. To use the metadata extension [OMERO.mde](mde-extension.md),
set the following entry in [container.xml](src/config/container.xml) or in
[containerImporter.xml](src/config/containerImporter.xml) to `true`:
```
<entry name="omero.client.import.mde.enabled" type="boolean">false</entry>
```


Licensing
---------

Expand Down
Binary file added images/ArrayField.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/AvailableInputFields.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ComboBox1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ConfigurationPanel.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/MDE1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/MDE2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/MDE3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/TextArea.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/TextField.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions mde-extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
OMERO.mde
---------

Extension of OMERO.importer to get an overview of available metadata provided by the selected image
container and annotate images at import step by standardized key-value templates.
Changes of metadata provided by image will be saved as key-value pairs.

Workflow example
----------------
In this example we load data from an Olympus TIRF Setup. There is no information about
the objective in the image container.

<p align="center">
<img src="images/MDE1.PNG" width="550" >
</p>
When you have specified your objectives for your Olympus TIRF Setup (see section Customize MDE), you can load these objectives by choosing object specification: Olympus TIRF. Now one of the objectives could be adopt from the list of available Elements or you can add manually the missing information.
<p align="center">
<img src="images/MDE2.PNG" width="550" >
</p>
After the import you will find your annotation under General>Key-Value Pairs.
<p align="center">
<img src="images/MDE3.PNG" width="550" >
</p>

Customize MDE
-------------
Save mdeConfiguration.xml in the directory &lt;user &gt;/omero/ to specify available objects and
how the looks like. You can edit the mdeConfiguration.xml to configure your personal MDE.

You can configure different setups for different object subsets and layouts.



mdeConfiguration.xml: Element MDEObjects (in progress)
------------------------------------------------------
First you can specify which objects are general available:
```
<Definitions>
<ObjectDef Type=<yourObjectName>>
...
</ObjectDef>
...
</Definitions>
```

You can add a child in this element to create a new custom object with key-values as `TagData` elements
(see example object `Available InputFields` in mdeConfiguration.xml in this repository).
Please specify an insertion point for every object by defining a parent object
e.g. object OME:Detector has the insertion OME:Channel - that means that OME:Detector can only be a
sub-object of an OME:Channel object.
```
<Parents Values="OME:Channel" />
```
Predefined are most of objects specified in the [ome schema](https://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome.html).

You can specify different setup to use only subsets of objects or present different layout of defined objects:
```
<Configurations>
<SetupConf Name=<yourSetupName>>
...
</SetupConf>
...
</Configurations>
```
For any new setup you added to the xml Configuration element you can specify which of objects
are available for this setup by add an element
```
<ObjectConf Type=<yourObjectName>>
...
</ObjectConf>
```
and how the looks like (overwrite TagData properties by defining `TagDataProp` to hide a TagData or
change default unit).



TagData
-------
There are different editor input field types for TagData:

<p align="center">
<img src="images/AvailableInputFields.PNG" width="550" >
</p>

`TextField` define like:
```
<TagData DefaultValues=""
Name="Tag of Type TextField"
Type="TextField"
Unit=""
Value=""
Visible="true" />
```
`TextField with unit` define like:
```
<TagData DefaultValues=""
Name="Tag of Type TextField with unit"
Type="TextField"
Unit="nm"
Value=""
Visible="true" />
```
`TextArea` define like:
```
<TagData DefaultValues=""
Name="Tag of Type TextArea"
Type="TextArea"
Unit=""
Value=""
Visible="true" />
```
`ArrayField` define like (for an array of 2 elements):
```
<TagData DefaultValues="2"
Name="Tag of Type ArrayField"
Type="ArrayField"
Unit=""
Value=""
Visible="true" />
```
`ArrayField` with unit define like (for an array of 3 elements):
```
<TagData DefaultValues="3"
Name="Tag of Type ArrayField with unit"
Type="ArrayField"
Unit="s"
Value=""
Visible="true" />
```
`ComboBox` define like:
```
<TagData DefaultValues="Value1,Value2,Value3"
Name="tag of Type ComboBox"
Type="ComboBox"
Unit=""
Value="Value1"
Visible="true" />
```
`TimeStamp` define like:
```
<TagData DefaultValues=""
Name="Tag of Type TimeStamp"
Type="TimeStamp"
Unit=""
Value=""
Visible="true" />

```
mdeConfiguration.xml: Element MDEPredefinitions
-----------------------------------------------
Here you can specify predefined values for your object for different setups.
```
<MDEPredefinitions>
<SetupPre Name=<yourSetupName>>
<ObjectPre Type=<yourObjectName>>
<TagData .../>
...
</ObjectPre>
...
</SetupPre>
....
</MDEPredefinitions>
```
Loading