# How can I make a Pyramid ?

**URL:** https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690
**Category:** Development
**Tags:** code, proposal
**Created:** [February 15, 2023, 8:03am UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690 "2023-02-15T08:03:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [February 15, 2023, 8:03am UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690/1 "2023-02-15T08:03:50Z")

</div>

Hi

How Can I make a Pyramid and get It’s vtkImageData ?  
(I want vtkImageData of my Pyramid)

Thanks a lot :))

---

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [February 16, 2023, 8:09pm UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690/2 "2023-02-16T20:09:10Z")

</div>

Hi Shahpouri

Take a look at [https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/Pyramid/](https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/Pyramid/) for drawing a pyramid.

To get vtkImageData, you can use vtkWindowToImageFilter, [https://vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html#details](https://vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html#details)

Kind regards  
Jens Munk

---

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [February 22, 2023, 6:12am UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690/3 "2023-02-22T06:12:56Z")

</div>

Hi Jens

Thanks you , but vtkWindowToImageFilter give me 2D image  
but I want 3D ImageData of pyramid.

can you Help me about in this way?

---

<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: [February 22, 2023, 2:28pm UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690/4 "2023-02-22T14:28:17Z")

</div>

check this example [https://kitware.github.io/vtk-examples/site/Cxx/PolyData/PolyDataToImageData/](https://kitware.github.io/vtk-examples/site/Cxx/PolyData/PolyDataToImageData/)

---

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [March 27, 2023, 1:01pm UTC](https://discourse.vtk.org/t/how-can-i-make-a-pyramid/10690/5 "2023-03-27T13:01:14Z")

</div>

Thank you so much
