How to downlod the input file of official example?

I am a new user of vtk,and learn a lot from official example.However I have a trouble in reading example that can’t find the address of input file of official example. I hope someone can help me,thank you.

Go to vtk-examples. Where the exampes use data files, they are generally mentioned in the code for the example.

To download the data files, you will have to either download the vtk-examples source found here vtk-examples or, if you just want a data file, then go to src/Testing/Data, double-click on the file you want and download it.


A follow-up to this post. I am a newbie for VTK too.

Specifically, for this example here:

Based on your previous comment, I assume that the input mhd file for this example is here: vtk-examples/src/Testing/Data/labels.mhd. I set this as the filename argument and label to be 31 by default.
I was able to run the script but ended up with some errors:

Traceback (most recent call last):
File “/home/hao/Software/Pycharm/pycharm-professional-2020.3.4/plugins/python/helpers/pydev/_pydevd_bundle/”, line 3, in Exec
exec(exp, global_vars, local_vars)
File “”, line 1, in
AttributeError: ‘NoneType’ object has no attribute ‘GetRange’

This is from this line of the code:

se_range = smoother_error.GetRange()

Any ideas?



You are correct, that is the correct location for the file.

You shouldn’t be getting this error if the readers are updated.

Here is a corrected example (2.5 KB), this should work.

For some reason the camera orientation was wrong. There are some other minor changes that I need to do. I’ll probably do a commit sometime tomorrow.

The updated version of MeshLabelImageColor is now up. Also a better lookup table is provided.