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

add dendrogram selection on 2D image viewer #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

PennyQ
Copy link

@PennyQ PennyQ commented Jul 25, 2016

as above, it now an icon on 2D image viewer.


# assume I got the dendrogram structure here as d
d = data[dendro_att] # here is ndarray data

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astrofrog How to get dendrogram structure within ImageWidget? data['structure' will return a ndarray not a real dendrogram object.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data = self.widget.client.display_data -> data which returns a datacollection
check label='dendrogram' for later

@PennyQ
Copy link
Author

PennyQ commented Jul 27, 2016

I guess we need all 'children' instead of 'parent', I know 'child' is not in the data object, keep it like this first? (see the figure below)

Icon is still not shown as checked yet, what's the size of it again, 72*72 + alpha channel? maybe I could make another one ;)
@astrofrog

image

@astrofrog
Copy link
Member

@PennyQ - it should be easy to find the children given a structure. Given a structure idx, you can find its children (it might have several) by doing (I think):

children = np.where(parent == idx)[0]

@astrofrog
Copy link
Member

So then given a structure, you need to loop recursively over all the children of a structure in order to select the whole structure.

@PennyQ
Copy link
Author

PennyQ commented Jul 29, 2016

@astrofrog It's updated with 1) finding all children branches 2) add mouse dragging to extend selection 3) update with a new icon figure
One todo should be now show the icon if there is no dendrogram file. I will think about adding it to 3D viewer after this is merged ;)

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.

2 participants