Skip to content

Commit

Permalink
updates "Perform local thresholding" tool
Browse files Browse the repository at this point in the history
Also fixes a bug in the tests of the tool.
  • Loading branch information
kostrykin committed Nov 1, 2023
1 parent ffd1a33 commit 5f280ca
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 25 deletions.
29 changes: 18 additions & 11 deletions deprecated/tools/2d_auto_local_threshold/auto_local_threshold.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<tool id="ip_localthreshold" name="Local Threshold" version="0.0.3" profile="20.05">
<description>applies a local threshold algorithm to an image</description>
<requirements>
<tool id="ip_localthreshold" name="Perform local thresholding" version="0.0.3-2" profile="20.05">
<description>scikit-image</description>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<xrefs>
<xref type="bio.tools">scikit-image</xref>
<xref type="biii">scikit-image</xref>
</xrefs>
<requirements>
<requirement type="package" version="0.14.2">scikit-image</requirement>
<requirement type="package" version="1.15.4">numpy</requirement>
<requirement type="package" version="5.3.0">pillow</requirement>
<requirement type="package" version="0.15.1">tifffile</requirement>
</requirements>
<command detect_errors="aggressive">
<![CDATA[
python '$__tool_directory__/auto_local_threshold.py' '$input' '$output' $block_size $thresh_type $dark_background
]]>
</command>
<inputs>
</requirements>
<command detect_errors="aggressive">
<![CDATA[
python '$__tool_directory__/auto_local_threshold.py' '$input' '$output' $block_size $thresh_type $dark_background
]]>
</command>
<inputs>
<param name="input" type="data" format="tiff" label="Source file" />
<param name="thresh_type" type="select" label="Threshold Algorithm">
<option value="gaussian" selected="True">Gaussian</option>
Expand All @@ -30,7 +37,7 @@
<output name="output" value="out.tif" ftype="tiff" compare="sim_size"/>
<param name="thresh_type" value="gaussian"/>
<param name="block_size" value="429"/>
<param name="dark_backgroud" value="True"/>
<param name="dark_background" value="True"/>
</test>
</tests>
<help>
Expand Down
Binary file modified deprecated/tools/2d_auto_local_threshold/test-data/out.tif
Binary file not shown.
28 changes: 14 additions & 14 deletions tools/2d_auto_threshold/auto_threshold.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<tool id="ip_threshold" name="Threshold image" version="0.0.5-2" profile="20.05">
<description>scikit-image</description>
<description>scikit-image</description>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<xrefs>
<xref type="bio.tools">scikit-image</xref>
<xref type="biii">scikit-image</xref>
</xrefs>
<requirements>
<requirements>
<requirement type="package" version="0.18.1">scikit-image</requirement>
<requirement type="package" version="2020.10.1">tifffile</requirement>
</requirements>
<command detect_errors="aggressive">
<![CDATA[
python '$__tool_directory__/auto_threshold.py'
'$input'
./out.tif
'$th_method'
'$block_size'
'$dark_bg'
]]>
</command>
<inputs>
</requirements>
<command detect_errors="aggressive">
<![CDATA[
python '$__tool_directory__/auto_threshold.py'
'$input'
./out.tif
'$th_method'
'$block_size'
'$dark_bg'
]]>
</command>
<inputs>
<param name="input" type="data" format="tiff,png" label="Input image" />
<param name="th_method" type="select" label="Thresholding method">
<option value="otsu" selected="True">Otsu</option>
Expand Down

0 comments on commit 5f280ca

Please sign in to comment.