# HG changeset patch # User imgteam # Date 1713946375 0 # Node ID 2495f8b2aefdae91d764a651272daa1d6d8da9bd # Parent 002f7bad3e82010ad2ec9f0f2a7fc05d0a0f8ff6 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/overlay_images/ commit c86a1b93cb7732f7331a981d13465653cc1a2790 diff -r 002f7bad3e82 -r 2495f8b2aefd overlay_images.py --- a/overlay_images.py Thu Apr 04 15:25:58 2024 +0000 +++ b/overlay_images.py Wed Apr 24 08:12:55 2024 +0000 @@ -7,6 +7,7 @@ import argparse +import giatools.io import matplotlib.colors import matplotlib.pyplot as plt import numpy as np @@ -18,7 +19,7 @@ def read_im_gray(fn): - img = skimage.io.imread(fn) + img = giatools.io.imread(fn) nDims = len(img.shape) assert nDims in [2, 3], 'this tool only supports single 2D images' if nDims == 3 and img.shape[-1] in [3, 4]: @@ -61,8 +62,8 @@ def blending(im1_fn, im2_fn, out_fn, alpha=0.5): - im1 = skimage.io.imread(im1_fn) - im2 = skimage.io.imread(im2_fn) + im1 = giatools.io.imread(im1_fn) + im2 = giatools.io.imread(im2_fn) assert im1.shape == im2.shape, 'Two images should have the same dimension' out_im = (1 - alpha) * im1 + alpha * im2 if len(im1.shape) > 3: @@ -72,8 +73,8 @@ def seg_contour(im1_fn, im2_fn, out_fn, linewidth, color='#ff0000', show_label=False, label_color='#ffff00'): - img = skimage.io.imread(im1_fn) - labels = skimage.io.imread(im2_fn) + img = giatools.io.imread(im1_fn) + labels = giatools.io.imread(im2_fn) result = get_rgb8_copy(img) cp = ContourPaint(labels, linewidth, where='center') diff -r 002f7bad3e82 -r 2495f8b2aefd overlay_images.xml --- a/overlay_images.xml Thu Apr 04 15:25:58 2024 +0000 +++ b/overlay_images.xml Wed Apr 24 08:12:55 2024 +0000 @@ -4,7 +4,7 @@ creators.xml tests.xml 0.0.4 - 1 + 2 @@ -21,6 +21,7 @@ matplotlib tifffile numpy + giatools