Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROI export with Well ID #173

Merged
merged 10 commits into from
Jan 13, 2022
Merged

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Mar 7, 2020

When exporting ROIs to csv from SPW data, it is useful to include Well ID (and Well row, column and label).
This also adds the option to NOT export the Points coordinates string, which can cause a big increase in the size of the csv file.

This was needed for OMERO.parade prototype demo at https://youtu.be/FyjGhZxx6es?t=899

To test:

  • Export ROIs for a Screen or Plate.
  • Check that the CSV has columns for Well ID, row, column and label.
  • Check that un-checking the "Include_Points_Coords" option exports CSV without Points values.

@will-moore will-moore changed the title Include well_id column for SPW images ROI export with Well ID Mar 30, 2020
@mtbc
Copy link
Member

mtbc commented Jun 2, 2020

Should we also omit the Points heading from COLUMN_NAMES if not include_points?

@will-moore
Copy link
Member Author

Good to merge?

@jburel
Copy link
Member

jburel commented Jul 9, 2020

I understand that was needed for the prototype.
Was the script tested when there is a large number of ROis and with the "include" points flag on.
I am wondering if we should not indicate a limit, maybe in the help, before it starts going sideways

@will-moore
Copy link
Member Author

The amount of work to decide on a limit (which will depend on your setup as well as the number of columns in the table and the size of the Polygons you're exporting) is not worth it I think.

The failure of this script when exporting large numbers of Polygons/Polylines is not new, and we haven't had anyone reporting problems.

@will-moore
Copy link
Member Author

Another option is to export simplified Polygon to preserve the shape but without a long list of coordinates.
See https://shapely.readthedocs.io/en/latest/manual.html#object.simplify
As used at https://docs.google.com/presentation/d/1QzKYP6sXPefBMNfY4PW4H0AMoWVbw9HeNoweLmJg17Y/edit#slide=id.g823da5adf3_0_105

@joshmoore
Copy link
Member

Might be interesting to also use that as an opportunity to allow exporting WKT (https://shapely.readthedocs.io/en/latest/manual.html#well-known-formats) so we could begin building up familiarity with that.

@will-moore
Copy link
Member Author

Trying to get some old PRs merged...
Can re-list if needed? But I think it has been approved already.

@jburel
Copy link
Member

jburel commented Feb 26, 2021

The PR was approved prior to that discussion and was part of some work on a prototype. So it seems like a good opportunity to test shapely as mentioned above

@will-moore
Copy link
Member Author

The use of shapely is really unrelated to this PR (adding Well IDs).
It will need a bit of investigation/decision on whether to add the shapely dependency to this script and script parameter options for using it.
I added the comment on this PR since there was already a discussion about Points being too verbose. But that issue is not due to this PR. I have created a separate issue for that at #185

@jburel
Copy link
Member

jburel commented Mar 24, 2021

The points were previously included by default. To keep the same behaviour the include_points flag should be set to true in the various functions so the original behaviour is kept.

@dominikl
Copy link
Member

dominikl commented Sep 2, 2021

Looks good to me. Tested on merge-ci, does what it says 👍

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/how-to-use-cellprofiler-per-image-results-from-plate-analyses-as-source-for-omero-parade/59894/9

@will-moore
Copy link
Member Author

Re-listing for review again - trying to get some more PRs closed...

@jburel jburel merged commit 29bbce7 into ome:develop Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants