Background: Angiogenesis is a key phenomenon for tumour progression, diagnosis and treatment in brain tumours and more generally in oncology. Presently, its precise, direct quantitative assessment can only be done on whole tissue sections immunostained to reveal vascular endothelial cells. But this is a tremendous task for the pathologist and a challenge for the computer since digitised whole tissue sections, whole slide images (WSI), contain typically around ten gigapixels. Methods: We define and implement an algorithm that determines automatically, on a WSI at objective magnification 40×, the regions of tissue, the regions without blur and the regions of large puddles of red blood cells, and constructs the mask of blur-free, significant tissue on the WSI.Then it calibrates automatically the optical density ratios of the immunostaining of the vessel walls and of the counterstaining, performs a colour deconvolution inside the regions of blur-free tissue, and finds the vessel walls inside these regions by selecting, on the image resulting from the colour deconvolution, zones which satisfy a double-threshold criterion. The two thresholds involved are automatically computed from the WSI so as to cope with variations in staining and digitisation parameters. A mask of vessel wall regions on the WSI is produced.The density of microvessels is finally computed as the fraction of the area of significant tissue which is occupied by vessel walls.We apply this algorithm to a set of 186 WSI of paediatric brain tumours from World Health Organisation grades I to IV. Results: The algorithm and its implementation are able to distinguish on the WSI the significant tissue and the vessel walls. The segmentations are of very good quality although the set of slides is very heterogeneous (in tumour type, in staining and digitisation parameters, and inside WSI themselves, where the tissue was often very fragmented). The computation time is of the order of a fraction of an hour for each WSI even though a modest desktop computer is used (a 2012 Mac mini) and the average size of WSI is 7 gigapixels. The computed microvascular density is found to be robust. We find that it strongly correlates with the tumour grade.