# HG changeset patch # User imgteam # Date 1699913564 0 # Node ID 3bd767eee603887d9622e831b2535ec1ae23cfcd # Parent cfe88c6041e94beeaefd17886dd2e6b4aa0a9713 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/wsi_extract_top_view/ commit 2286a6c9da88596349ed9d967c51541409c0a7bf diff -r cfe88c6041e9 -r 3bd767eee603 wsi_extract_top_view.py --- a/wsi_extract_top_view.py Wed Dec 18 05:03:44 2019 -0500 +++ b/wsi_extract_top_view.py Mon Nov 13 22:12:44 2023 +0000 @@ -1,14 +1,14 @@ import argparse + +import numpy as np import openslide -import os -import fnmatch import skimage.io -import numpy as np - + + def wsi_extract_top_view(input_path, out_path): img_raw = openslide.OpenSlide(input_path) - top_size = img_raw.level_dimensions[len(img_raw.level_dimensions)-1] - img_area = img_raw.read_region((0,0), len(img_raw.level_dimensions)-1, top_size) + top_size = img_raw.level_dimensions[len(img_raw.level_dimensions) - 1] + img_area = img_raw.read_region((0, 0), len(img_raw.level_dimensions) - 1, top_size) img_area = np.asarray(img_area, dtype=np.uint8) skimage.io.imsave(out_path, img_area, plugin="tifffile") @@ -18,5 +18,5 @@ parser.add_argument('input_file', type=argparse.FileType('r'), help='input file') parser.add_argument('out_file', help='out file') args = parser.parse_args() - + wsi_extract_top_view(args.input_file.name, args.out_file) diff -r cfe88c6041e9 -r 3bd767eee603 wsi_extract_top_view.xml --- a/wsi_extract_top_view.xml Wed Dec 18 05:03:44 2019 -0500 +++ b/wsi_extract_top_view.xml Mon Nov 13 22:12:44 2023 +0000 @@ -1,5 +1,8 @@ - - from whole-slice image + + with OpenSlide + + operation_3443 + scikit-image numpy @@ -27,7 +30,7 @@ **What it does** - Extracts the top view from a whole-slice image, also known as virtual slide, which are high-resolution images used in digital pathology. + Extracts the top view from a whole-slide image, also known as virtual slide, which are high-resolution images used in digital pathology. 10.1016/j.jbiotec.2017.07.019