# HG changeset patch # User thomaswollmann # Date 1547670608 18000 # Node ID 4e9bafbcf296713dae428e60dedfc0a0f0ca832c planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/colocalization_viz/ commit d93e1dd276027cfc3fb518236110395a23d96f66 diff -r 000000000000 -r 4e9bafbcf296 colocalization_viz.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.py Wed Jan 16 15:30:08 2019 -0500 @@ -0,0 +1,25 @@ +import skimage.io +import skimage.color +import numpy as np +import os +import sys +import warnings + +#TODO make importable by python script + +args = sys.argv + +def readImg(path): + img = skimage.io.imread(path) + if len(img.shape) > 2: + img = skimage.color.rgb2gray(img) + img = np.expand_dims(img > 0, 3) + return img + +im1 = readImg(args[1]) +im2 = readImg(args[2]) +res = np.concatenate((im1, im2, np.zeros_like(im1)), axis=2) * 1.0 + +with warnings.catch_warnings(): + warnings.simplefilter("ignore") + skimage.io.imsave(args[3], res) diff -r 000000000000 -r 4e9bafbcf296 colocalization_viz.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.xml Wed Jan 16 15:30:08 2019 -0500 @@ -0,0 +1,34 @@ + + + Colocalization of two segmentation maps + + scikit-image + numpy + + + + + + + + + + + + + + + + + + + + This tool overlays two segmentation maps and displays the colocalization results. + + + 10.1016/j.jbiotec.2017.07.019 + + diff -r 000000000000 -r 4e9bafbcf296 test-data/out.png Binary file test-data/out.png has changed diff -r 000000000000 -r 4e9bafbcf296 test-data/sample1.tiff Binary file test-data/sample1.tiff has changed diff -r 000000000000 -r 4e9bafbcf296 test-data/sample2.tiff Binary file test-data/sample2.tiff has changed