Voronoi segmentation

imaging-voronoi-segmentation/voronoi-segmentation

Author(s)
Even Moa Myklebust, Riccardo Massei
version Version
1
last_modification Last updated
May 13, 2025
license License
MIT
galaxy-tags Tags
Segmentation
imageanaylsis
voronoi

Features
Tutorial
hands_on Voronoi segmentation

Workflow Testing
Tests: ✅
Results: Not yet automated
FAIRness purl PURL
https://gxy.io/GTN:
RO-Crate logo with flask Download Workflow RO-Crate
Launch in Tutorial Mode question
galaxy-download Download
flowchart TD
  0["ℹ️ Input Dataset\nImage"];
  style 0 stroke:#2c3143,stroke-width:4px;
  1["ℹ️ Input Dataset\nSeeds"];
  style 1 stroke:#2c3143,stroke-width:4px;
  2["Convert image format"];
  0 -->|output| 2;
  09e98f2a-17b3-429b-877d-93de63ca7e1a["Output\nSingle channel image"];
  2 --> 09e98f2a-17b3-429b-877d-93de63ca7e1a;
  style 09e98f2a-17b3-429b-877d-93de63ca7e1a stroke:#2c3143,stroke-width:4px;
  3["Convert binary image to label map"];
  1 -->|output| 3;
  4d2a861c-3746-4c24-9b81-96d8f7a710d4["Output\nlabel map"];
  3 --> 4d2a861c-3746-4c24-9b81-96d8f7a710d4;
  style 4d2a861c-3746-4c24-9b81-96d8f7a710d4 stroke:#2c3143,stroke-width:4px;
  4["Convert single-channel to multi-channel image"];
  2 -->|output| 4;
  66990d3d-7b19-43f6-ac5a-ecd5557bff35["Output\nmulti-channel image"];
  4 --> 66990d3d-7b19-43f6-ac5a-ecd5557bff35;
  style 66990d3d-7b19-43f6-ac5a-ecd5557bff35 stroke:#2c3143,stroke-width:4px;
  5["Filter 2-D image"];
  2 -->|output| 5;
  e030c644-5cb4-4c1e-8287-8fc6d2950490["Output\nSmoothed image"];
  5 --> e030c644-5cb4-4c1e-8287-8fc6d2950490;
  style e030c644-5cb4-4c1e-8287-8fc6d2950490 stroke:#2c3143,stroke-width:4px;
  6["Compute Voronoi tessellation"];
  3 -->|output| 6;
  af96320e-5fa7-49d2-831b-bb438f8b2d73["Output\ntesselation"];
  6 --> af96320e-5fa7-49d2-831b-bb438f8b2d73;
  style af96320e-5fa7-49d2-831b-bb438f8b2d73 stroke:#2c3143,stroke-width:4px;
  7["Threshold image"];
  5 -->|output| 7;
  633e495b-ca86-451b-836c-bfceeb8d25ee["Output\nmask"];
  7 --> 633e495b-ca86-451b-836c-bfceeb8d25ee;
  style 633e495b-ca86-451b-836c-bfceeb8d25ee stroke:#2c3143,stroke-width:4px;
  8["Count objects in label map"];
  6 -->|result| 8;
  b977eb0c-e874-439f-b42b-756d6a864112["Output\nobject count"];
  8 --> b977eb0c-e874-439f-b42b-756d6a864112;
  style b977eb0c-e874-439f-b42b-756d6a864112 stroke:#2c3143,stroke-width:4px;
  9["Extract image features"];
  6 -->|result| 9;
  2 -->|output| 9;
  5a94a425-9000-4083-aae7-232ea01ae215["Output\nimage features"];
  9 --> 5a94a425-9000-4083-aae7-232ea01ae215;
  style 5a94a425-9000-4083-aae7-232ea01ae215 stroke:#2c3143,stroke-width:4px;
  10["Process images using arithmetic expressions"];
  6 -->|result| 10;
  1 -->|output| 10;
  7 -->|output| 10;
  45f919dd-298f-4e94-a390-e73537b5fedb["Output\nsegmentation"];
  10 --> 45f919dd-298f-4e94-a390-e73537b5fedb;
  style 45f919dd-298f-4e94-a390-e73537b5fedb stroke:#2c3143,stroke-width:4px;
  11["Colorize label map"];
  10 -->|result| 11;
  6903fd1b-304a-4e4a-a529-8f3643bcd445["Output\ncolorized label map"];
  11 --> 6903fd1b-304a-4e4a-a529-8f3643bcd445;
  style 6903fd1b-304a-4e4a-a529-8f3643bcd445 stroke:#2c3143,stroke-width:4px;
  12["Overlay images"];
  4 -->|output| 12;
  11 -->|output| 12;
  2adb0afd-923f-4641-bafb-10eaca09a4e0["Output\nsegmented image"];
  12 --> 2adb0afd-923f-4641-bafb-10eaca09a4e0;
  style 2adb0afd-923f-4641-bafb-10eaca09a4e0 stroke:#2c3143,stroke-width:4px;

