Open sanjayankur31 opened 7 months ago
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?
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:
pip install -e .[dev]
should install all the necessary deps, and test.sh
should run thempre-commit install
in your venv to get that set upHi @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.
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?
Hey @sanjayankur31 I have opened a PR for this issue. Sorry it took a while as I am in between my mid semester exams.
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