vtkLookupTable: Bad table range: [1e+299, -1e+299] while reading a vtu file
See original GitHub issueHi @marcomusy,
Here I am again asking for help.
I encountered a strange vtk error while trying to read in a vtu file and then convert that into a mesh object in vedo. Here is the simple reproducible script:
#!/Usr/bin/env python3
import numpy as np
from vedo import TetMesh, show, screenshot, settings, Picture, buildLUT, Box, \
Plotter, Axes
import time as tm
# Do some settings
settings.useDepthPeeling=False # Useful to show the axes grid
font_name = 'Theemim'
settings.defaultFont = font_name
settings.multiSamples=8
# settings.useParallelProjection = True # avoid perspective parallax
# Create a TetMesh object form the vtk file
tet_sgi = TetMesh('dyno_output/test_best_cond.vtu')
rec_cond = tet_sgi.tomesh().lineWidth(5).lineColor('w')
# plt.show(msh, cond, rec_cond, axes, size=size, interactive=True, resetcam=0
# , zoom=1.2)
show(rec_cond, interactive=True)
And here is the data file: test_best_cond.vtu.zip
I think the error was raised when I tried to convert tet_sgi to a mesh object:
rec_cond = tet_sgi.tomesh().lineWidth(5).lineColor('w')
I am not sure what may be causing this and I apologize first if you find my way of doing things strange. I am so used to deal with vtu files and we have a bunch of tools that can be used to generate and manipulate vtu files. Having said that, this can easily be a problem with the vtu file format since this time I manually created the file.
This can also be a vtk bug but I am not sure. I tried to look into the vtk codes but could not really go too far: https://github.com/Kitware/VTK/blob/master/Common/Core/vtkLookupTable.cxx (line 165).
Or, is this something related to vedo?
Thanks very much for your help!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
I finally realized what I was looking for was UGrid instead of TetMesh. Also, that tetralize function does not work because it complains that I am passing in a vtkVolume object. I am happy again with what I am able to plot with vedo. Thanks!
Yes there is a
tetralize()
function, which might turn useful.