get the output data of a vtk filter

Hi, I’m using a vtk filter to work on some input data.
I see that the vtk filter has a method called GetOutputPort that pipes to the inputPort of the next block, but if I want to get the output of this filter and not passing its output to next step, how can I do that?
Something like GetOutputData I mean.

What about

auto dataset = filter->GetOuptut();