# HG changeset patch # User galaxyp # Date 1686760621 0 # Node ID 064b53fd3131e3bc24e2b421841e905a5878f72c # Parent b5e9cebb27e393a60960cd044aefaf73d2ca3fd6 planemo upload for repository hhttps://github.com/npinter/ROIsplitter commit e08a178a7c35c0673f6bfc163614a8fc730ffc6c diff -r b5e9cebb27e3 -r 064b53fd3131 qupath_roi_splitter.py --- a/qupath_roi_splitter.py Tue Apr 25 09:30:06 2023 +0000 +++ b/qupath_roi_splitter.py Wed Jun 14 16:37:01 2023 +0000 @@ -22,11 +22,11 @@ tma_name = qupath_roi["name"] cell_types = [ct.rsplit(" - ", 1)[-1] for ct in qupath_roi["featureNames"]] - # create numpy array with white background - img = np.zeros((dim_plt[1], dim_plt[0], 3), dtype="uint8") - img.fill(255) + for cell_type in cell_types: + # create numpy array with white background + img = np.zeros((dim_plt[1], dim_plt[0], 3), dtype="uint8") + img.fill(255) - for cell_type in cell_types: for i, roi in enumerate(qupath_roi["features"]): if roi["properties"]["classification"]["name"] == cell_type: if len(roi["geometry"]["coordinates"]) == 1: diff -r b5e9cebb27e3 -r 064b53fd3131 qupath_roi_splitter.xml --- a/qupath_roi_splitter.xml Tue Apr 25 09:30:06 2023 +0000 +++ b/qupath_roi_splitter.xml Wed Jun 14 16:37:01 2023 +0000 @@ -1,4 +1,4 @@ - + Split ROI coordinates of QuPath TMA annotation by cell type (classification) geojson @@ -34,8 +34,8 @@ - - + +