Remove collinear points from polyline


Does VTK provide a filter to remove collinear points from a polyline (stored as vtkPolyData)? Basically, my polylines contain contiguous collinear segments and I need to replace each such group with a single segment.
I tried using vtkDecimatepolylineFilter with standard parameters, but the number of points increased.

Thank you in advance for any help.

  Luca Pallozzi Lavorante