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 option to save vispy generated meshdata #278

Closed
sanjayankur31 opened this issue Nov 29, 2023 · 5 comments
Closed

Add option to save vispy generated meshdata #278

sanjayankur31 opened this issue Nov 29, 2023 · 5 comments
Assignees
Labels
good first issue A good issue for newcomers to work on Help wanted T: enhancement Type: enhancement

Comments

@sanjayankur31
Copy link
Member

This will allow visualisation in other tools, such as paraview.

This should be simple enough, given that vispy provides the required I/O functions. We only have to save the mesh after we generate it

https://vispy.org/api/vispy.io.mesh.html#vispy.io.mesh.read_mesh

@sanjayankur31 sanjayankur31 added T: enhancement Type: enhancement Help wanted good first issue A good issue for newcomers to work on labels Nov 29, 2023
@sanjayankur31 sanjayankur31 moved this from 🆕 New to 📋 Backlog in NeuroML backlog Nov 29, 2023
@Dhruvanshu-Joshi
Copy link

Hi @sanjayankur31 ,
I would like to work on this issue. I did read the codebase and according to my understanding, the PlotMorphologyVispy currently uses vispy for visualisation. I believe that a solution to this would involve adding a new parameter to plot_3D_cell_morphology. Based on the truth value of this parameter, we can make calls to new functions: save_meshdata_to_file which will use vispy's write_mesh function to save the mesh files.
Is this what you had in mind and can you please assign this issue to me?

@sanjayankur31
Copy link
Member Author

Hi @Dhruvanshu-Joshi , yes that sounds correct. Do take a look at what common formats for storing mesh data are. I think the paraview docs do have some information on that. The ideal case would be that our code generates the mesh in a standard format so that any other tools can be used to then visualise it.

(A complementary tweak could also be to allow our methods to then read these meshes and visualise them)

Assigning this to you now. Thanks very much for working on this.

A few notes:

  • do base your new branch against the development branch
  • do use a virtualenv and run all the tests: run pip install -e .[dev] should install all the necessary deps, and test.sh should run them
  • there's also pre-commit in use, so do run pre-commit install in your venv to get that set up
  • do use conventional commits

@sanjayankur31 sanjayankur31 moved this from 📋 Backlog to 🏗 In progress in NeuroML backlog Mar 1, 2024
@Dhruvanshu-Joshi
Copy link

Hi @sanjayankur31 ,
I am able to save the 3d mesh in .obj and .gz format only as these are the only formats supported by vispy yet.

@sanjayankur31
Copy link
Member Author

OK, lets use them to begin with then. I expect the user will have to specify the file name to save to, and we can check that it's either "obj" or "gz".

Could you please work on a PR that will add the new option to save the mesh to begin with?

@Dhruvanshu-Joshi
Copy link

Hey @sanjayankur31
I have opened a PR for this issue. Sorry it took a while as I am in between my mid semester exams.

@sanjayankur31 sanjayankur31 linked a pull request Apr 16, 2024 that will close this issue
4 tasks
sanjayankur31 added a commit that referenced this issue Aug 23, 2024
Based on @Dhruvansu-Joshi 's PR:
#316

Fixes #278
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in NeuroML backlog Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good issue for newcomers to work on Help wanted T: enhancement Type: enhancement
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants