# How to downlod the input file of official example?

**URL:** <https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577>\
**Category:** Development\
**Tags:** file-formats\
**Created:** [April 19, 2021, 3:21am UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577 "2021-04-19T03:21:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lessismore](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/57b2e6/32.png) [@lessismore](https://discourse.vtk.org/u/lessismore)\
**Post date:** [April 19, 2021, 3:21am UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577/1 "2021-04-19T03:21:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)\
**Post date:** [May 16, 2021, 6:30am UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577/2 "2021-05-16T06:30:24Z")

</div>

Go to [vtk-examples](https://kitware.github.io/vtk-examples/site/). 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](https://gitlab.kitware.com/vtk/vtk-examples) or, if you just want a data file, then go to [src/Testing/Data](https://gitlab.kitware.com/vtk/vtk-examples/-/blob/master/src/Testing/Data), double-click on the file you want and download it.

---

<div class="post-metadata">

**Author:** ![anbai106](https://discourse.vtk.org/user_avatar/discourse.vtk.org/anbai106/32/4069_2.png) [@anbai106](https://discourse.vtk.org/u/anbai106)\
**Post date:** [October 13, 2021, 7:19pm UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577/3 "2021-10-13T19:19:58Z")

</div>

Hi,

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

Specifically, for this example here:[https://kitware.github.io/vtk-examples/site/Python/DataManipulation/MeshLabelImageColor/](https://kitware.github.io/vtk-examples/site/Python/DataManipulation/MeshLabelImageColor/)

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/pydevd\_exec2.py”, 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:

> ```auto
> se_range = smoother_error.GetRange()
> 
> ```

Any ideas?

Thank

Hao

---

<div class="post-metadata">

**Author:** ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)\
**Post date:** [October 14, 2021, 6:00am UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577/5 "2021-10-14T06:00:00Z")

</div>

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

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

> [@anbai106](#):
>
> `se_range = smoother_error.GetRange()`

Here is a corrected example [MeshLabelImageColor.zip](https://discourse.vtk.org/uploads/short-url/iJVDnYgnDjFPx8vFtFUCnnZqir5.zip) (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.

---

<div class="post-metadata">

**Author:** ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)\
**Post date:** [October 15, 2021, 6:46am UTC](https://discourse.vtk.org/t/how-to-downlod-the-input-file-of-official-example/5577/6 "2021-10-15T06:46:37Z")

</div>

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