# Any VTK examples?

**URL:** <https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256>\
**Category:** Recording, Visualizing and Persisting Data\
**Created:** [May 13, 2024, 1:54pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256 "2024-05-13T13:54:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munther\_Hindi](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/munther_hindi/32/7788_2.png) [@Munther\_Hindi](https://geant4-forum.web.cern.ch/u/Munther_Hindi)\
**Post date:** [May 13, 2024, 1:54pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/1 "2024-05-13T13:54:52Z")

</div>

Please fill out the following information to help in answering your question, and also see [tips for posting code snippets](https://geant4-forum.web.cern.ch/t/how-to-post-code-snippets/9944). If you don’t provide this information it will take more time to help with your problem!

\_Geant4 Version:\_4.11.1.0  
\_Operating System:\_Linux Fedora  
\_Compiler/Version:\_13.2.1  
\_CMake Version:\_3.27.7

I don’t see any examples of the use of vtk visualization in the examples directory of geant4-11.1.0. Could someone please point me to one? Thanks.

* * *

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [May 13, 2024, 2:12pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/2 "2024-05-13T14:12:36Z")

</div>

There’s no specific example. Just build with Vtk (see Installation Guide), then you should be able to use Vtk (`/vis/open Vtk`)with any example or app.

---

<div class="post-metadata">

**Author:** ![Munther\_Hindi](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/munther_hindi/32/7788_2.png) [@Munther\_Hindi](https://geant4-forum.web.cern.ch/u/Munther_Hindi)\
**Post date:** [May 13, 2024, 3:15pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/3 "2024-05-13T15:15:43Z")

</div>

Thanks, John. I will give it a try. I was under the impression that vtk has some additional functionalties, like saving the view in a file. I assume I will find something like export view as… in the menu. We’ll see.  
Thanks again.

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [May 13, 2024, 4:34pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/4 "2024-05-13T16:34:28Z")

</div>

Ah, yes, Munther. I’m afraid I forgot. There is `examples/extended/visualization/vtk` but

```auto
Author: Stewart Boogert <stewart.boogert@cockcroft.ac.uk>
Date: Sun Sep 17 17:02:45 2023 +0100

    vis vtk : added VTK example

```

which means only since 11.2.

Of course, once you build with Vtk, you get lots of nice commands. I recommend 11.2.

---

<div class="post-metadata">

**Author:** ![Munther\_Hindi](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/munther_hindi/32/7788_2.png) [@Munther\_Hindi](https://geant4-forum.web.cern.ch/u/Munther_Hindi)\
**Post date:** [May 13, 2024, 5:07pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/5 "2024-05-13T17:07:08Z")

</div>

Ok, thanks. Downloaded v11.2.1 and now compiling. I do see the example examples/extended/visualization/vtk now. Getting a new geant version compiled with all the options I am used to is always a pain! Hopefully the vtk example will work. I will let you know.  
Thanks,  
Munther

---

<div class="post-metadata">

**Author:** ![Munther\_Hindi](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/munther_hindi/32/7788_2.png) [@Munther\_Hindi](https://geant4-forum.web.cern.ch/u/Munther_Hindi)\
**Post date:** [May 13, 2024, 6:25pm UTC](https://geant4-forum.web.cern.ch/t/any-vtk-examples/12256/6 "2024-05-13T18:25:51Z")

</div>

I was to able to compile v11.2.1 and run the vtk example. Thanks!
