VessMorphoVis icon indicating copy to clipboard operation
VessMorphoVis copied to clipboard

CLI Bugs

Open faberno opened this issue 2 years ago • 1 comments

Hey, first of all thanks for this great library, it's a big help. I wanted to report some bugs I encountered when using the CLI to reconstruct a mesh.

  • The tessellation-level option is called tessellation-ratio in the code. This fails when arguments.tessellation_ratio is called https://github.com/BlueBrain/VessMorphoVis/blob/90446383cef5caa4f9a8d8613a4a9a04c293fdf6/vmv/options/vessmorphovis_options.py#L171 Quickfixing this by changing the line to arguments.tessellation_level allows the program to continue, but setting the tessellation to another value than 1.0 will cause a TypeError: Converting py args to operator properties: : keyword "apply_as" unrecognized in the mesh builder.

  • vmv.file does not have a function read_morphology_from_file https://github.com/BlueBrain/VessMorphoVis/blob/90446383cef5caa4f9a8d8613a4a9a04c293fdf6/vmv/interface/cli/mesh_reconstruction.py#L298

  • only cli_options.mesh.export_obj is used to determine if vmv.file.export_mesh_object should be called, this ignores for example export-vascular-mesh-stl https://github.com/BlueBrain/VessMorphoVis/blob/90446383cef5caa4f9a8d8613a4a9a04c293fdf6/vmv/interface/cli/mesh_reconstruction.py#L112

  • vmv.file.export_mesh_object gets wrong arguments https://github.com/BlueBrain/VessMorphoVis/blob/90446383cef5caa4f9a8d8613a4a9a04c293fdf6/vmv/interface/cli/mesh_reconstruction.py#L113-L116

  • Even when mesh_objects from vmv.scene.get_list_of_meshes_in_scene() is just one mesh, it's still a list object https://github.com/BlueBrain/VessMorphoVis/blob/90446383cef5caa4f9a8d8613a4a9a04c293fdf6/vmv/interface/cli/mesh_reconstruction.py#L100-L109 I just fixed it by setting mesh_object = mesh_objects[0] when len(mesh_objects) == 1

When these points were fixed, everything worked as expected. If you have any questions I can provide more accurate descriptions.

faberno avatar Oct 15 '23 15:10 faberno

Dear @faberno Thanks for your kind help. To be able to add you in the contributors list, would you please make a pull request so I can merge it to have your contribution shown in the repo.

marwan-abdellah avatar Oct 16 '23 05:10 marwan-abdellah