Skip to content
Open
Changes from all commits
Commits
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
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# czi-to-ome-xslt

[![Build Status](https://github.com/AllenCellModeling/czi-to-ome-xslt/workflows/Test%20Main/badge.svg)](https://github.com/AllenCellModeling/czi-to-ome-xslt/actions/test-main.yml)
[![Build Status](https://github.com/bioio-devs/czi-to-ome-xslt/workflows/Test%20Main/badge.svg)](https://github.com/bioio-devs/czi-to-ome-xslt/actions/test-main.yml)

XSLT files to convert from CZI (Zeiss) microscopy image metadata
to OME image metadata schema.
Expand All @@ -13,7 +13,7 @@ If you want to use this work in a standalone fashion we recommend submoduling
this repository into your own repo:

```bash
git submodule add https://github.com/AllenCellModeling/czi-to-ome-xslt.git
git submodule add https://github.com/bioio-devs/czi-to-ome-xslt.git
```

You can then run the transformation in any language of your choosing.
Expand All @@ -40,28 +40,32 @@ with open("your-converted-czi-metadata.ome.xml", "w") as open_f:
open_f.write(str(omexml))
```

This work has already been incorporated into
[`aicsimageio`](https://github.com/AllenCellModeling/aicsimageio).
This work is incorporated into
[`bioio`](https://github.com/bioio-devs/bioio), in the [`bioio-czi`](https://github.com/bioio-devs/bioio-czi) module.

```python
from aicsimageio import AICSImage
from bioio import BioImage

img = AICSImage("your-file.czi")
img = BioImage("your-file.czi")
img.ome_metadata
```

## EXSLT

This work utilizes the EXSLT extensions for XSLT 1.0 (for example, the `str:tokenize` function). Popular XML libraries
such as `lxml` have built in support for EXSLT. To use these extensions, include the necessary attributes on `<xsl:stylesheet>` in the
file you are working on:

```
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ome="http://www.openmicroscopy.org/Schemas/OME/2016-06"
xmlns:str="http://exslt.org/strings" extension-element-prefixes="str">
...
```

You can then use an EXSLT function like so:

```
<xsl:value-of select="str:tokenize(/Some/Path, ',')" />
```
Expand All @@ -73,7 +77,6 @@ For more information on using EXSLT and the functions avaialbe, see the [EXSLT d
For full metadata comparison between XSLT and Bioformats, see
[comparison](./docs/comparison).


## Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit
Expand All @@ -88,8 +91,6 @@ than Python**.
For instructions on how to contribute new additions to the XSLT and/or tests, see
[CONTRIBUTING](./docs/CONTRIBUTING.md).


---


***Free software: BSD license***
**_Free software: BSD license_**
Loading