slice along polyline

This sounds similar to what I am doing here: Create ImageData - ParaView Support - ParaView

In my case, I converted the dataset to ImageData (using Resample to Image filter), and then I used a Programmable Filter to integrate the data longitudinally. It would be simple to do an average instead, and doing it over slices would just mean integrating twice. The biggest challenge is creating the VTK object afterward.

I also developed a (more computationally expensive) technique for computing averages in curvilinear coordinates, which may be of interest: Evaluating Symmetry in 3-dimensional Simulation Data (Technical Report) | OSTI.GOV. Perhaps you can give us more details on what you’re trying to do?