Inputs

Input Label
Input dataset Image
Input dataset Seeds

Outputs

From Output Label
toolshed.g2.bx.psu.edu/repos/imgteam/bfconvert/ip_convertimage/6.7.0+galaxy3 Convert image format
toolshed.g2.bx.psu.edu/repos/imgteam/binary2labelimage/ip_binary_to_labelimage/0.5+galaxy0 Convert binary image to label map
toolshed.g2.bx.psu.edu/repos/imgteam/repeat_channels/repeat_channels/1.26.4+galaxy0 Convert single-channel to multi-channel image
toolshed.g2.bx.psu.edu/repos/imgteam/2d_simple_filter/ip_filter_standard/1.12.0+galaxy1 Filter 2-D image
toolshed.g2.bx.psu.edu/repos/imgteam/voronoi_tesselation/voronoi_tessellation/0.22.0+galaxy3 Compute Voronoi tessellation
toolshed.g2.bx.psu.edu/repos/imgteam/2d_auto_threshold/ip_threshold/0.18.1+galaxy3 Threshold image
toolshed.g2.bx.psu.edu/repos/imgteam/count_objects/ip_count_objects/0.0.5-2 Count objects in label map
toolshed.g2.bx.psu.edu/repos/imgteam/2d_feature_extraction/ip_2d_feature_extraction/0.18.1+galaxy0 Extract image features
toolshed.g2.bx.psu.edu/repos/imgteam/image_math/image_math/1.26.4+galaxy2 Process images using arithmetic expressions
toolshed.g2.bx.psu.edu/repos/imgteam/colorize_labels/colorize_labels/3.2.1+galaxy3 Colorize label map
toolshed.g2.bx.psu.edu/repos/imgteam/overlay_images/ip_overlay_images/0.0.4+galaxy4 Overlay images

Tools

Tool Links
toolshed.g2.bx.psu.edu/repos/imgteam/2d_auto_threshold/ip_threshold/0.18.1+galaxy3 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/2d_feature_extraction/ip_2d_feature_extraction/0.18.1+galaxy0 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/2d_simple_filter/ip_filter_standard/1.12.0+galaxy1 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/bfconvert/ip_convertimage/6.7.0+galaxy3 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/binary2labelimage/ip_binary_to_labelimage/0.5+galaxy0 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/colorize_labels/colorize_labels/3.2.1+galaxy3 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/count_objects/ip_count_objects/0.0.5-2 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/image_math/image_math/1.26.4+galaxy2 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/overlay_images/ip_overlay_images/0.0.4+galaxy4 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/repeat_channels/repeat_channels/1.26.4+galaxy0 View in ToolShed
toolshed.g2.bx.psu.edu/repos/imgteam/voronoi_tesselation/voronoi_tessellation/0.22.0+galaxy3 View in ToolShed

To use these workflows in Galaxy you can either click the links to download the workflows, or you can right-click and copy the link to the workflow which can be used in the Galaxy form to import workflows.

Importing into Galaxy

Below are the instructions for importing these workflows directly into your Galaxy server of choice to start using them!
Hands On: Importing a workflow
  1. Click on galaxy-workflows-activity Workflows in the Galaxy activity bar (on the left side of the screen, or in the top menu bar of older Galaxy instances). You will see a list of all your workflows
  2. Click on galaxy-upload Import at the top-right of the screen
  3. Provide your workflow
    • Option 1: Paste the URL of the workflow into the box labelled “Archived Workflow URL”
    • Option 2: Upload the workflow file in the box labelled “Archived Workflow File”
  4. Click the Import workflow button

Below is a short video demonstrating how to import a workflow from GitHub using this procedure:

Video: Importing a workflow from URL

Version History

Version Commit Time Comments
1 3288013df 2025-04-29 10:49:45 Add tests, correct linting errors, add scatter plot

For Admins

Installing the workflow tools

wget https://training.galaxyproject.org/training-material/topics/imaging/tutorials/voronoi-segmentation/workflows/Voronoi-segmentation.ga -O workflow.ga
workflow-to-tools -w workflow.ga -o tools.yaml
shed-tools install -g GALAXY -a API_KEY -t tools.yaml
workflow-install -g GALAXY -a API_KEY -w workflow.ga --publish-workflows