Robust megavoltage x-ray spectra estimation from transmission measurements.