Error when exporting 3d mesh model to VTU file, and invisible VTK file in Paraview

I have created a model by using Segment Mesher with tetgen to create a 3d tetrahedral mesh. However, when I go to the Data module and try to export the model to file, I get the following error when selecting the VTU format:

  • Error: No writer found to write file /path/to/folder/Model.vtu of type ModelFile.
  • Error: Error encountered while exporting Model.

Do I need to install something for this to work?

When exporting to the VKT file format instead, I do get an output file which seems to contain the mesh, however, in Paraview this mesh is invisible for some reason, no matter which Display Representation or Colouring I use. I was able to see it using a pyvista visualization within Python.

Update: This was when using the mouse right click menu in the Data module for the export. However, if I go to the “save data” button, and select the Model.vtk that is on the list of data to save, I can save to VTU by selecting VTU in the drop-down menu there. Also, if I select VKT there, the resulting file IS visible in Paraview…

So for some reason there is a big difference between using the “Export to file” dropdown menu for the Model in the Data module, and to do it within the “Save data” function of Slicer.

This is with 3D Slicer 5.1.0-2022-09-01 on Debian Linux.

The difference between export and save should be that export does not modify the nodes in the scene (adjusting storage nodes or marking nodes as already saved since the last changes).

When I create a model node in Slicer I don’t see the VTU option, not in the save dialog and not in the export dialog. Maybe I am not checking the correct node type.