Skip to main content
MethodsX logoLink to MethodsX
. 2015 May 21;2:272–277. doi: 10.1016/j.mex.2015.05.002

AutoTag and AutoSnap: Standardized, semi-automatic capture of regions of interest from whole slide images

Koen M Marien a,b,, Luc Andries b, Stefanie De Schepper b, Mark M Kockx b, Guido RY De Meyer a
PMCID: PMC4487922  PMID: 26150998

Abstract

Tumor angiogenesis is measured by counting microvessels in tissue sections at high power magnification as a potential prognostic or predictive biomarker. Until now, regions of interest1 (ROIs) were selected by manual operations within a tumor by using a systematic uniform random sampling2 (SURS) approach. Although SURS is the most reliable sampling method, it implies a high workload. However, SURS can be semi-automated and in this way contribute to the development of a validated quantification method for microvessel counting in the clinical setting. Here, we report a method to use semi-automated SURS for microvessel counting:

  • Whole slide imaging with Pannoramic SCAN (3DHISTECH)

  • Computer-assisted sampling in Pannoramic Viewer (3DHISTECH) extended by two self-written AutoHotkey applications (AutoTag and AutoSnap)

  • The use of digital grids in Photoshop® and Bridge® (Adobe Systems)

This rapid procedure allows traceability essential for high throughput protein analysis of immunohistochemically stained tissue.

Method name: AutoTag and AutoSnap

Keywords: Microvessels, Computer-assisted image processing, Selection bias, Automation, Stereology, Whole slide image

Method details

Whole slide imaging

Tumor tissue was stained for CD31 (NCL-CD31-1A10, Leica Biosystems, Diegem, Belgium) on a Ventana Benchmark® XT platform in an accredited laboratory (HistoGeneX NV, Antwerp, Belgium). The stained slides were scanned with the slide scanner Pannoramic SCAN (3DHISTECH) to obtain a whole slide image (Fig. 1). A 20× Plan Apo objective (0.80 NA3) and Hitachi (HV-F22CL) 3CCD progressive scan color camera with a resulting image resolution of 0.23 μm/pixel were used. JPEG image encoding with quality factor 80 and an interpolated focus distance of 15 with stitching in the scan options were chosen. For every slide a specific scan profile was configured and holes in the scan area were filled to allow for correct detection of tissue and in-focus images of the tissue. Scanned images were examined to check for image quality and to confirm that the whole tissue section was captured (Fig. 2A).

Fig. 1.

Fig. 1

Snapshots of regions of interest (ROIs) combined with a counting grid of a stained slide can be produced semi-automatically and with full traceability. After the stained slide has been scanned in the Pannoramic SCAN (3DHISTECH), it needs to be checked manually for possible image quality issues (out-of-focus regions, incomplete images) in Pannoramic Viewer (3DHISTECH). In the next step, point annotations are semi-automatically created in the whole slide image with AutoTag. Standardized snapshots of the regions of interest (ROIs) can now be automatically created with AutoSnap in Pannoramic Viewer. Finally, a digital grid in Photoshop and Bridge (Adobe Systems) is combined with the snapshots of the ROIs.

Fig. 2.

Fig. 2

(A) A whole slide image (WSI) of a CD31-stained colorectal carcinoma sample was taken with Pannoramic SCAN. Labeled callout boxes within the WSI display indicate annotations that were semi-automatically created with AutoTag. Subsequently, snapshots for each point annotation were made with AutoSnap. Scale bar = 2000 μm. (B) The resulting snapshot of region of interest #15 is displayed. The digital grid was generated with Adobe Photoshop®. Scale bar = 100 μm.

Computer assisted sampling

When generating a point annotation in Pannoramic Viewer (build 1.15.4.43061, 3DHISTECH) at a chosen ROI (Fig. 2A), a name for the annotation is requested. To automate repetitive tasks in a Microsoft Windows® environment, the open-source macro-creation and automation software utility AutoHotkey can be used. Semi-automatic naming of point annotations in Pannoramic Viewer during manual annotation was performed with a self-written AutoHotkey script AutoTag running in the background and monitoring the activity on the screen. It names the point annotations with sequentially increasing numbers starting from one (Supplementary Code AutoTag: lines 183–210), allowing the quick generation of point annotations by merely clicking a number of locations in the image.

