Code Monkey home page Code Monkey logo

Comments (3)

jbms avatar jbms commented on May 28, 2024

Do I understand correctly that you have some other logic in Javascript that determines which of these ~100k cell centers should be visible, and you want some way of providing that visibility information to Neuroglancer?

This isn't something for which there is existing support. Potentially you could encode the visibility as a constant in the shader, e.g using a uint array to represent a bitvector, since then you could make use of the existing mechanism to modify the shader. However, I don't know if that would be too slow.

from neuroglancer.

martinxyz avatar martinxyz commented on May 28, 2024

With "constant in the shader" you mean putting the data into the shader string? Interesting idea, we could avoid modifying neuroglancer if that works.

Yes, currently we have an external widget to select the visibility of point-annotations. We'd also like to control color or size, so it will be more than one bit. Let's say a uint32 for each of the ~100k annotations.

I think now ideally, Neuroglancer would fetch the pre-computed annotation chunks as usual. Then we'd need some hook to generate/update our uint32 values for the annotation-IDs as they get rendered. (And a way to re-trigger rendering when we change them.) For this we probably would add a new webgl Buffer instead of modifiying the chunk-data? And then access that buffer from the shader. (If this doesn't sound too special-purpose, we may contribute it as a feature if we go that route.)

I've just thought of a (maybe silly) alternative: We could send our data to a custom backend server, change the layer's URL and let neuroglancer re-fetch the annotations as usual. The backend server would generate "pre-computed" annotations on-the-fly. (There is no "loopback" data-source to avoid the backend, I think?) But this may kill interactivity, and waste bandwith to re-download data we already have. (Would you expect this to leak all the data into a cache/memory for each update?)

from neuroglancer.

unidesigner avatar unidesigner commented on May 28, 2024

I was asking basically about the same thing for the backend-based solution in how to re-trigger annotation source fetching in #445. I'm closing this other issue. I know that @chrisj worked on a similar topic so maybe he wants to comment here.

from neuroglancer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.