# HG changeset patch # User imgteam # Date 1699623897 0 # Node ID f70b215d155c35d7bef530c0b7fd4b62c6393fda # Parent dba87c4b32d31311bd866b766c027a7b46e3e3a0 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_simple_filter/ commit 56e3f647d08d5e6c973d5e6cd89bb677db6473ab 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 @@ -1,5 +1,12 @@ - - applies a standard filter to an image + + with scikit-image + + operation_3443 + + + scikit-image + scikit-image + scikit-image numpy @@ -12,7 +19,7 @@ ]]> - + @@ -24,7 +31,7 @@ - + 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 @@ -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__":