Previous changeset 1:dba87c4b32d3 (2019-07-18) Next changeset 3:6c4b22ef2b81 (2024-04-04) |
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_simple_filter/ commit 56e3f647d08d5e6c973d5e6cd89bb677db6473ab |
modified:
filter.xml filter_image.py |
b |
diff -r dba87c4b32d3 -r f70b215d155c filter.xml --- a/filter.xml Thu Jul 18 08:51:58 2019 -0400 +++ b/filter.xml Fri Nov 10 13:44:57 2023 +0000 |
b |
@@ -1,5 +1,12 @@ -<tool id="ip_filter_standard" name="Filter Image" version="0.0.3"> - <description>applies a standard filter to an image</description> +<tool id="ip_filter_standard" name="Filter 2D image" version="0.0.3-3"> + <description>with 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> @@ -12,7 +19,7 @@ ]]> </command> <inputs> - <param name="filter_type" type="select" label="Image type"> + <param name="filter_type" type="select" label="Filter type"> <option value="median" selected="True">Median</option> <option value="gaussian">Gaussian Blur</option> <option value="prewitt">Prewitt</option> @@ -24,7 +31,7 @@ </inputs> <outputs> <data format="tiff" name="output" /> - </outputs> + </outputs> <tests> <test> <param name="input" value="sample.tif" /> |
b |
diff -r dba87c4b32d3 -r f70b215d155c filter_image.py --- a/filter_image.py Thu Jul 18 08:51:58 2019 -0400 +++ b/filter_image.py Fri Nov 10 13:44:57 2023 +0000 |
b |
@@ -1,19 +1,19 @@ import argparse import sys -import warnings -import numpy as np -import skimage.io + import skimage.filters +import skimage.io import skimage.util +from skimage import img_as_uint from skimage.morphology import disk -from skimage import img_as_uint + filterOptions = { - 'median' : lambda img_raw, radius: skimage.filters.median(img_raw, disk(radius)), - 'gaussian' : lambda img_raw, radius: skimage.filters.gaussian(img_raw, sigma=radius), - 'prewitt' : lambda img_raw, radius: skimage.filters.prewitt(img_raw), - 'sobel' : lambda img_raw, radius: skimage.filters.sobel(img_raw), - 'scharr' : lambda img_raw, radius: skimage.filters.scharr(img_raw), + 'median': lambda img_raw, radius: skimage.filters.median(img_raw, disk(radius)), + 'gaussian': lambda img_raw, radius: skimage.filters.gaussian(img_raw, sigma=radius), + 'prewitt': lambda img_raw, radius: skimage.filters.prewitt(img_raw), + 'sobel': lambda img_raw, radius: skimage.filters.sobel(img_raw), + 'scharr': lambda img_raw, radius: skimage.filters.scharr(img_raw), } if __name__ == "__main__": |