getMatchingAnnotationData function

Gets binary data for annotations that match a particular pattern.