Applications of pixel detectors to electron microscopy