Problem running SimpleRayCast.py example

Hello. I am trying to learn vtk but I am having problems running some of the examples. I tried some basic examples and they were working fine, but some examples that require a filename argument gave me problems. Specifically, the SimpleRayCast.py example gives me the following error when I run “vtkpython SimpleRayCast.py ironProt.vtk”

( 0.163s) [main thread ] vtkDataReader.cxx:567 ERR| vtkStructuredPointsReader (0x55db3b5e5560): Unrecognized file type: version Redirecting… for file: ironProt.vtk
( 0.163s) [main thread ] vtkDataReader.cxx:567 ERR| vtkStructuredPointsReader (0x55db3b5e5560): Unrecognized file type: version Redirecting… for file: ironProt.vtk
( 0.213s) [main thread ]vtkFixedPointVolumeRayC:1122 ERR| vtkFixedPointVolumeRayCastMapper (0x7f7e1dc70010): Cell Scalars not supported

Loguru caught a signal: Loguru caught a signal: SIGSEGVSIGSEGV

Loguru caught a signal: SIGSEGV

Loguru caught a signal: SIGSEGV

Loguru caught a signal: SIGSEGV

Loguru caught a signal: SIGSEGV

Loguru caught a signal: Loguru caught a signal: SIGSEGVSIGSEGV

Stack trace:
4 0x7f7e27e77163 clone + 67
3 0x7f7e264ae609 /lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f7e264ae609]
2 0x7f7e1f7acdac /home/vv/VTK-9.1.0/build/lib/python3.9/site-packages/vtkmodules/…/…/…/libvtkRenderingVolume-9.1.so.1(+0x2c9dac) [0x7f7e1f7acdac]
1 0x7f7e1f68d71d vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage(int, int, vtkVolume*, vtkFixedPointVolumeRayCastMapper*) + 71
0 0x7f7e27d9b0c0 /lib/x86_64-linux-gnu/libc.so.6(+0x430c0) [0x7f7e27d9b0c0]
( 0.223s) [ 1ABEC700] :0 FATL| Signal: SIGSEGV
Segmentation fault (core dumped)

I have only recently installed vtk on my ubuntu pc and I know very little. Any help to understand the problem would be much appreciated. Thank a lot!

I suspect you need to download the data file not the git lfs link. Open the file you downloaded in a text editor and if it looks like this:

version https://git-lfs.github.com/spec/v1
oid sha256:544f67d66dbb8b79e48053f131d614e225d0caa702fd3f690313312dd4119f79
size 314642

then its the lfs-link not the actual file.

If this is the case, just check out the whole vtk-examples repository and the lfs links will be resolved.

Thanks a lot! That solved it. I wasn’t aware of git-lfs…