Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[bumpversion]
current_version = 0.1.10
commit = False
tag = False

[bumpversion:file:VERSION]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:plugin.json]

[bumpversion:file:ict.yaml]

[bumpversion:file:intensityprojectionplugin.cwl]
31 changes: 13 additions & 18 deletions transforms/images/polus-intensity-projection-plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@

FROM polusai/bfio:2.1.9

COPY VERSION /

ARG EXEC_DIR="/opt/executables"
ARG DATA_DIR="/data"

RUN mkdir -p ${EXEC_DIR} \
&& mkdir -p ${DATA_DIR}/inputs \
&& mkdir ${DATA_DIR}/outputs

COPY src/requirements.txt ${EXEC_DIR}/
RUN pip3 install -r ${EXEC_DIR}/requirements.txt --no-cache-dir

COPY src ${EXEC_DIR}/
# Build from repo root (monorepo) or from this tool directory — both work.
FROM polusai/bfio:2.5.0
ENV EXEC_DIR="/opt/executables" POLUS_IMG_EXT=".ome.tif" POLUS_TAB_EXT=".csv" POLUS_LOG="INFO"
WORKDIR ${EXEC_DIR}

ENTRYPOINT ["python3", "/opt/executables/main.py"]
ENV TOOL_DIR="transforms/images/polus-intensity-projection-plugin"
RUN mkdir -p image-tools
COPY . ${EXEC_DIR}/image-tools
RUN pip3 install -U pip setuptools wheel \
&& python3 -c 'import sys; assert sys.version_info>=(3,11)' \
&& R="${EXEC_DIR}/image-tools" && M="$R/$TOOL_DIR" \
&& if [ -f "$M/pyproject.toml" ]; then pip3 install --no-cache-dir "$M"; \
else pip3 install --no-cache-dir "$R"; fi
ENTRYPOINT ["python3", "-m", "main"]
CMD ["--help"]
11 changes: 5 additions & 6 deletions transforms/images/polus-intensity-projection-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

This WIPP plugin calculates the volumetric intensity projection of a 3d image
along the z-direction(depth). The following types of intensity projections have
been implemented:
been implemented:

1. Maximum:
2. Minimum
3. Mean
1. Maximum:
2. Minimum
3. Mean
```
Example: Consider an input image of size: (x,y,z). If the user chooses the
option `max`, the code will calculate the value of the maximum intensity value
along the z-direction for every x,y position. The output will be a 2d image of
size (x,y).
size (x,y).
```
Contact [Gauhar Bains](mailto:gauhar.bains@labshare.org) for more information.

Expand All @@ -37,4 +37,3 @@ This plugin takes one input argument and one output argument:
| `--inpDir` | Input image collection to be processed | Input | collection |
| `--projectionType` | Type of volumetric intensity projection | Input | string |
| `--outDir` | Output collection | Output | collection |

Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.9
0.1.10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

version=$(<VERSION)
docker build . -t polusai/intensity-projection-plugin:${version}
docker build . -t polusai/intensity-projection-plugin:${version}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
author:
- Gauhar Bains
contact: gauhar.bains@labshare.org
container: polusai/intensity-projection-plugin:0.1.9
container: polusai/intensity-projection-plugin:0.1.10
description: Calculate volumetric intensity projections
entrypoint: '[python3, main.py]'
inputs:
Expand Down Expand Up @@ -41,4 +41,4 @@ ui:
key: inputs.projectionType
title: Projection Type
type: select
version: 0.1.9
version: 0.1.10
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ outputs:
type: Directory
requirements:
DockerRequirement:
dockerPull: polusai/intensity-projection-plugin:0.1.9
dockerPull: polusai/intensity-projection-plugin:0.1.10
InitialWorkDirRequirement:
listing:
- entry: $(inputs.outDir)
Expand Down
100 changes: 50 additions & 50 deletions transforms/images/polus-intensity-projection-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
{
"name": "Intensity Projection Plugin",
"version": "0.1.9",
"title": "Intensity Projection Plugin",
"description": "Calculate volumetric intensity projections",
"author": "Gauhar Bains (gauhar.bains@labshare.org)",
"institution": "National Center for Advancing Translational Sciences, National Institutes of Health",
"repository": "https://github.com/labshare/polus-plugins",
"website": "https://ncats.nih.gov/preclinical/core/informatics",
"citation": "",
"containerId": "polusai/intensity-projection-plugin:0.1.9",
"inputs": [
{
"name": "inpDir",
"type": "collection",
"description": "Input image collection to be processed by this plugin",
"required": true
"name": "Intensity Projection Plugin",
"version": "0.1.10",
"title": "Intensity Projection Plugin",
"description": "Calculate volumetric intensity projections",
"author": "Gauhar Bains (gauhar.bains@labshare.org)",
"institution": "National Center for Advancing Translational Sciences, National Institutes of Health",
"repository": "https://github.com/labshare/polus-plugins",
"website": "https://ncats.nih.gov/preclinical/core/informatics",
"citation": "",
"containerId": "polusai/intensity-projection-plugin:0.1.10",
"inputs": [
{
"name": "inpDir",
"type": "collection",
"description": "Input image collection to be processed by this plugin",
"required": true
},
{
"name": "projectionType",
"type": "enum",
"description": "Type of volumetric intensity projection",
"options": {
"values": [
"max",
"min",
"mean"
]
},
{
"name": "projectionType",
"type": "enum",
"description": "Type of volumetric intensity projection",
"options": {
"values": [
"max",
"min",
"mean"
]
},
"required": true
}
],
"outputs": [
{
"name": "outDir",
"type": "collection",
"description": "Output collection"
}
],
"ui": [
{
"key": "inputs.inpDir",
"title": "Input collection",
"description": "Input image collection to be processed by this plugin"
},
{
"key": "inputs.projectionType",
"title": "Projection Type",
"description": "Type of volumetric intensity projection"
}
]
}
"required": true
}
],
"outputs": [
{
"name": "outDir",
"type": "collection",
"description": "Output collection"
}
],
"ui": [
{
"key": "inputs.inpDir",
"title": "Input collection",
"description": "Input image collection to be processed by this plugin"
},
{
"key": "inputs.projectionType",
"title": "Projection Type",
"description": "Type of volumetric intensity projection"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "polus-intensity-projection-plugin"
version = "0.1.10"
description = "Calculate volumetric intensity projections"
requires-python = ">=3.11"
dependencies = [
"bfio>=2.5.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Intensity projection plugin."""
Loading
Loading