[Cornerstone3D] Actor is not used in IVolumeInput callback

Describe Your Question

I need to use a contour filter to draw a CT 3D model, to make this work I need to use vtkActor instead of the provided vtkVolume (given by the callback). I tried to use viewport.setActors([{ uid: "CT_ACTOR", actor }]); in the callback, before and after theviewport.setVolumes but the resulting render is exactly the same as not modifying the actor in any way.

Is there any way to make cornerstone use my vtkActor? Or to properly debug the process such that I can see if there’s any place where setting my actor actually has any effect.

What steps can we follow to reproduce the bug?

      volumeId: ctVolume.id,
      callback: ({ volumeActor }) => {
        const cfun = vtkColorTransferFunction.newInstance();
        cfun.addRGBPoint(0, 0.0, 0.0, 0.0);
        cfun.addRGBPoint(200.0, 0.0, 0.0, 0.0);
        cfun.addRGBPoint(500.0, 1.0, 1.0, 1.0);
        cfun.addRGBPoint(1000.0, 1.0, 1.0, 1.0);

        const mCubes = vtkImageMarchingSquares.newInstance({ contourValue: 500.0 });

        const mapper = vtkMapper.newInstance();

        const actor = vtkActor.newInstance();

        viewport.setActors([{ uid: "CT_ACTOR", actor }]);


Hello @Zelzahn and welcome to the community forum.

Is it possible to wrap this into a github repo somewhere so that we can reproduce and investigate it? Perhaps maybe even create an issue in cornerstone3d github?