if the diameter is not round then a diametric measurement is not easy.
there are four most common methods to calculate a diameter.
Maximum Inscribe circle (MIS), Minimum circumscribed circle (MCC), Least Squares method (LS)
and Zone or Minimal Radial Separation (MRS) which uses the MIS and MCC method
to what tolerance do you need to measure?
your desired measurement accuracy will determine the measurement method