-
Notifications
You must be signed in to change notification settings - Fork 153
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
WIP: Add extended component #2373
Conversation
Here are what the basic interactions look like: |
@jfoster17 this is very nice! It looks like this will need rebasing due to conflicts. Would you like me to review this yet at this point or are there things you still need to work on before a first review? |
There are still a few more things I need to fix/add before this is ready for review. I will try to keep it to the smallest amount required to be useful though, so that it doesn't get too large. |
I wanted to highlight 79e4fa5, because it opens (or increases?) the potential for malicious session files and deserves some consideration. If I'm going to represent regions as Shapely objects we need something like this to enable save/restore of sessions that bundle the data. This also solves #2330. |
I'd rather not use allow_pickle if at all possible - is there any way we can serialize/deserialize the Shapely objects to strings? |
As noted in #2430, I will be splitting out Qt-related code into a separate repository - however that repository will have the same history as the present one here so it should be easy to split the Qt-specific parts of this PR into a separate PR to glue-qt. Sorry for the disruption! |
Closing in favor of #2442 |
Pull Request Template
Description
Here is one approach to displaying many regions (e.g. regions-as-data) in glue (ala #2351). I've implemented this for the first place I wanted it, which is as a different kind of ScatterLayer in the ImageViewer.
The pieces are basically:
ExtendedComponent(Component)
which is a list of Shapely geometriesRegionData(Data)
which is probably unnecessary (moreData
types are hard to support) but for now is used to determine if aData
object should be plotted as regions or as points.ScatterRegionLayerState
andScatterRegionLayerArtist
classes to deal with actually configuring and plotting regionsMajor unfinished things
It's much less clear what the best behavior is when adding RegionData to a scatterplot. The assumption is that if you have regions, you want to plot regions on an image (perhaps color-coded by another component). If you have a table of data about regions you might want to make a scatterplot that just shows those regions (i.e. you don't have an image and just want to see the geometry) or you might want to make a scatterplot 2 components of those regions.