Hi,
I am creating personalised models. Since the last OpenSim edition (4.5) I cannot load surfaces for bodies that are not in a fixed vtp format. I receive the following errors:
"Visualizer couldn't open r_fibula.vtp because: SimTK Exception thrown at PolygonalMesh.cpp:411:
..
SimTK Exception thrown at PolygonalMesh.cpp:340:
...
Error detected by Simbody method Xml::Element::getValue(): Element <DataArray> is not a value element.
(Required condition 'isValueElement()' was not met.)"
or
"Visualizer couldn't open l_tibia.vtp because: SimTK Exception thrown at PolygonalMesh.cpp:411:
...
SimTK Exception thrown at Xml.cpp:723:
...
Error detected by Simbody method PolygonalMesh::loadVtpFile(): Only format="ascii" is supported for .vtp file DataArray elements, got format="appended" for Points DataArray.
(Required condition 'pointData.getRequiredAttributeValue("format") == "ascii"' was not met.)"
I have meshes that were converted from an .stl to .vtp with the help of 3DSlicer (in GUI) or pyVista (in Python).
How can I get around this problem?
Thank you in advance
vtp surface files
- Ekaterina Stansfield
- Posts: 10
- Joined: Mon Jul 03, 2017 5:37 am
- Mohsen Alizadeh Noghani
- Posts: 1
- Joined: Mon Sep 19, 2022 10:09 am
Re: vtp surface files
It seems I am experiencing a similar problem.
I started from a .vtp file from Rajagopal 2015 model, modified the mesh in Paraview, and exported as .vtp again; but I get the following error in OpenSim 4.5 when I load the model, and the geometry does not show up either.
I tested the previous releases. The results are as follows,
4.4: same error
4.3: crashes after loading the model
4.2: same error
4.1: same error
4.0: same error
3.3: works
Just for the record, the crash log of 4.3 starts like this,
I started from a .vtp file from Rajagopal 2015 model, modified the mesh in Paraview, and exported as .vtp again; but I get the following error in OpenSim 4.5 when I load the model, and the geometry does not show up either.
Code: Select all
Visualizer couldn't open hat_spine.vtp because: SimTK Exception thrown at PolygonalMesh.cpp:411:
Error detected by Simbody method PolygonalMesh::loadVtpFile(): Attempt to load a VTK PolyData (.vtp) file from file name '\FullBodyModel-4.0\Geometry\hat_spine.vtp' failed with message:
SimTK Exception thrown at Xml.cpp:723:
Error detected by Simbody method Xml::Element::getValue(): Element <DataArray> is not a value element.
(Required condition 'isValueElement()' was not met.)
(Required condition '!"failed"' was not met.)
4.4: same error
4.3: crashes after loading the model
4.2: same error
4.1: same error
4.0: same error
3.3: works
Just for the record, the crash log of 4.3 starts like this,
Code: Select all
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff8d3ba4c54, pid=19236, tid=0x00000000000033bc
#
# JRE version: OpenJDK Runtime Environment (Zulu 8.56.0.23-CA-win64) (8.0_302-b08) (build 1.8.0_302-b08)
# Java VM: OpenJDK 64-Bit Server VM (25.302-b08 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [SimTKcommon.dll+0x94c54]
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: vtp surface files
Thanks for reporting,
For the record, OpenSim version 3.3 used vtk's native libraries to load .vtp files so they were able to parse more vtk based files. As of version 4.0, due to switching to a visualizer that's not based on vtk, we use the Simtk native parsers instead, which are much smaller and were already included in OpenSim, but may not handle all possible vtk based files. Please open an issue and attach the problematic files and we'll investigate. You may try saving the meshes in paraview as .obj or .stl format which may handle the meshes more gracefully and can also be handled by OpenSim.
Hope this helps,
-Ayman
For the record, OpenSim version 3.3 used vtk's native libraries to load .vtp files so they were able to parse more vtk based files. As of version 4.0, due to switching to a visualizer that's not based on vtk, we use the Simtk native parsers instead, which are much smaller and were already included in OpenSim, but may not handle all possible vtk based files. Please open an issue and attach the problematic files and we'll investigate. You may try saving the meshes in paraview as .obj or .stl format which may handle the meshes more gracefully and can also be handled by OpenSim.
Hope this helps,
-Ayman