vtkMultiBlockDataSet and vtkMultiBlockVolumeMapper...

I’m trying to use vtkMultiBlockVolumeMapper to render a vtkMultiBlockDataSet. According to the docs of vtkMultiBlockVolumeMapper:

vtkMultiBlockVolumeMapper renders vtkMultiBlockDataSet instances containing vtkImageData blocks

But I can’t figure out how to tell the vtkMultiBlockVolumeMapper to use avtkMultiBlockDataSet as input:

  • vtkMultiBlockDataSet derives from vtkDataObject, but not from vtkDataSet - so using the SetInputData method from the vtkVolumeMapper as I would do with a simple vtkImageData is not an option.
  • In vtkMultiBlockVolumeMapper itself, I also see no method taking a vtkMultiBlockDataSet as input.
  • I also haven’t found example code using vtkMultiBlockVolumeMapper (but would be willing to provide a pull request once I have a working example).

Probably I’m missing something very obvious, but I’m stuck - please help!

Use SetInputDataObject if you have a vtkMultiBlockDataSet or use the pattern

mapper->SetInputConnection(datasource->GetOutputPort())

if you have a source object that produces the vtkMultiBlockDataSet.

1 Like

Thanks for the help!

I have created merge request to the VTK example repo with my small demo. Glad about any suggestions!