# Is it possible to add a cone actor together with a volume actor

**URL:** https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781
**Category:** Web
**Created:** [June 22, 2022, 10:04am UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781 "2022-06-22T10:04:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gzt036](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gzt036/32/5960_2.png) [@gzt036](https://discourse.vtk.org/u/gzt036)
#### Post date: [June 22, 2022, 10:04am UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781/1 "2022-06-22T10:04:49Z")

</div>

> const actor = imageDataToVol3D(image\_data\_obj);  
> const actor\_cone = vtkActor.newInstance();  
> actor\_cone.setMapper(mapper\_cone);  
> renderer.addActor(actor);  
> renderer.addActor(actor\_cone);

If I enable both addActor() calls only the image data actor shows up. Is it possible to do so?

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [June 22, 2022, 10:49am UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781/2 "2022-06-22T10:49:41Z")

</div>

To add a volume, you should call `addVolume` instead of `addActor`.

---

<div class="post-metadata">

### Author: ![gzt036](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gzt036/32/5960_2.png) [@gzt036](https://discourse.vtk.org/u/gzt036)
#### Post date: [June 22, 2022, 2:59pm UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781/3 "2022-06-22T14:59:30Z")

</div>

thanks for pointing out this. Changed the call to addVolume and the result is the same.  
the code works fine when only one of renderer.add() is called, when both are called, the cone will not show up, only the volume shows

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [June 22, 2022, 3:04pm UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781/4 "2022-06-22T15:04:15Z")

</div>

Are you calling resetCamera after adding your actors? And is your volume opaque, potentially hiding your cone?

---

<div class="post-metadata">

### Author: ![gzt036](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gzt036/32/5960_2.png) [@gzt036](https://discourse.vtk.org/u/gzt036)
#### Post date: [June 22, 2022, 9:39pm UTC](https://discourse.vtk.org/t/is-it-possible-to-add-a-cone-actor-together-with-a-volume-actor/8781/5 "2022-06-22T21:39:06Z")

</div>

Thanks for the tip. After enlarging the cone 30 times bigger I can see it together with the volume.