The minimum number of regions of interest (ROIs) required for analysis of microvessel density was calculated by using random sampling with replacement (bootstrapping; Fig. 3). Twenty-five ROIs were chosen in a CD31-stained colorectal carcinoma slide (Fig. 2). Microvessel densities (QA = ΣiNiiVi,ref with an i value from 1 to 25 ROIs, expressed as number of microvessels per area, with Ni the number of counted vessels in ROI i and Vi,ref the number of grid points hitting tissue in ROI i) were calculated 1000 times by resampling from the pool of 25 ROIs. The coefficient of variation (CV) was plotted versus the number of ROIs (Fig. 3). A trend line of the form f(x) = ax−b was added and the first derivative of this function (f′(x) = −abx−b−1) was used to define the minimum number of ROIs required. The local derivative must be smaller than 0.50%. After creating these graphs (Fig. 3) for 19 colorectal carcinomas, 22 renal cell carcinomas, 21 glioblastomas, and 21 ovarian carcinomas, we concluded that 10 regions of interest are sufficient for accurate microvessel density measurements.

Fig. 3.

Fig. 3

Calculation of the minimum number of regions of interest (ROIs) required for analysis of microvessel density. Twenty-five ROIs were chosen in a CD31-stained colorectal carcinoma slide (see Fig. 2). Random sampling with replacement (i.e. bootstrapping) was carried out 1000 times for the calculation of microvessel densities (QA, expressed as number of microvessels per area). The coefficient of variation (CV) was plotted versus the number of ROIs (f(x) = 0.4446x−0.42, R2 = 0.99). The first derivative of this function (f′(x) = −0.1867x−1.42) was used to define the minimum number of ROIs required. This value was reached when the difference between two consecutive local derivatives was smaller than 0.50% (in the example shown, the minimum number of ROIs required was six).

When all necessary point annotations are created, the magnification is asked by the AutoTag application (Supplementary Code AutoTag: lines 104–142). In general, a 20× magnification is sufficient for the correct identification of microvessels. Finally, AutoTag generates a .txt file that lists the processed samples in column one, the number of semi-automatically created annotations in column two and the magnification in column three (Supplementary Code AutoTag: lines 3–17). This file can be read by a second AutoHotkey application, named AutoSnap, allowing the automatic creation of images of all the ‘AutoTagged’ samples (Fig. 2A). The point annotation will be in the exact center of the snapshot. The created images have a standardized name and are saved at a specified location (Supplementary Code AutoSnap: lines 473–603), allowing batch processing and eliminating the time-consuming process of image creation. Compared to manual image creation by experienced users (19 s; n = 832), semi-automatic image generation requires more time on average to construct one image at a given point annotation (66 s; n = 272). The process could be speeded up, but is more robust when pauses (sleep functions) are built-in to handle lag due to software processing and network speed. However, due to the automatic nature of AutoSnap no user input is required and, therefore, the process can be run overnight and frees time for other activities. Importantly, the AutoTag and AutoSnap applications semi-automate a sampling method that allows traceability due to the final results being linked to the exact locations in each tissue section.

Digital grids

To allow unbiased counting of the microvessels, two digital grids with a transparent background (5 by 5 fields and 9 by 9 fields, each 2500 μm2, for 40× and 20× magnification, respectively) were created in Adobe Photoshop® (see Supplementary Material). These grids are applied to the images created with AutoSnap in a batch process with Adobe Bridge® (Fig. 2B). A self-written Photoshop® action (see Supplementary Material) automatically pastes the grid as an extra image layer and saves this as a new image.

Additional information

Tumor angiogenesis is most frequently measured by counting the smallest vessels, known as microvessels, in tumor tissue sections viewed at a high magnification (200×– 400×) [2], [9], [10], [11]. Different immunohistochemistry (IHC) staining assays have been performed to stain blood vessels, including CD31 [7]. The resulting microvessel density score is prognostic for survival in several cancer types [3], [6]. Microvessel counting is performed in a portion of the total tissue area. Usually, one to five ‘hotspots’ with the highest density of microvessels are selected for counting at low magnification [2]. Alternatively, a limited number of regions of interest (ROIs) are identified using a systematic, uniform random sampling (SURS) approach [5]. Microvessels within ROIs are quantified using a rectangular grid in order to obtain the number of vessel profiles per area (QA) and the number of grid points overlapping with vessels per area (AA) [4]. When the SURS sampling method was compared with other techniques, such as hotspot in breast cancer samples, the variation in the stereological estimate QA was highly associated with biological differences between the samples (78%) and a smaller contribution from inherent methodological factors (17%) or observers (5%) [5]. Therefore, it is the most reliable method to identify variation in microvessel density among patients, but it results in a high workload. Recently, a web-based tool was written to create an equidistant set of ROIs within a given region [12]. This tool automates the selection process, but as coordinates of the ROIs are calculated automatically in given region, quality control must be performed to assess suitability of the coordinates. Depending on the analysis this can be necrosis, viable tissue, or a sufficiently high number of cells of interest. It is also not possible to create images at the coordinates and no grids are overlaid. Microvessel counting can be performed manually on the images created by this process, or can be used for automatic image analysis when the digital grid is discarded [1], [8].

