# HG changeset patch # User imgteam # Date 1549740721 18000 # Node ID 9ddb11b272ee42dfcdba686fcfe7b62035e084ee planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/colocalization_viz/ commit c3f4b766f03770f094fda6bda0a5882c0ebd4581 diff -r 000000000000 -r 9ddb11b272ee colocalization_viz.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.py Sat Feb 09 14:32:01 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 9ddb11b272ee colocalization_viz.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.xml Sat Feb 09 14:32:01 2019 -0500 @@ -0,0 +1,34 @@ + + of two segmentation maps + + scikit-image + numpy + + + + + + + + + + + + + + + + + + + + **What it does** + + This tool overlays two segmentation maps and displays the colocalization results. + + + 10.1016/j.jbiotec.2017.07.019 + + diff -r 000000000000 -r 9ddb11b272ee test-data/out.png Binary file test-data/out.png has changed diff -r 000000000000 -r 9ddb11b272ee test-data/sample1.tiff Binary file test-data/sample1.tiff has changed diff -r 000000000000 -r 9ddb11b272ee test-data/sample2.tiff Binary file test-data/sample2.tiff has changed