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
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.0
current_version = 1.2.1
commit = False
tag = False

Expand Down
30 changes: 13 additions & 17 deletions transforms/images/polus-apply-flatfield-plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@

FROM labshare/polus-bfio-util: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 ${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}

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

ENTRYPOINT ["python3", "main.py"]
ENV TOOL_DIR="transforms/images/polus-apply-flatfield-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"]
2 changes: 1 addition & 1 deletion transforms/images/polus-apply-flatfield-plugin/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.2.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

version=$(<VERSION)
docker build . -t polusai/apply-flatfield-plugin:${version}
docker build . -t polusai/apply-flatfield-plugin:${version}
176 changes: 88 additions & 88 deletions transforms/images/polus-apply-flatfield-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
{
"name": "Apply Flatfield",
"version": "1.2.0",
"title": "Apply Flatfield",
"description": "Apply a flatfield algorithm to a collection of images.",
"author": "Nick Schaub (Nick.Schaub@nih.gov)",
"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/apply-flatfield-plugin:1.2.0",
"inputs": [
{
"name": "darkPattern",
"type": "string",
"description": "Filename pattern used to match darkfield files to image files",
"required": false
},
{
"name": "ffDir",
"type": "collection",
"description": "Image collection containing flatfield and/or darkfield images",
"required": true
},
{
"name": "brightPattern",
"type": "string",
"description": "Filename pattern used to match brightfield files to image files",
"required": true
},
{
"name": "imgDir",
"type": "collection",
"description": "Input image collection to be processed by this plugin",
"required": true
},
{
"name": "imgPattern",
"type": "string",
"description": "Filename pattern used to separate data and match with flatfied files",
"required": true
},
{
"name": "photoPattern",
"type": "string",
"description": "Filename pattern used to match photobleach files to image files",
"required": true
}
],
"outputs": [
{
"name": "outDir",
"type": "collection",
"description": "Output collection"
}
],
"ui": [
{
"key": "inputs.imgDir",
"title": "Images to correct",
"description": "Input image collection to be processed by this plugin"
},
{
"key": "inputs.imgPattern",
"title": "Image pattern",
"description": "Filename pattern used to separate data and match with flatfied files"
},
{
"key": "inputs.ffDir",
"title": "Background images (flatfield/darkfield)",
"description": "Image collection containing flatfield and/or darkfield images"
},
{
"key": "inputs.brightPattern",
"title": "Brightfield file pattern",
"description": "Filename pattern used to match brightfield files to image files"
},
{
"key": "inputs.darkPattern",
"title": "Darkfield file pattern",
"description": "Filename pattern used to match darkfield files to image files"
},
{
"key": "inputs.photoPattern",
"title": "Photobleach file pattern",
"description": "Filename pattern used to match photobleach files to image files"
}
]
}
"name": "Apply Flatfield",
"version": "1.2.1",
"title": "Apply Flatfield",
"description": "Apply a flatfield algorithm to a collection of images.",
"author": "Nick Schaub (Nick.Schaub@nih.gov)",
"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/apply-flatfield-plugin:1.2.1",
"inputs": [
{
"name": "darkPattern",
"type": "string",
"description": "Filename pattern used to match darkfield files to image files",
"required": false
},
{
"name": "ffDir",
"type": "collection",
"description": "Image collection containing flatfield and/or darkfield images",
"required": true
},
{
"name": "brightPattern",
"type": "string",
"description": "Filename pattern used to match brightfield files to image files",
"required": true
},
{
"name": "imgDir",
"type": "collection",
"description": "Input image collection to be processed by this plugin",
"required": true
},
{
"name": "imgPattern",
"type": "string",
"description": "Filename pattern used to separate data and match with flatfied files",
"required": true
},
{
"name": "photoPattern",
"type": "string",
"description": "Filename pattern used to match photobleach files to image files",
"required": true
}
],
"outputs": [
{
"name": "outDir",
"type": "collection",
"description": "Output collection"
}
],
"ui": [
{
"key": "inputs.imgDir",
"title": "Images to correct",
"description": "Input image collection to be processed by this plugin"
},
{
"key": "inputs.imgPattern",
"title": "Image pattern",
"description": "Filename pattern used to separate data and match with flatfied files"
},
{
"key": "inputs.ffDir",
"title": "Background images (flatfield/darkfield)",
"description": "Image collection containing flatfield and/or darkfield images"
},
{
"key": "inputs.brightPattern",
"title": "Brightfield file pattern",
"description": "Filename pattern used to match brightfield files to image files"
},
{
"key": "inputs.darkPattern",
"title": "Darkfield file pattern",
"description": "Filename pattern used to match darkfield files to image files"
},
{
"key": "inputs.photoPattern",
"title": "Photobleach file pattern",
"description": "Filename pattern used to match photobleach files to image files"
}
]
}
18 changes: 18 additions & 0 deletions transforms/images/polus-apply-flatfield-plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "polus-apply-flatfield-plugin"
version = "1.2.0"
requires-python = ">=3.11"
dependencies = [
"bfio>=2.5.0",
"filepattern>=2.2.1",
]

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.package-dir]
"" = "src"

[tool.setuptools]
py-modules = ["main"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Polus apply flatfield plugin."""
Loading
Loading