question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vtkLookupTable: Bad table range: [1e+299, -1e+299] while reading a vtu file

See original GitHub issue

Hi @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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
XushanLucommented, Jul 14, 2021

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!

1reaction
marcomusycommented, Jun 30, 2021

Yes there is a tetralize() function, which might turn useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vtkLookUpTable. Bad table range: [0, -1] - 3D Slicer Community
I used a vtkLookUpTable to color a vtkPolyData like this : ... set the lookup table (allows to draw each vertex with its...
Read more >
The vtkLookupTable::SetTable() results in bad out-of-range ...
It was reported that when the SetTable() method was used to provide an array (4-component unsigned char) for use as the lookup table, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found