Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion visualization/ome-to-microjson-tool/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.6
current_version = 0.1.7-dev0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion visualization/ome-to-microjson-tool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM polusai/bfio:2.3.3
FROM polusai/bfio:2.4.7

# environment variables defined in polusai/bfio
ENV EXEC_DIR="/opt/executables"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
class: CommandLineTool
cwlVersion: v1.2
inputs:
features:
inputBinding:
prefix: --features
type: string?
filePattern:
inputBinding:
prefix: --filePattern
type: string?
inpDir:
type: string
intDir:
inputBinding:
prefix: --inpDir
prefix: --intDir
type: Directory
neighborDist:
inputBinding:
prefix: --neighborDist
type: string?
outDir:
inputBinding:
prefix: --outDir
type: Directory
pixelPerMicron:
inputBinding:
prefix: --pixelPerMicron
type: double?
polygonType:
inputBinding:
prefix: --polygonType
Expand All @@ -21,14 +33,22 @@ inputs:
inputBinding:
prefix: --preview
type: boolean?
segDir:
inputBinding:
prefix: --segDir
type: Directory
tileJson:
inputBinding:
prefix: --tileJson
type: boolean?
outputs:
outDir:
outputBinding:
glob: $(inputs.outDir.basename)
type: Directory
requirements:
DockerRequirement:
dockerPull: polusai/ome-to-microjson-tool:0.1.5-dev0
dockerPull: polusai/ome-to-microjson-tool:0.1.7-dev0
InitialWorkDirRequirement:
listing:
- entry: $(inputs.outDir)
Expand Down
29 changes: 19 additions & 10 deletions visualization/ome-to-microjson-tool/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Ome-to-microjson-plugin(v0.1.6)
# Ome-to-microjson-plugin(0.1.7-dev0)

This plugin generate a microjson of polygon coordinates of binary or label segmentations

This plugin uses [MICROJSON](https://github.com/bengtl/microjson/tree/dev) python library to generate polygon encodings for each object (Region of Interest) of binary segmented image in microjson format which can be used in [RENDER UI](https://render.ci.ncats.io/?imageUrl=https://files.scb-ncats.io/pyramids/Idr0033/precompute/41744/x(00-15)_y(01-24)_p0(1-9)_c(1-5)/)
application for visualization of microscopy images overlay with segmentations encodings.
This plugin generates polygon coordinates (rectangle or encoding) for objects in binary or label images and extracts Nyxus features for each object, saving them in a JSON-based format using the [MICROJSON](https://github.com/bengtl/microjson/tree/dev) Python library. The output can be visualized in the [RENDER UI](https://render.ci.ncats.io/?imageUrl=https://files.scb-ncats.io/pyramids/Idr0033/precompute/41744/x(00-15)_y(01-24)_p0(1-9)_c(1-5)/) application, enabling overlay of segmentation encodings on microscopy images

Currently this plugin supports two Polygon types
1. rectangle
Expand All @@ -23,6 +20,8 @@ Contact [Hamdah Shafqat Abbasi](mailto:hamdahshafqat.abbasi@nih.gov) for more in
For more information on WIPP, visit the
[official WIPP page](https://isg.nist.gov/deepzoomweb/software/wipp).



## Building

To build the Docker image for the conversion plugin, run
Expand All @@ -39,9 +38,13 @@ This plugin can take four input arguments and one output argument:

| Name | Description | I/O | Type |
|-------------------|-------------------------------------------------------|--------|--------------|
| `inpDir` | Input directory | Input | string |
| `intDir` | Input directory containing intensity images | Input | string |
| `segpDir` | Input directory containing binary or label images | Input | string |
| `filePattern` | Pattern to parse image filenames | Input | string |
| `polygonType` | Polygon type (rectangle, encoding) | Input | enum |
| `features` | [Nyxus Features](https://pypi.org/project/nyxus/) | Input | string |
| `neighborDist` | Distance between two neighbor objects | Input | integer |
| `pixelPerMicron` | Pixel Size in micrometer | Input | float |
| `outDir` | Output directory | Output | string |
| `preview` | Generate a JSON file with outputs | Output | JSON |

Expand All @@ -50,10 +53,16 @@ This plugin can take four input arguments and one output argument:
### Run the Docker Container

```bash
docker run -v /data:/data polusai/ome-to-microjson-plugin:0.1.6-dev \
--inpDir /data/input \
--filePattern ".*.ome.tif" \
docker run -v /data:/data polusai/ome-to-microjson-tool:0.1.7-dev0 \
--intDir /data/input \
--segDir /data/segmentations \
--filePattern "x{x:d+}_y{y:d+}_p{p:d+}_c{c:d+}.ome.tif" \
--polygonType "encoding" \
--features "ALL" \
--neighborDist 5.0 \
--polygonType "encoding" \
--pixelPerMicron 1.0 \
--outDir /data/output \
--preview
--tileJson

```
2 changes: 1 addition & 1 deletion visualization/ome-to-microjson-tool/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7-dev0
Loading
Loading