How to get labelmap data array returned from vtkPaintFilter

I have a paint filter with a method getLabelMap(), which returns an object of methods. I am trying to get the typed array, which holds the values of the vtkDataArray associated with the label map. Is there a method that I can use to get this typed array?

Here are the methods I have available to me from the getLabelMap():

Thanks for any advice you can offer

This seems to be a vtkImageData which mean you can get your array by doing

x.getLabelMap().getPointData().getScalars()

@Forrest

1 Like

Exactly what I needed, thanks so much!