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

Test overhaul/upstream branch #4

Closed
wants to merge 116 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
2d84f5c
Rename tools
kostrykin Feb 12, 2024
d337410
Update projective_transformation.xml
kostrykin Feb 12, 2024
a44636a
Update projective_transformation_points.xml
kostrykin Feb 12, 2024
68182e1
Add CONVENTIONS.md
kostrykin Mar 14, 2024
1b1195f
wip
kostrykin Mar 14, 2024
024cd7f
wip
kostrykin Mar 14, 2024
39293ef
Update CONVENTIONS.md
kostrykin Mar 14, 2024
7ddb74f
Update CONVENTIONS.md
kostrykin Mar 14, 2024
9d80d1d
Update CONVENTIONS.md
kostrykin Mar 14, 2024
beee49e
Update CONVENTIONS.md
kostrykin Mar 14, 2024
30fe566
Update CONVENTIONS.md
kostrykin Mar 14, 2024
2abd20a
Update CONVENTIONS.md
kostrykin Mar 14, 2024
76ea28f
Remove help section
kostrykin Mar 14, 2024
556d46f
Update CONVENTIONS.md
kostrykin Mar 14, 2024
900fb29
Update CONVENTIONS.md
kostrykin Mar 14, 2024
c1f1b50
Update CONVENTIONS.md
kostrykin Mar 14, 2024
fdbb4fe
Update
kostrykin Mar 15, 2024
4f9d207
Merge branch 'master' into overhaul/dev
kostrykin Mar 15, 2024
d351199
Merge remote-tracking branch 'origin/tool-name-update' into overhaul/dev
kostrykin Mar 15, 2024
821f9bc
Update test data
kostrykin Mar 15, 2024
cda3f9e
Add content assertions
kostrykin Mar 15, 2024
9a58812
Update pr.yaml
kostrykin Mar 15, 2024
a8a7e2b
Update
kostrykin Mar 15, 2024
0f0a066
Update pr.yaml
kostrykin Mar 15, 2024
af67010
Add `pip install pillow`
kostrykin Mar 15, 2024
5aab5c0
Merge CONVENTIONS.md into CONTRIBUTING.md
kostrykin Mar 15, 2024
ea9887d
Temporarilly fix CI
kostrykin Mar 15, 2024
145f22b
Update `2d_feature_extraction` tool
kostrykin Mar 15, 2024
3b82fad
Update `2d_auto_threshold` tool
kostrykin Mar 15, 2024
7a80b1a
Fix `2d_feature_extraction` tests
kostrykin Mar 15, 2024
4c7316a
Fix test data
kostrykin Mar 15, 2024
84b28dd
Fix tool
kostrykin Mar 15, 2024
539e13d
Start refactoring `2d_simple_filter` tool
kostrykin Mar 15, 2024
5991306
Merge branch 'overhaul/dev' of https://github.com/kostrykin/galaxy-im…
kostrykin Mar 15, 2024
8430c9c
Fix `2d_simple_filter` tool
kostrykin Mar 15, 2024
0a40dad
Add more tests
kostrykin Mar 15, 2024
a28640e
Fix tests
kostrykin Mar 15, 2024
a397841
Update
kostrykin Mar 15, 2024
b3e9ace
Fix
kostrykin Mar 15, 2024
4fc1033
Update CONTRIBUTING.md
kostrykin Mar 15, 2024
ba45a9f
Fix bugs
kostrykin Mar 15, 2024
d77d07b
Update CONTRIBUTING.md
kostrykin Mar 15, 2024
284e943
Update CONTRIBUTING.md
kostrykin Mar 15, 2024
4cbab2d
Fix linting issues
kostrykin Mar 16, 2024
5f4600f
Update CONTRIBUTING.md
kostrykin Mar 16, 2024
9158478
Refactor tests using macros
kostrykin Mar 16, 2024
5879277
Update tests
kostrykin Mar 16, 2024
785c6cb
Merge branch 'overhaul/dev' of github.com:kostrykin/galaxy-image-anal…
kostrykin Mar 16, 2024
262ca03
Update CONTRIBUTING.md
kostrykin Mar 16, 2024
ae4c278
Update CONTRIBUTING.md
kostrykin Mar 16, 2024
959fb90
Update pr.yaml
kostrykin Mar 16, 2024
05164b2
Update `anisotropic_diffusion` tool
kostrykin Mar 16, 2024
a51dd5d
Fix spelling (was BE, using AE is more consistent)
kostrykin Mar 16, 2024
112a124
Update `2d_histogram_equalization` tool
kostrykin Mar 16, 2024
34843ed
Update `colorize_labels` tool
kostrykin Mar 16, 2024
b4ca632
Update `bf2raw` tool
kostrykin Mar 16, 2024
5a321ea
Add `macros/creators.xml`
kostrykin Mar 16, 2024
8edadaa
Update `rfove` tool
kostrykin Mar 16, 2024
2fb5d6e
Fix `bioformats2raw` and `voronoi_tessellation` tools
kostrykin Mar 16, 2024
18fbcf0
Fix labels
kostrykin Mar 16, 2024
6165546
Fix `rfove` tool
kostrykin Mar 16, 2024
39e29fb
Update `overlay_images` tool
kostrykin Mar 16, 2024
523e653
Add RGB test for `overlay_images`
kostrykin Mar 16, 2024
07cd6a0
Update `overlay_images` help
kostrykin Mar 16, 2024
756a763
Merge branch 'master' into overhaul/dev
kostrykin Mar 18, 2024
379ca30
Update CONTRIBUTING.md
kostrykin Mar 18, 2024
e30849c
Update test data
kostrykin Mar 18, 2024
1cf5aa6
Add RGB test for `overlay_images`
kostrykin Mar 18, 2024
a426126
Update `anisotropic_diffusion` to medpy 0.4.0
kostrykin Mar 18, 2024
553b826
Update PULL_REQUEST_TEMPLATE.md
kostrykin Mar 18, 2024
a8a046c
Update `projective_transformation_points` tool
kostrykin Mar 18, 2024
b429c40
Update PULL_REQUEST_TEMPLATE.md
kostrykin Mar 18, 2024
ea016d5
Update `bioformats2raw`
kostrykin Mar 18, 2024
7a1c096
Merge branch 'overhaul/dev' of github.com:kostrykin/galaxy-image-anal…
kostrykin Mar 18, 2024
47fb8ff
Update `projective_transformation` tool
kostrykin Mar 18, 2024
aa43c16
Update `bfconvert` tool (tests failing)
kostrykin Mar 18, 2024
1f482e9
Update CONTRIBUTING.md
kostrykin Mar 19, 2024
cb05359
Fix `bfconvert` tests
kostrykin Mar 19, 2024
afc8190
Fix test data size
kostrykin Mar 19, 2024
279d936
Update `projective_transformation_points` tool
kostrykin Mar 19, 2024
54853f3
Remove spurious files
kostrykin Mar 19, 2024
d3a8997
Update requirements using `@TOOL_VERSION@` macro
kostrykin Mar 19, 2024
45fa59f
Update `segmetrics` tool
kostrykin Mar 19, 2024
6c02b60
Remove spurious sym links
kostrykin Mar 19, 2024
affd76b
Update `superdsm` tool
kostrykin Mar 19, 2024
493adf4
Update `scale_image` tool (not finished yet)
kostrykin Mar 19, 2024
9165189
Fix tests
kostrykin Mar 19, 2024
aaff8b9
Fix `scale_image` tool
kostrykin Mar 19, 2024
75453a5
Refactor
kostrykin Mar 19, 2024
f749a35
Fix linting issues
kostrykin Mar 19, 2024
a074b7d
Update tests and help of `2d_simple_filter` tool
kostrykin Mar 20, 2024
58052d7
Update `scale_image` help
kostrykin Mar 20, 2024
a4faa4e
Update CI to use latest version of `galaxy` fork
kostrykin Mar 20, 2024
acd17d1
Fix tests for float TIFF in `scale_image` tool
kostrykin Mar 20, 2024
ad14c4a
Add tifffile to CI workflows
kostrykin Mar 20, 2024
9c48179
Fix tests of `bfconvert` tool
kostrykin Mar 20, 2024
f33eee4
Update `2d_filter_segmentation_by_features` tool
kostrykin Mar 20, 2024
830af8d
Update `image_math` tool
kostrykin Mar 20, 2024
aed27ab
Update `orientationpy` tool
kostrykin Mar 20, 2024
a372bad
Update `morphological_operations` tool
kostrykin Mar 20, 2024
ab42abd
Update `split_labelmap` tool
kostrykin Mar 20, 2024
a06833f
Add float TIFF test for `2d_simple_filter`
kostrykin Mar 21, 2024
33135f3
Update `slice_image` tool
kostrykin Mar 21, 2024
dd3e6d4
Add missing macros
kostrykin Mar 21, 2024
80df3aa
Update help of `2d_filter_segmentation_by_features` tool
kostrykin Mar 21, 2024
69f59ba
Update `concat_images` tool
kostrykin Mar 21, 2024
7fc8c41
Fix linting issues
kostrykin Mar 21, 2024
df87279
Fix file sizes
kostrykin Mar 21, 2024
a4852b6
Fix missing `profile`
kostrykin Mar 21, 2024
5fd315e
Update 23 tools
kostrykin Mar 21, 2024
6904d1d
Merge branch 'master' into overhaul/upstream
kostrykin Mar 21, 2024
ab5d053
Merge branch 'overhaul/upstream' into overhaul/dev
kostrykin Mar 28, 2024
4121085
Update `tests/label_image_diff` macro
kostrykin Apr 4, 2024
a0cc9f1
Trigger CI
kostrykin Apr 4, 2024
f05c2aa
Update macros
kostrykin Apr 4, 2024
e3483f4
Update CONTRIBUTING.md
kostrykin Apr 4, 2024
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
20 changes: 11 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
**For the contributor:**
* [ ] I have read the [CONTRIBUTING.md](https://github.com/BMCV/galaxy-image-analysis/blob/master/CONTRIBUTING.md) document.
* [ ] License permits unrestricted use (educational + commercial).
* [ ] This PR adds or updates a tool or tool collection.
* [ ] This PR adds a new tool or tool collection.
* [ ] This PR updates an existing tool or tool collection.
* [ ] Tools added/updated by this PR comply with the [Naming and Annotation Conventions for Tools in the Image Community in Galaxy](https://github.com/elixir-europe/biohackathon-projects-2023/blob/main/16/paper/paper.md#conventions) (or explain why they do not).
* [ ] This PR does something else (explain below).

---

<!-- Please describe your PR here -->
**FOR THE CONTRIBUTOR — Please fill out if applicable**

Please make sure you have read the [CONTRIBUTING.md](https://github.com/BMCV/galaxy-image-analysis/blob/master/CONTRIBUTING.md) document (last updated: 2024/03/18).

* [ ] License permits unrestricted use (educational + commercial).

If this PR adds or updates a tool or tool collection:

* [ ] This PR adds a new tool or tool collection.
* [ ] This PR updates an existing tool or tool collection.
* [ ] Tools added/updated by this PR comply with the [Naming and Annotation Conventions for Tools in the Image Community in Galaxy](https://github.com/elixir-europe/biohackathon-projects-2023/blob/main/16/paper/paper.md#conventions) (or explain why they do not).
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
tool-list: ${{ needs.setup.outputs.tool-list }}
additional-planemo-options: --biocontainers -s tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata
- run: |
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/util
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/tool_util
#
# ---------------------------------------------------------
#
Expand Down Expand Up @@ -185,9 +185,9 @@ jobs:
chunk: ${{ matrix.chunk }}
chunk-count: ${{ needs.setup.outputs.chunk-count }}
- run: |
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util
python -m pip install pillow
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/util
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/tool_util
python -m pip install pillow tifffile
#
# ---------------------------------------------------------
#
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ jobs:
# - https://github.com/galaxyproject/galaxy/pull/17581
#
- run: |
python -m pip install --no-dependencies git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install --no-dependencies git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util
python -m pip install --no-dependencies git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/util
python -m pip install --no-dependencies git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/tool_util
#
# ---------------------------------------------------------
#
Expand Down Expand Up @@ -311,9 +311,9 @@ jobs:
# - https://github.com/galaxyproject/galaxy/pull/17581
#
- run: |
python -m pip install --no-dependencies git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install --no-dependencies git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util
python -m pip install pillow
python -m pip install --no-dependencies git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/util
python -m pip install --no-dependencies git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/tool_util
python -m pip install pillow tifffile
#
# ---------------------------------------------------------
#
Expand Down
88 changes: 75 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,98 @@
# Contributing

This document describes how to contribute to this repository. Pull
requests containing bug fixes, updates, and extensions to the existing
tools and tool suites in this repository will be considered for
inclusion.
This document is the attempt to collect some rough rules for tools to follow in this repository, to facilitate their consistency and interoperability. This document is an extension to the [Naming and Annotation Conventions for Tools in the Image Community in Galaxy](https://github.com/elixir-europe/biohackathon-projects-2023/blob/main/16/paper/paper.md#conventions) and compatibility should be maintained. This document is work in progress.

## How to Contribute
**How to Contribute:**

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Make sure you have git [installed](https://help.github.com/articles/set-up-git)
* Fork the repository on [GitHub](https://github.com/BMCV/galaxy-image-analysis/fork)
* Make the desired modifications - consider using a [feature branch](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches).
* Try to stick to the [Conventions for Tools in the Image Community](https://github.com/elixir-europe/biohackathon-projects-2023/blob/main/16/conventions.md) and the [IUC standards](http://galaxy-iuc-standards.readthedocs.org/en/latest/) whenever you can
* Try to stick to the [Conventions for Tools in the Image Community](https://github.com/elixir-europe/biohackathon-projects-2023/blob/main/16/paper/paper.md#conventions) and the [IUC standards](http://galaxy-iuc-standards.readthedocs.org/en/latest/) whenever you can
* Make sure you have added the necessary tests for your changes and they pass.
* Open a [pull request](https://help.github.com/articles/using-pull-requests) with these changes.

## Using the new image-based verifications for tool testing
## Terminology

The new image-based verifications for Galaxy tool tests https://github.com/galaxyproject/galaxy/pull/17556 and https://github.com/galaxyproject/galaxy/pull/17581 won't be available in Galaxy before 24.1 is released.
**Label maps** are images with pixel-level annotations, usually corresponding to distinct image regions (e.g., objects). We avoid the terms *label image* and *labeled image*, since these can be easily confused with image-level annotations (instead of pixel-level). The labels (pixel values) must uniquely identify the labeled image regions (i.e. labels must be unique, even for non-adjacent image regions). If a label semantically corresponds to the image background, that label should be 0.

**Binary images** are a special case of label maps with only two labels (e.g., image background and image foreground). To facilitate visual perception, the foreground label should correspond to white (value 255 for `uint8` images and value 65535 for `uint16` images), since background corresponds to the label 0, which is black.

**Intensity images** are images which are *not* label maps (and thus neither binary images).

## File types

If a tool wrapper only supports single-channel 2-D images and uses a Python script, the structure of the input should be verified right after loading the image:

```python
im = skimage.io.imread(args.input)
im = np.squeeze(im) # remove axes with length 1
assert im.ndim == 2
```

Tools with **label map inputs** should accept PNG and TIFF files. Tools with **label map outputs** should produce either `uint16` single-channel PNG or `uint16` single-channel TIFF. Using `uint8` instead of `uint16` is also acceptable, if there definetely are no more than 256 different labels. Using `uint8` should be preferred for binary images.

> [!NOTE]
> It is a common misconception that PNG files must be RGB or RGBA, and that only `uint8` pixel values are supported. For example, the `cv2` module (OpenCV) can be used to create single-channel PNG files, or PNG files with `uint16` pixel values. Such files can then be read by `skimage.io.imread` without issues (however, `skimage.io.imwrite` seems not to be able to write such PNG files).

Tools with **intensity image inputs** should accept PNG and TIFF files. Tools with **intensity image outputs** can be any data type and either PNG or TIFF. Image outputs meant for visualization (e.g., segmentation overlays, charts) should be PNG.

## Testing

### Testing infrastructure

The support for the new [`image_diff` output verification method](https://docs.galaxyproject.org/en/latest/dev/schema.html#tool-tests-test-output) and [assertions for image data](https://docs.galaxyproject.org/en/latest/dev/schema.html#assertions-for-image-data) for Galaxy tool testing probably won't be available in Galaxy before 24.1 is released.

Meanwhile, they are already available in the CI of the **galaxy-image-analyis** repostiroy! 🎉 https://github.com/BMCV/galaxy-image-analysis/pull/117

To also use them locally, you need to install the development versions of two Galaxy packages:
To also use them locally, you need to install the development versions of two Galaxy packages, pillow, and tifffile:
```python
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/util
python -m pip install git+https://[email protected]/kostrykin/galaxy.git@galaxy-image-analysis#subdirectory=packages/tool_util
python -m pip install pillow tifffile
```

The commit [`5c1d045ce7b1e45f85608346baed5455324ee967`](https://github.com/galaxyproject/galaxy/commit/5c1d045ce7b1e45f85608346baed5455324ee967) corresponds to the latest merged bug fixes.
The [galaxy-image-analysis branch](https://github.com/kostrykin/galaxy/tree/galaxy-image-analysis) of the <https://github.com/kostrykin/galaxy> fork is the same as the [23.1 release of Galaxy](https://github.com/galaxyproject/galaxy/tree/release_23.1), plus the support for the image-based verification extensions.

In addition, instead of running `planemo test`, you should use:
```python
planemo test --galaxy_source https://github.com/kostrykin/galaxy --galaxy_branch galaxy-image-analysis
```
The [galaxy-image-analysis branch](https://github.com/kostrykin/galaxy/tree/galaxy-image-analysis) of the <https://github.com/kostrykin/galaxy> fork is the same as the [23.1 release of Galaxy](https://github.com/galaxyproject/galaxy/tree/release_23.1), plus the support for the image-based verification extensions.
Linting with `planemo lint` works as usual.

### Writing tests

We recommend using macros for verification of image outputs. The macros are loaded as follows:
```xml
<macros>
<import>tests.xml</import>
</macros>
```

For testing of **binary image outputs** we recommend using the `mae` metric (mean absolute error). With the default value of `eps` of 0.01, this asserts that at most 1% of the image pixels are labeled differently:
```xml
<expand macro="tests/binary_image_diff" name="output" value="output.tif" ftype="tiff"/>
```
The macro also ensures that the image contains two distinct label values, which are not interchangable.

For testing of non-binary **label map outputs** with interchangeable labels, we recommend using the `iou` metric (one minus the *intersection over the union*). With the default value of `eps` of 0.01, this asserts that there is no labeled image region with an *intersection over the union* of less than 99%:
```xml
<expand macro="tests/label_image_diff" name="output" value="output.tif" ftype="tiff"/>
```
Label 0 is commonly connotated as the image background, and is not interchangable by default. Use `pin_labels=""` to make it interchangable (see the [documentation](https://docs.galaxyproject.org/en/latest/dev/schema.html#id113) for details).

For testing of **intensity image outputs** we recommend the `rms` metric (root mean square), because it is very sensitive to large pixel value differences, but tolerates smaller differences:
```xml
<expand macro="tests/intensity_image_diff" name="output" value="output.tif" ftype="tiff"/>
```
For `uint8` and `uint16` images, increasing the default value of `eps` to `1.0` should be tolerable, if required.

## Future extensions

Below is a list of open questions:

- **How do we want to cope with multi-channel label maps?** For example, do or can we distinguish RGB labels from multi-channel binary masks, which are sometimes used to represent overlapping objects?

- How can we distinguish multi-channel 2-D images from single-channel 3-D images?

- How can we make clear to the user, whether a tool requires a 2-D image or also supports 3-D?
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If Galaxy Image Analysis helped with the analysis of your data, please do not fo
- [Process images using arithmetic expressions](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/image_math/image_math) with NumPy
- [Scale image](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/scale_image/ip_scale_image) with scikit-image
- [Show image info](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/image_info/ip_imageinfo) with Bioformats
- [Slice image](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/slice_image/ip_slice_image)
- [Slice image into patches](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/slice_image/ip_slice_image)
- [Switch axis coordinates](https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/imgteam/imagecoordinates_flipaxis/imagecoordinates_flipaxis)

### Image conversion
Expand Down
23 changes: 23 additions & 0 deletions macros/creators.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<macros>

<xml name="creators/bmcv">
<organization name="Biomedical Computer Vision Group, Heidelberg Universtiy" alternateName="BMCV" url="http://www.bioquant.uni-heidelberg.de/research/groups/biomedical_computer_vision.html" />
<yield />
</xml>

<xml name="creators/alliecreason">
<person givenName="Allison" familyName="Creason"/>
<yield/>
</xml>

<xml name="creators/bugraoezdemir">
<person givenName="Bugra" familyName="Oezdemir"/>
<yield/>
</xml>

<xml name="creators/thawn">
<person givenName="Till" familyName="Korten"/>
<yield/>
</xml>

</macros>
6 changes: 0 additions & 6 deletions macros/creators/bmcv.xml

This file was deleted.

95 changes: 95 additions & 0 deletions macros/tests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<macros>

<!-- Macros for verification of image outputs -->

<xml
name="tests/binary_image_diff"
tokens="name,value,ftype,metric,eps"
token_metric="mae"
token_eps="0.01">

<output name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@" pin_labels="0">
<assert_contents>
<has_image_n_labels n="2"/>
<yield/>
</assert_contents>
</output>

</xml>

<xml
name="tests/label_image_diff"
tokens="name,value,ftype,metric,eps,pin_labels"
token_metric="iou"
token_eps="0.01"
token_pin_labels="0">

<output name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@" pin_labels="@PIN_LABELS@">
<assert_contents>
<yield/>
</assert_contents>
</output>

</xml>

<xml
name="tests/intensity_image_diff"
tokens="name,value,ftype,metric,eps"
token_metric="rms"
token_eps="0.01">

<output name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@">
<assert_contents>
<yield/>
</assert_contents>
</output>

</xml>

<!-- Variants of the above for verification of collection elements -->

<xml
name="tests/binary_image_diff/element"
tokens="name,value,ftype,metric,eps"
token_metric="mae"
token_eps="0.01">

<element name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@" pin_labels="0">
<assert_contents>
<has_image_n_labels n="2"/>
<yield/>
</assert_contents>
</element>

</xml>

<xml
name="tests/label_image_diff/element"
tokens="name,value,ftype,metric,eps"
token_metric="iou"
token_eps="0.01"
token_pin_labels="0">

<element name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@" pin_labels="@PIN_LABELS@">
<assert_contents>
<yield/>
</assert_contents>
</element>

</xml>

<xml
name="tests/intensity_image_diff/element"
tokens="name,value,ftype,metric,eps"
token_metric="rms"
token_eps="0.01">

<element name="@NAME@" value="@VALUE@" ftype="@FTYPE@" compare="image_diff" metric="@METRIC@" eps="@EPS@">
<assert_contents>
<yield/>
</assert_contents>
</element>

</xml>

</macros>
Loading