Skip to content

Commit

Permalink
Update 2d_simple_filter tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin committed Apr 23, 2024
1 parent 3b1838b commit 3774860
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/2d_simple_filter/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<import>creators.xml</import>
<import>tests.xml</import>
<token name="@TOOL_VERSION@">1.12.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
</macros>
<creator>
<expand macro="creators/bmcv" />
Expand All @@ -20,6 +20,7 @@
<requirement type="package" version="1.26.4">numpy</requirement>
<requirement type="package" version="0.22.0">scikit-image</requirement>
<requirement type="package" version="2024.2.12">tifffile</requirement>
<requirement type="package" version="0.1">giatools</requirement>
</requirements>
<command detect_errors="aggressive"><![CDATA[
Expand Down
3 changes: 2 additions & 1 deletion tools/2d_simple_filter/filter_image.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse

import giatools.io
import scipy.ndimage as ndi
import skimage.io
import skimage.util
Expand All @@ -23,6 +24,6 @@
parser.add_argument('size', type=float, help='Size of the filter (e.g., radius, sigma)')
args = parser.parse_args()

im = skimage.io.imread(args.input.name)
im = giatools.io.imread(args.input.name)
res = filters[args.filter](im, args.size)
skimage.io.imsave(args.output.name, res, plugin='tifffile')

0 comments on commit 3774860

Please sign in to comment.