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

Annotation features mostly related to MultiscaleAnnotationSource #493

Closed
wants to merge 3 commits into from

Conversation

chrisj
Copy link
Contributor

@chrisj chrisj commented Sep 29, 2023

All of these were developed for our cave annotation datasource. I could add the cave datasource here or keep it a separate PR, whichever you prefer.

Each of these features still needs discussion.

53821ff

Mostly happy with this but I left out sorting. We don't always want to sort annotations by distance, we often want the order from the server response. We also are only using 1 chunk the size of the dataset for annotations.

cee0146

This feature makes it easier to quickly glance at the annotations, more useful when the segment list is small. Because there can be multiple annotation lists visible at a time, I'm currently relying on tabIndex to make it focusable so I can listen to key events directly on that element. It isn't ideal but it's robust.

8398ac5
Screen Shot 2023-09-28 at 6 52 12 PM

A list of enum values colored by a default hash function (exposed in the shader as hashColor) appears when hovering over enum in the neuroglancer-annotation-shader-property-list.

The hashColor function is really nice for quickly making a useful annotation shader. I could add a seed argument. The list element would no longer match unless we started to parse the shader for that which is probably something to avoid.

If I change the shader prop code so that it supports prop_cell_type == prop_cell_type("b") instead as you suggested #481 (reply in thread) Does glsl allow prop_cell_type to be both a value and a function or would it be a pre-compilation step?

…ion list, also pins and jumps to each annotation
…iven value. Exposed annotation propery enum labels in shader as an optional replacement to the enum value. Added UI that shows the list of enum labels colored using it's hashColor.
@@ -28,6 +28,33 @@ import {Trackable} from './util/trackable';

const NUM_COMPONENTS = 2;

export class BasicHashColorShaderManager {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left this here for now in case we don't want to go ahead with this approach

this.changed.dispatch();
}
}));
groupContext.registerDisposer(visibleSegments.changed.add(this.changed.dispatch));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was simplified because I need the annotation list to update anytime the segment list changes

@chrisj
Copy link
Contributor Author

chrisj commented Nov 29, 2023

Closed in favor of separate pull requests.

@chrisj chrisj closed this Nov 29, 2023
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.

None yet

1 participant