# HG changeset patch # User imgteam # Date 1699913506 0 # Node ID 30ca5d5d03ec6d770971d6856ebc0559c8584606 # Parent 9bd039f468432a95be10d9ca30c46575322dc45b planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit 2286a6c9da88596349ed9d967c51541409c0a7bf diff -r 9bd039f46843 -r 30ca5d5d03ec points2label.py --- a/points2label.py Mon Jul 22 05:04:37 2019 -0400 +++ b/points2label.py Mon Nov 13 22:11:46 2023 +0000 @@ -1,9 +1,11 @@ import argparse import sys +import warnings + import numpy as np +import pandas as pd import skimage.io -import pandas as pd -import warnings + def points2label(labels, shape, output_file=None, has_header=False, is_TSV=True): labelimg = np.zeros([shape[0], shape[1]], dtype=np.int32) @@ -21,7 +23,7 @@ for i in range(0, len(df)): a_row = df.iloc[i] - labelimg[a_row[0], a_row[1]] = i+1 + labelimg[a_row[0], a_row[1]] = i + 1 if output_file is not None: with warnings.catch_warnings(): @@ -30,6 +32,7 @@ else: return labelimg + if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('label_file', type=argparse.FileType('r'), default=sys.stdin, help='label file') diff -r 9bd039f46843 -r 30ca5d5d03ec points2label.xml --- a/points2label.xml Mon Jul 22 05:04:37 2019 -0400 +++ b/points2label.xml Mon Nov 13 22:11:46 2023 +0000 @@ -1,5 +1,11 @@ - - Points to Label Image + + + + operation_3443 + + + galaxy_image_analysis + numpy scikit-image