Displaying custom VTK class inherited from `vtkDataSet`


I’m implementing a class inherited directly from vtkDataSet.

When displayng it looks like in the picture (I do not explicitely set all the points but rather XYZ surface and Z spacings vector and thus I save RAM):

Now I’m looking for a way to display it in SlicerCAT. It seems that neither vtkMRMLModelNode nor vtkVolumeNode is able to add custom vtk dataset to the scene.

If I inherit from vtkMRMLDisplayableNode will I be able to visualize this custom class?

P.S. I’m also looking for a way to inherit from concrete vtk class (instead of abstract vtkDataSet) like vtkPointSet, vtkPolyData or vtkImageData. In this case I expect it would be easier to add to the Slicer

It is extremely limited what you can do with a custom vtkDataSet-derived object in VTK. I would recommend to derive from vtkPolyData, vtkUnstructuredGrid, or vtkImageData instead.

1 Like