Detecting structural heterogeneity in single-molecule localization microscopy data