Skip to content

SEM image analysis: DiameterJ with Auto thresholding - #1970

Merged
bgruening merged 30 commits into
bgruening:masterfrom
anuprulez:fiji_imageJ
Aug 31, 2026
Merged

SEM image analysis: DiameterJ with Auto thresholding#1970
bgruening merged 30 commits into
bgruening:masterfrom
anuprulez:fiji_imageJ

Conversation

@anuprulez

@anuprulez anuprulez commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This PR adds a SEM image analysis tool based on Fiji, DiameterJ with different Auto-thresholding methods

It supports three segmentation methods:

Discussion:
https://gitlab.cc-asp.fraunhofer.de/materialvital-digital/orga/-/work_items/97

@bgruening @paulzierep: we can share this tool with our collaborators and ask their feedback

Analysis image:

PVA-A_004.tif
PVA-A_004

Analysed by collaborators

  • With Huang auto-thresholding
PVA-A_004_T1_Compare
  • Huang auto-thresholding with Galaxy tool (this PR)
input__auto_thresholding_huang_Compare_Galaxytool_T1

Comment thread tools/sem_analysis/sem_analysis.xml Outdated
Comment thread tools/sem_analysis/sem_analysis.xml Outdated
<token name="@TOOL_VERSION@">1-018</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">24.2</token>
<token name="@CONTAINER_VERSION@">0.2</token>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the container version not the same as the tool version?

Comment thread tools/sem_analysis/sem_analysis.xml Outdated
mkdir -p results &&
export ANALYSIS_RESULTS_DIR='results' &&
ln -s '$input_image' input.tif &&
set -- --input input.tif --output results --segmentation '$segmentation.workflow' &&

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this set -- is needed.

Comment thread tools/sem_analysis/sem_analysis.xml
Comment thread tools/sem_analysis/sem_analysis.xml Outdated
<option value="pixel_size">Specify pixel size directly</option>
</param>
<when value="hfw">
<param name="hfw_um" type="float" value="27.04" label="Horizontal field width (µm)">

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a min/max value useful here?

</param>
<when value="auto-thresholding"/>
<when value="recursive-srm">
<param name="srm_q" type="integer" value="100" min="1" label="Starting SRM granularity (q)"/>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use argument here and elsewhere?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

Comment thread tools/sem_analysis/sem_analysis.xml Outdated
</param>
<when value="hfw">
<param name="hfw_um" type="float" value="27.04" label="Horizontal field width (µm)">
<validator type="expression" message="Horizontal field width must be greater than zero">value &gt; 0</validator>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply use min=0?

@bgruening bgruening left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a creator tag

anuprulez and others added 2 commits August 31, 2026 10:14
Co-authored-by: Björn Grüning <bjoern@gruenings.eu>

@SaimMomin12 SaimMomin12 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Some minor comments.

Comment thread tools/sem_analysis/sem_analysis.xml Outdated
<macros>
<token name="@TOOL_VERSION@">1-018</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">24.2</token>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<token name="@PROFILE@">24.2</token>
<token name="@PROFILE@">25.0</token>

Comment thread tools/sem_analysis/sem_analysis.xml Outdated
<organization name="European Galaxy Team" url="https://galaxyproject.org/eu/"/>
</creator>
<requirements>
<container type="docker">quay.io/galaxy/sem-analysis-fiji-diameterj:@CONTAINER_VERSION@</container>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<container type="docker">quay.io/galaxy/sem-analysis-fiji-diameterj:@CONTAINER_VERSION@</container>
<container type="docker">quay.io/galaxy/sem-analysis-fiji-diameterj:@TOOL_VERSION@</container>

Can we use TOOL_VERSION here? This removes redundancy of additional token

@@ -0,0 +1,19 @@
#!/usr/bin/env python3
"""Convert all DiameterJ radius-plot TIFFs in a result directory to PNG."""

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this actually needed? Is TIFF not useful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. But not sure what our collaborators will require. We share them the tool and fix other feedbacks along with this.

@bgruening bgruening left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things could be improved, like the arguments, but good to go from my side.

@bgruening
bgruening merged commit 3c6d19e into bgruening:master Aug 31, 2026
10 checks passed
@anuprulez
anuprulez deleted the fiji_imageJ branch September 1, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants