Calculate moment of inertia along axis of non-uniform cross section

Hello,

Can anyone tell me how I can calculate moment of inertia, and polar moment of inertia, of a curved beam of non-uniform cross section, along the axis of its centroid? In other words, I'd like to find the moment and polar moment of many cross sections along its length, and each cross section will be different due to the complex geometry of the beam.

Thank you,

Jack