mean or average over specific dimension of a vtkImage

Hi,
I was wondering if there is anything ready made in vtk to do this task.
say conceptually, I have a 2D vtk Image “matrix”
I want to compute the mean/average over only one dimension so that if the input image/matrix was MxN, the final image is 1xN if I average over the M dimension.
This is done easily in numpy/python but I don’t know if there is anything in VTK.
I use C# for this project that is why I ask.

Thanks

GT