HUB
Sign inSign up
polus-apply-flatfield-plugin logo

labshare/polus-apply-flatfield-plugin

By labshare

•Updated about 4 years ago

https://github.com/labshare/polus-plugins/tree/master/polus-apply-flatfield-plugin

Image
0

750

labshare/polus-apply-flatfield-plugin repository overview

⁠Apply Flatfield

This WIPP plugin applies a flatfield operation on every image in a collection. The algorithm used to apply the flatfield is as follows:

![Corrected = \frac{Original - Darkfield}{Brightfield} - Photobleach Offset](https://render.githubusercontent.com/render/math?math=Corrected⁠ = \frac{Original - Darkfield}{Brightfield} - Photobleach + Offset)

A brief description of the variables:

  1. Corrected is the flatfield corrected image
  2. Darkfield is the darkfield image (sometimes referred to as offset, dark current, or dark noise). This is an image collected by the camera when the shutter is closed.
  3. Brightfield is the normalized brightfield image. This is an image collected when the shutter is open and illumination is on. The image should contain single precision floating point values, where mean(Brightfield)=1.
  4. Photobleach is a scalar indicating how much the image has been photobleached. This is a per image scalar offset.
  5. Offset is a scalar applied to all images in the collection. If Photobleach is specified, then this plugin uses Offset=mean(Photobleach).

For more information on flatfielding, see the paper by Young⁠. This plugin specifically uses the formulation from Peng et al⁠.

For more information on WIPP, visit the official WIPP page⁠.

⁠To Do

Implement additional formulations of flatfield correction. Specifically, the formula specified by Young:

![Corrected = \frac{Original - Darkfield}{Brightfield - Darkfield} ](https://render.githubusercontent.com/render/math?math=Corrected⁠ = \frac{Original - Darkfield}{Brightfield - Darkfield} )

Additional formulations may also include reference image free algorithms for flatfield correction, such as the rolling ball algorithm⁠.

⁠Building

To build the Docker image for the conversion plugin, run ./build-docker.sh.

⁠Install WIPP Plugin

If WIPP is running, navigate to the plugins page and add a new plugin. Paste the contents of plugin.json into the pop-up window and submit.

⁠Options

Command line options:

NameDescriptionI/OType
--darkPatternFilename pattern used to match darkfield files to image filesInputstring
--ffDirImage collection containing flatfield and/or darkfield imagesInputcollection
--flatPatternFilename pattern used to match flatfield files to image filesInputstring
--imgDirInput image collection to be processed by this pluginInputcollection
--imgPatternFilename pattern used to separate data and match with flatfield filesInputstring
--photoPatternFilename pattern used to match photobleach files to image filesInputstring
--outDirOutput collectionOutputcollection
Tag summary
Recent tags
Content type
Image
Digest
sha256:bbb248c80…
Size
754.9 kB
Last updated
about 4 years ago
docker pull labshare/polus-apply-flatfield-plugin:latest