Tissue microarrays (TMAs) represent an important approach for the high-throughput cellular analysis of large numbers of tissue samples on one single slide in research related to diagnostics and oncology. Whole-slide imaging now enables full scanning and subsequent image analysis of such TMAs. In contrast to automatically spotted RNA microarrays, TMAs are fabricated manually and mechanically by arranging hundreds of tissue cores in a single paraffin block. This procedure frequently results in quality problems severely hampering the later automatic image analysis of TMAs after whole-slide imaging. We therefore set out to (a) determine the extent of these quality issues in exemplary TMAs and (b) to develop a robust gridding method to identify the logical position coordinates of each TMA core on a virtual TMA slide. We present the first robust method identifying these coordinates by shifting a template grid over all cores of the TMA (template matching) and thereby measuring in how far the grid matches a predefined list of cores on the virtual TMA Slide. Analysis of 20 TMAs from Breast Cancer as well as 40 Head-and-Neck Cancer showed that frequent TMA layout issues comprise low staining, debris, core displacement, nonuniform background, missing cores, and rotated subarrays. On this highly demanding test comprising chromogen as well as fluorescence stained TMAs, our template matching method achieved an excellent position analysis. Of 8900 cores, 8864 (99.59%) were assigned properly. In all 60 slides of the test set, no localization error occurred. The automatic grid analysis of TMAs after whole-slide imaging is highly demanding and requires dedicated algorithms. We demonstrate such a method and evaluate its performance. © 2010 International Society for Advancement of Cytometry.