GithubHelp home page GithubHelp logo

opening .obj about brainglobe-atlasapi HOT 10 CLOSED

FedeClaudi avatar FedeClaudi commented on May 22, 2024
opening .obj

from brainglobe-atlasapi.

Comments (10)

vigji avatar vigji commented on May 22, 2024

I would definitively not add vtkplotter as a requirement in this package!

Actually, I think that the current representation of the mesh data is the one that makes the most sense to expose in this package, as everything more specific should be specified in visualisation tools that can load .obj files as vtkplotter does. Plus, many applications for mesh visualisation support a straightforward mesh instantiation from the triplet of vertices, faces and edges. I have not tried it, but from the documentation of vtkplotter it seems that the Actors can also be instantiated from a list of [vertices, faces], although I have not tested it!

from brainglobe-atlasapi.

FedeClaudi avatar FedeClaudi commented on May 22, 2024

Yeah you can do that, it just seems like a bit of a roundabout way of going about this.
You can get the position of vertices and faces out of a vtkactor as well if needed, but I think that hardly ever would one need to work directly with that.

Also a lot of functions like get_region_unilateral, get_region_center_of_mass etc work nicely with vtkplotter and I wouldn't be too keen to re-write them from scratch

from brainglobe-atlasapi.

FedeClaudi avatar FedeClaudi commented on May 22, 2024

either way it's not a huge problem given that we have methods like get_mesh_file_from_name as well

from brainglobe-atlasapi.

vigji avatar vigji commented on May 22, 2024

uhm, I see your point!
I will see whether there is a lighter dependency that can solve the problem as neatly as vtkplotter would. In the meantime, maybe we could have vtkplotter as an optional dependency so that all parts that don't need mesh operations could work without it?

from brainglobe-atlasapi.

vigji avatar vigji commented on May 22, 2024

probably trimesh would be a reasonable dependency to handle these mesh operations. What are the potential operations that you have encountered working with region meshes so far?
I can see already:

  1. Make a mesh unilateral;
  2. check if point is contained in a region (could also be handled with the raster region annotation stack probably);

from brainglobe-atlasapi.

FedeClaudi avatar FedeClaudi commented on May 22, 2024

of the top of my head:

  1. get random points in mesh (useful for debugging sometimes)
  2. get mesh center of mass

2, 3, 4 are implemented by default in vtkplotter Mesh ;)

from brainglobe-atlasapi.

FedeClaudi avatar FedeClaudi commented on May 22, 2024

also this might be useful: https://github.com/nschloe/meshio

from brainglobe-atlasapi.

vigji avatar vigji commented on May 22, 2024

So, maybe the most convenient path is the following: we temporarily add the optional vtkplotter dependency, have tests working for the operations that require it, and then try to purge it out without affecting the test results.

from brainglobe-atlasapi.

adamltyson avatar adamltyson commented on May 22, 2024

Sounds good. I'd like to avoid large dependencies as far as possible (in the end we may have 10+ packages that need to be interoperable), but there's no reason not to have them now and try to remove later.

from brainglobe-atlasapi.

FedeClaudi avatar FedeClaudi commented on May 22, 2024

sounds like we found an agreement, will close for now

from brainglobe-atlasapi.

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.