# VTK-9: How to know which VTK COMPONENT contains which VTK class?

**URL:** https://discourse.vtk.org/t/vtk-9-how-to-know-which-vtk-component-contains-which-vtk-class/11533
**Category:** Support
**Tags:** code
**Created:** [May 24, 2023, 12:13pm UTC](https://discourse.vtk.org/t/vtk-9-how-to-know-which-vtk-component-contains-which-vtk-class/11533 "2023-05-24T12:13:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fghoussen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/ecd19e/32.png) [@fghoussen](https://discourse.vtk.org/u/fghoussen)
#### Post date: [May 24, 2023, 12:13pm UTC](https://discourse.vtk.org/t/vtk-9-how-to-know-which-vtk-component-contains-which-vtk-class/11533/1 "2023-05-24T12:13:47Z")

</div>

VTK-9: How to know which VTK COMPONENT contains which VTK class?

In CMakeLists.txt, we call `find_package(VTK)` to get VTK libraries: worked for me as is with `apt-get install` VTK package.

Now I need a specific class `vtkOpenGLRenderWindow`: I had to build VTK from source (this class is not in the default library installed from apt-get). How to know the name of the associated COMPONENT of this given VTK class? What is the XX I need to pass to `find_package(VTK COMPONENT XX)` ? Is this documented? If yes where (not found)? Are there best practices?

---

<div class="post-metadata">

### Author: ![fghoussen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/ecd19e/32.png) [@fghoussen](https://discourse.vtk.org/u/fghoussen)
#### Post date: [May 24, 2023, 12:48pm UTC](https://discourse.vtk.org/t/vtk-9-how-to-know-which-vtk-component-contains-which-vtk-class/11533/2 "2023-05-24T12:48:08Z")

</div>

For the record, seems `python3 "$VTK_ROOT/Utilities/Maintenance/FindNeededModules.py" -j $VTK_ROOT/build/modules.json -s vtkHelloworld.cpp` gives modules to use according to class you need.

No sure this is the correct way… Any better or more exhaustive answer is welcomed

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/christos_tsolakis/32/2076_2.png) [@Christos\_Tsolakis](https://discourse.vtk.org/u/Christos_Tsolakis)
#### Post date: [May 24, 2023, 4:50pm UTC](https://discourse.vtk.org/t/vtk-9-how-to-know-which-vtk-component-contains-which-vtk-class/11533/3 "2023-05-24T16:50:52Z")

</div>

There was the same question recently see [here](https://discourse.vtk.org/t/how-to-determine-the-cmake-vtk-components-necessary-for-a-class/11429)
