gzt036
(Zhengting Gan)
June 22, 2022, 10:04am
1
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?
finetjul
(Julien Finet)
June 22, 2022, 10:49am
2
To add a volume, you should call addVolume
instead of addActor
.
gzt036
(Zhengting Gan)
June 22, 2022, 2:59pm
3
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
Forrest
(Forrest)
June 22, 2022, 3:04pm
4
Are you calling resetCamera after adding your actors? And is your volume opaque, potentially hiding your cone?
gzt036
(Zhengting Gan)
June 22, 2022, 9:39pm
5
Thanks for the tip. After enlarging the cone 30 times bigger I can see it together with the volume.