Acknowledgements

The authors thank Valerie Croons and Ellen Sluydts for their feedback in writing the script. We also acknowledge Arno Vandebroek and Yannick Waumans for their constructive review of the text. MethodsX thanks the reviewers of this article for taking the time to provide valuable feedback.

Footnotes

1

ROI: region of interest.

2

SURS: systematic, uniform random sampling.

3

NA: numerical aperture.

Appendix A

Supplementary data associated with this article can be found, in the online version, at http://dx.doi.org/10.1016/j.mex.2015.05.002.

Appendix A. Supplementary data

The following are Supplementary data to this article:

mmc1.docx (50.8KB, docx)

References

  • 1.Fernández-Carrobles M.M., Tadeo I., Bueno G., Noguera R., Déniz O., Salido J., García-Rojo M. TMA vessel segmentation based on color and morphological features: application to angiogenesis research. Scientific World J. 2013 doi: 10.1155/2013/263190. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Fox S.B., Harris A.L. Histological quantitation of tumour angiogenesis. APMIS. 2004;112(7–8):413–430. doi: 10.1111/j.1600-0463.2004.apm11207-0803.x. [DOI] [PubMed] [Google Scholar]
  • 3.Gao J., Knutsen A., Arbman G., Carstensen J., Frånlund B., Sun X.F. Clinical and biological significance of angiogenesis and lymphangiogenesis in colorectal cancer. Dig. Liver Dis. 2009;41(2):116–122. doi: 10.1016/j.dld.2008.07.315. (February) [DOI] [PubMed] [Google Scholar]
  • 4.Gundersen H.J., Bendtsen T.F., Korbo L., Marcussen N., Møller A., Nielsen K., Nyengaard J.R., Pakkenberg B., Sørensen F.B., Vesterby A. Some new simple and efficient stereological methods and their use in pathological research and diagnosis. APMIS. 1988;96(5):379–394. doi: 10.1111/j.1699-0463.1988.tb05320.x. (May) [DOI] [PubMed] [Google Scholar]
  • 5.Hansen S., Grabau D.A., Rose C., Bak M., Sørensen F.B. Angiogenesis in breast cancer: a comparative study of the observer variability of methods for determining microvessel density. Lab. Invest. 1998;78(12):1563–1573. (December) [PubMed] [Google Scholar]
  • 6.Kadota K., Huang C.-L., Liu D., Ueno M., Kushida Y., Haba R., Yokomise H. The clinical significance of lymphangiogenesis and angiogenesis in non-small cell lung cancer patients. Eur. J. Cancer. 1990;44(7):1057–1067. doi: 10.1016/j.ejca.2008.03.012. (May) [DOI] [PubMed] [Google Scholar]
  • 7.Zerina L., Mitchell G.M. Visualisation and stereological assessment of blood and lymphatic vessels. Histol. Histopathol. 2011;26(6):781–796. doi: 10.14670/HH-26.781. (June) [DOI] [PubMed] [Google Scholar]
  • 8.Mete M., Hennings L., Spencer H.J., Topaloglu U. Automatic identification of angiogenesis in double stained images of liver tissue. BMC Bioinformatics. 2009;10(Suppl. 1):S13. doi: 10.1186/1471-2105-10-S11-S13. (January) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Vermeulen P.B., Gasparini G., Fox S.B., Colpaert C., Marson L.P., Gion M., Beliën J.A. Second international consensus on the methodology and criteria of evaluation of angiogenesis quantification in solid human tumours. Eur. J. Cancer. 2002;38(12):1564–1579. doi: 10.1016/s0959-8049(02)00094-1. (August) [DOI] [PubMed] [Google Scholar]
  • 10.Vermeulen P.B., Gasparini G., Fox S.B., Toi M., Martin L., McCulloch P., Pezzella F. Quantification of angiogenesis in solid human tumours: an international consensus on the methodology and criteria of evaluation. Eur. J. Cancer. 1996;32A(14):2474–2484. doi: 10.1016/s0959-8049(96)00379-6. (December) [DOI] [PubMed] [Google Scholar]
  • 11.Weidner N. Current pathologic methods for measuring intratumoral microvessel density within breast carcinoma and other solid tumors. Breast Cancer Res. Treat. 1995;36(2):169–180. doi: 10.1007/BF00666038. (January) [DOI] [PubMed] [Google Scholar]
  • 12.AlexanderI W., Grabsch H., Treanor D.E. RandomSpot: a web-based tool for systematic random sampling of virtual slides. J. Pathol. Informatics. 2015;6(1):8. doi: 10.4103/2153-3539.151906. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

mmc1.docx (50.8KB, docx)

Articles from MethodsX are provided here courtesy of Elsevier

RESOURCES