- Open Access
MRI perfusion analysis using freeware, standard imaging software
BMC Veterinary Research volume 16, Article number: 141 (2020)
Perfusion-weighted imaging is only scarcely used in veterinary medicine. The exact reasons are unclear. One reason might be the typically high costs of the software packages for image analysis. In addition, a great variability concerning available programs makes it hard to compare results between different studies. Moreover, these algorithms are tuned for their usage in human medicine and often difficult to adapt to veterinary studies.
In order to address these issues, our aim is to deliver a free open source package for calculating quantitative perfusion parameters. We develop an “R package” calculating mean transit time, cerebral blood flow and cerebral blood volume from data obtained with freely imaging software (OsiriX Light®). We hope that the free availability, in combination with the fact that the underlying algorithm is open and adaptable, makes it easier for scientists in veterinary medicine to use, compare and adapt perfusion-weighted imaging analysis.
In order to demonstrate the usage of our software package, we reviewed previously acquired perfusion-weighted images from a group of eight purpose-breed healthy beagle dogs and twelve client-owned dogs with idiopathic epilepsy. In order to obtain the data needed for our algorithm, the following steps were performed: First, regions of interest (ROI) were drawn around different, previously reported, brain regions and the middle cerebral artery. Second, a ROI enhancement curve was generated for each ROI using a freely available PlugIn. Third, the signal intensity curves were exported as a comma-separated-value file. These files constitute the input to our software package, which then calculates the PWI parameters.
We used our software package to re-assess perfusion weighted images from two previous studies. The clinical results were similar, showing a significant increase in the mean transit time and a significant decrease in cerebral blood flow for diseased dogs.
We provide an “R package” for computing the main perfusion parameters from measurements taken with standard imaging software and describe in detail how to obtain these measurements. We hope that our contribution enables users in veterinary medicine to easily obtain perfusion parameters using standard Open Source software in a standard, adaptable and comparable way.
In a medical context perfusion is defined as the blood volume that passes through a capillary bed in a defined time period [1, 2]. Perfusion-weighted imaging (PWI) is a set of techniques to visualize the blood volume flow for medical examinations. It requires a tracer that visualizes the blood flow dynamics and can be imaged over time. This tracer can be endogenous or exogenous of origin. Arterial spin labeling (ASL) is performed using blood as endogenous tracer: the blood is labeled by an inversion or saturation pulse, leading to a change in signal intensity if it enters the slice(s) of interest . In comparison, a more robust way of performing perfusion measurements is employing an exogenous contrast medium as tracer. The most commonly used contrast medium is a gadolinium chelate, which is injected intravenously as a bolus .
The acquisition of perfusion images is then performed using one of two basic techniques. In dynamic-contrast enhanced magnetic resonance imaging (DCE -MRI) the increase in signal intensity due to T1-effects is extracted from T1-weighted sequences. This technique is particularly suited for assessing the contrast medium kinetics within a tissue over a longer time period, and is hence mainly used in tumor assessment [1, 3, 4]. The second technique, called dynamic-susceptibility-contrast magnetic resonance imaging (DSCE-MRI) uses dynamic T2*-weighted sequences to evaluate regional, cerebral perfusion parameters by detecting signal loss due to T2* effects caused by the contrast medium . For this, dynamic images are acquired before, during, and after contrast medium injection [1, 5, 6].
Both techniques are followed by the extraction of signal intensity–time curves from the acquired images. In a next step, these are converted into concentration-versus-time curves, from which several quantitative perfusion parameters can be obtained. Typical examples are the time of arrival (T0), the time to peak (TTP), the mean transit time (MTT), the cerebral blood flow (CBF) and the cerebral blood volume (CBV) , which are defined as follows: T0 and TTP are time parameters representing the time between the injection of the contrast medium and its arrival at the region of interest (ROI) (T0) and the time to its maximum concentration (TTP), respectively. The MTT describes the average amount of time the contrast agent takes to pass through the ROI [1, 7]. The CBF is defined as the blood flow through a region-of-interest (ROI) divided by the mass of that ROI [2, 5, 7]. The CBV is the product of MTT and CBF and hence gives the volume of blood in a ROI divided by the mass of the ROI . After their calculation, these parameters can be used to generate colored perfusion maps allowing for qualitative assessment of brain perfusion, e.g. by comparing the right and left hemisphere.
On the technical side, the extraction of certain of these perfusion parameters, namely MTT, CBF and CBV, from the magnetic resonance (MR) images is based on a mathematical technique called deconvolution . Several mathematical techniques are available for performing this step, see the review by Fieselmann et al. . However, the exact implementation of these algorithms is vendor specific and often not available for review, resulting in the fact that the obtained parameters cannot be easily compared between different MR systems [9, 10]. Moreover, the software packages performing these calculations are usually very expensive and often specifically designed for use in human medicine. These restrictions motivated us to provide an open source implementation of a deconvolution algorithm for use in veterinary perfusion imaging.
We implemented our algorithm in RFootnote 1. Being commonly used in statistical computing, R also supports numerous numerical and statistical tasks. We chose it compared to other software packages (e.g. Matlab) because it is distributed as open-source software and thus freely available. Consequently, we provide our software as an “R package”, available online on the Open Source platform “GitHub”, https://github.com/volkherscholz/vetperf. More detailed information on how to use this package is available online, as well as through the usual “R” help functionality. Our deconvolution algorithm is based on the ideas reviewed in the contribution of Fieselmann et al.  and focuses on extracting the MTT, the CBF as well as the CBV from data obtained from employing an exogenous contrast media such as gadolinium as tracer. An extension to compute also TTP and T0 is straightforward and planned for the next release. In order to describe the main idea of the algorithm, we briefly review the physical mechanism.
The calculation of perfusion analysis is based on measurements taken while the bolus travels through the blood system. The starting point is the arterial input function (AIF), measured at the artery before the contrast agent bolus travels through the region of interest (ROI). It is inversely proportional to the density of the contrast agent bolus in the blood. The received signal in the ROI is a combination of the AIF with the internal ROI structure. The mathematical operation modelling this relationship is called convolution. More specifically, the output signal is obtained from convolving the arterial input function with the flow-scaled residue function (see reference  for details). In order to extract the perfusion parameters, which depend on the internal ROI structure (encoded in the flow-scaled residue function), we have to reverse this mathematical operation, a process called deconvolution.
The review article  explains several of mathematical techniques for performing this operation, focusing on an algorithm based on L2 weighted regression (Ridge regression). We implemented an extension of this algorithm, using ideas from Machine Learning. More specifically, our package employs the elastic-net algorithm  from the “R package” “glmnet” [12, 13] to perform the deconvolution. Compared to just ridge regression, elastic-net enforces that the obtained flow-scaled residue function is “sparse”, i.e. does not have too many non-zero entries. In addition, we can enforce that it should only have non-negative values. Together, both constraints typically lead to flow-scaled residue functions with less high order fluctuations than those obtained from just ridge regression (see Fig. 1). The elastic-net algorithm features two hyperparameters, usually referred to as alpha and lambda, which control the exact terms in the objective function (see [11, 12] for details). The hyperparameter alpha ranges from 0 to 1 and concerns the combination of ridge regression and sparsity penalties - a small alpha puts more emphasis on ridge regression, while a larger alpha enforces sparsity stronger. The hyperparameter lambda scales the entire regression terms, involving both the ridge as well as the sparsity constraint. We follow the standard approach (see [12, 13]) and let the user specify the alpha parameter while automatically choosing lambda. More specifically, we perform cross-validation: we break the data apart into random subsets, then fitting the data several times for different values of lambda, with different subsets omitted. The package glmnet then chooses the best lambda out of these runs. In order to reduce the variability due to the random nature, we repeat that process several times (default are 10 iterations) and use the resulting average value for lambda. The variability can be further reduced by performing more iterations, with the consequence that the algorithm is slower.
Apart from the basic deconvolution algorithm, our package provides convenience functions which allow the user to input the data in terms of tables obtained from reading in comma-separated-values (CSV) files. The software package can also be employed to compute perfusion parameters normalized by a ROI of choice (i.e. with measurements obtained in the white matter). We used our algorithm to re-assess data obtained from dogs from previous studies. The data is included in the “R package” and its analysis is also documented in a package vignette. We now briefly review its content.
The dataset consists of measurements acquired from images from eight healthy and twelve dogs with idiopathic epilepsy obtained within two previous research projects were assessed [14, 15]. MRI was performed using a 1.0 TeslaFootnote 2 superconductive system and a SENSitivity Encoding (SENSE) coilFootnote 3. The following sequences were acquired in addition to the PWI: dorsal and transverse T2-weighted images, transverse T2 weighted FLAIR images, transverse T2*-weighted gradient echo images, transverse T1-weighted sequence pre- and post-contrast medium administration and dorsal T1-weighted gradient echo images pre- and post-contrast medium administration. We performed DSC-MRI employing a dynamic multishot fast-field-echo echo-planar sequence in a dorsal plane, paralleling the skull base with one slice through the thickest portion of the caudate nucleus. For each slice 40 dynamics were acquired, being acquired 1.6 s apart between each other [14, 15]. We used gadoteric acid as a contrast agent, which was injected intravenously at the 10th dynamic at a dose of 0.2 mmol/kg body weight. The injection was performed using a double-headed injection pump with an injection rate of 5 ml/second, followed by an injection of 20 ml of Ringer’s solution. Thus, the first nine images provided the baseline information, while the images from dynamic time step ten and onwards showed contrast medium flow dynamics [14, 15].
Image and data processing
In order to compute the perfusion parameters with our “R package”, the images obtained within the previous studies were imported into the viewing software (OsiriX Light®Footnote 4) and opened using the 4D-Viewer. In the 4D-Viewer, the navigation through the different slices is possible using the right and left arrow keys, while the selection of the dynamic steps is performed employing the up and down arrow keys. In a next step, ROIs were manually drawn around the caudate nucleus, the thalamus, the piriform lobe including the amygdala, as well as the hippocampus, the semioval center and also the temporal cerebral cortex, using the pencil tool to outline the respective ROI by the first author of this study. Each structure was marked on the left and right and hand side. In analogy to the previous studies, each ROI was outlined on one representative slice, and chosen to be as large as possible, while avoiding inclusion of adjacent structures [14, 15]. The images of the other sequences were available at the time of the ROI placement and served as a reference for anatomic comparison. The middle cerebral artery was chosen for the AIF, using a rectangular ROI. In the final image processing step, the PlugIn ‘ROI-enhancement’, which is freely available using this viewing software, was used to generate a time-intensity curves. The specific settings were as follows: Curves – mean, X – 4th Dimensions and Y – no decision made. Finally, the intensity data was exported as comma-separated-value (CVS) file, which is a type of spreadsheet file. The Fig. 2a – d visualize the individual steps starting from the ROI selection and ending with the data export. The Fig. 3a – f illustrate the steps necessary to extract the dynamic perfusion data using Horos®Footnote 5, an open source imaging software commonly used in veterinary medicine, which does not offer a ROI-enhancement tool. The collected data is available in the supplementary material (additional file 1) as well as provided with the package itself. In order to compute the MTT, the CBF and CBV, several additional parameters are needed, which are summarized below in Table 1.
We used our package to compute relative perfusion parameters (normalized by the measurement taken from the semioval center) for all 20 dogs, both sides and all five ROIs.
(ROIs (see Fig. 4a - c). Our choice for the hyperparameter alpha was 0.3, expressing a tendency towards ridge regression while still enforcing sparsity. However, we did observe that different choices of alpha did not influence the clinical results (see Fig. 5a - c for the choice alpha = 0.8).
In order to assess whether the parameters returned by our algorithm are still clinically useful, we checked whether a significant difference can be seen difference between healthy and diseased dogs, as observed previously [14, 15].
The comparison was made by fitting (general) Linear Mixed Models (LMM) to the computed parameters MTT, CBF and CBV. All models included a fixed effect modelling the influence of the ROI and a random effect modelling the influence of the animal (the normal distribution was chosen for MTT random effect, while a Gamma variate for chosen for the CBF and CBV, see  for a detailed explanation). Half of the models (one each for MTT, CBF and CBV) in addition included a fixed effect expressing the influence of the state (healthy vs diseased). We then compared the fit quality of both models (with and without the effect depending on the state) using the chi-squared test. The results are summarized in Table 2.
The results are in good agreement with results obtained previously using perfusion parameters obtained from proprietary software . Absolute values generated using our software package varied from previously generated values using vendor specific software, with a significant increase in the mean transit time and a significant decrease in the cerebral blood flow for diseased dogs. The relationship between the values for healthy and diseased dogs were similar to the previously generated values using vendor specific software.
Perfusion-weighted imaging is currently only scarcely used in veterinary medicine. Image analysis requires costly software packages. Great variability in available programs using different deconvolution algorithms, with non-transparent mathematics behind them, exists. There is no standard recommendation for perfusion software and no quality assurance program testing reliability and accuracy of calculated values is performed. Depending on the disease process varying software are better suited to analyze perfusion data; not every software can deal with every type of perfusion image and although values should theoretically be comparable between different software in reality this is questioned. Thus, doubts concerning the reliability of quantitative perfusion parameters even exist in human medicine [8, 9]. This might lead to further wariness in veterinary medicine preventing investment into perfusion software.
We herein provide an “R package” computing the main perfusion parameters (MTT, CBF and CBV) from measurements taken with standard imaging software and describe in detail how to obtain these measurements.
An in-depth examination and comparison of the parameters obtained from our implementation and those of different MR vendors was out of scope of this study, as it would require licenses of different software packages. As explained above (see also [9, 10]), it is also unclear whether such an examination would return valuable results.
Instead, we chose to repeat the statistical analysis from the previous studies, as reported above. The clinical results obtained with our algorithm are similar to the ones obtained with proprietary software packages [14, 15]. More precisely, we see a significant increase in MTT, and a significant decrease in CBF for diseased dogs as compared to healthy ones, as previously reported. The increased MTT implies a slower blood flow through an individual ROI and corresponds well with the decreased CBF, thus an overall reduced blood flow through a specific ROI. In accordance with our results hypoperfusion, as expressed by the decrease in CBF, characterizes the ictal focus in human patients with temporal lobe epilepsy in the interictal time [16,17,18,19,20,21]. However, alterations in PWI vary with the cause of epilepsy in human medicine. In hippocampal sclerosis a decreased perfusion interictally has been described [16, 22], which is considered to be the result of cell loss and sclerosis . In veterinary medicine hypometabolism of the cerebral cortex has been shown in a group of epileptic Logotto Romagnole dogs compared to a healthy control group of the same breed FDG-PET . One can speculated that a reduced metabolism is related to the reduced blood flow, however it remains unknown which is sequel of the other.
The lack of a significant difference in CBV is most likely due to the fact that it can be expressed as the product of the two: as the MTT is statistically higher, while the CBF is statistically lower, their product includes two competing effects which hence can lead to less statistically significant differences.
We concede that one statistical analysis does not prove that our implementation shows a comparable performance when put side by side with vendor specific solutions. However, is nevertheless shows the potential of our software package. And being open source, we do encourage the reader to try it out on other datasets and report any potential improvement back to the community and us.
Functional magnetic resonance imaging of the central nervous is still in its infancy in veterinary medicine. However, it is reasonable to expect that it will gain increasing importance in the near future, given the fact that invasive treatment options require information about brain function in order to exactly address the diseased brain area and to avoid damage to a vital brain area. Furthermore, the increasing availability of refurbished high-field MR system from human medicine makes these techniques affordable to veterinarians.
In order to facilitate the use of perfusion weighted imaging in veterinary medicine, we provide an open source software package for calculating several key quantitative perfusion parameters. As described above, the necessary measurements can be obtained with standard imaging software. Moreover, the computational steps are open source, allowing for an easy comparison and possible adjustment to other situations. We thus hope that our publication leads to an increase usage of PWI in veterinary medicine.
Availability and requirements
Project name: R package for performing perfusion analysis for veterinary studies
Project home page: https://github.com/volkherscholz/vetperf
Operating system(s): Linux, Windows, Mac OS X
Programming language: R
Other requirements: R packages glmnet, data.table
Any restrictions to use by non-academics: no
Availability of data and materials
The dataset supporting the conclusions of this article is included within the article and its additional file. Additional file 1 includes the individual signal intensity values, for each dynamic, for each brain region for healthy and diseased dogs. Original image files can be obtained from the main author of this manuscript upon request.
R version 3.6.1, R Project for Statistical Computing, Vienna, Austria.
Philips Intera Gyroscan, Philips Healthcare, Hamburg, Germany
SENSE-flex M coil, Philips Healthcare, Hamburg, Germany
OsiriX Light, v.10.0.4, 32-bit; Pixmeo SARL Bernex, Switzerland
Horos, v.4.0.0 RC1; The Horos Project, LGPL license at Horosproject.org, sponsored by Nimble Co LLC d/b/a Purview in Annapolis, MD USA
Arterial input function
Cerebral blood flow
Cerebral blood volume
Magnetic Resonance Imaging
Mean transit time
Perfusion weighted imaging
Region of interest
Singular value decomposition
Time of arrival
Time to peak
volume of interest
Giesel FL, Wüstenberg T, Bongers A, Weber MA, Zechmann C, Baudendistel KT, et al. MR-basierte Methoden der funktionellen Bildgebung des zentralen Nervensystems. Rofo. 2005;177:714–30.
Weber M-A, Risse F, Giesel FL, Schad L, Kauczor H, Essig M. Perfusion measurement using the T2* contrast media dynamics in neuro-oncology. Physical basics and clinical applications. Radiologe. 2005;45:618–32.
Zhao Q, Lee S, Kent M, Schatzberg S, Platt S. Dynamic contrast-enhanced magnetic resonance imaging of canine brain tumors. Vet Radiol Ultrasound. 2010;51:122–9.
Boss MK, Muradyan N, Thrall DE. DCE-MRI: a review and applicatiosn in veterinary oncology. Vet Comp Oncol. 2013;11:87–100.
Barbier EL, Lamalle L, Décorps M. Methodology of brain perfusion imaging. J Magn Reson Imaging. 2001;13:496–520.
McGehee BE, Pollock JM. Maldjian J a. brain perfusion imaging: how does it work and what should I use? J Magn Reson Imaging. 2012;36:1257–72.
Brix G, Schreiber W, Hofmann U, Gückel F, Hawighorst H. V. KM. Methodische Ansätze zur quantitativen Beurteilung der Mikrozirkulation im Gewebe mit der dynamischen. Radiologe. 1997;37:470–80.
Fieselmann A, Kowarschik M, Ganguly A, Hornegger J, Fahrig R. Deconvolution-based CT and MR brain perfusion measurement: theoretical model revisited and practical implementation details. Int J Biomed Imaging. 2011;2011:1–20.
Kudo K, Christensen S, Sasaki M, Østergaard L, Shirato H, Ogasawara K, et al. Accuracy and reliability assessment of CT and MR perfusion analysis software using a digital phantom. Radiology. 2013;267:201–11.
Knutsson L, Ståhlberg F, Wirestam R. Absolute quantification of perfusion using dynamic susceptibility contrast MRI: pitfalls and possibilities. Magn Reson Mater Physics, Biol Med. 2010;23:1–21.
Zou H, Hastie T. Regularization and variable selection via the elastic net. J R Stat Soc Ser B Stat Methodol. 2005;67:301–20.
Friedman J, Hastie T, Tibshirani R. Regularization paths for generalized linear models via coordinate descent. J Stat Softw. 2010;33:1–22.
Bates D, Mächler M, Bolker B, Walker S. Fitting linear mixed-effects models using lme4. J Stat Softw. 2015;67:1–48.
Hartmann A, Driesen A, Lautenschläger IE, Scholz VB, Schmidt MJ. Quantitative analysis of brain perfusion in healthy dogs by means of magnetic resonance imaging. Am J Vet Res. 2016;77:1227–35.
Hartmann A, von Klopmann C, Lautenschläger IE, Scholz VB, Schmidt MJ. Quantitative analysis of brain perfusion parameters in dogs with idiopathic epilepsy by use of magnetic resonance imaging. Am J Vet Res. 2018;79:433–42.
Wu RH, Bruening R, Noachtar S, Arnold S, Berchtenbreiter C, Bartenstein P, et al. MR measurement of regional relative cerebral blood volume in epilepsy. J Magn Reson Imaging. 1999;9:435–40.
Liu HL, Kochunov P, Hou J, Pu Y, Mahankali S, Feng CM, et al. Perfusion-weighted imaging of interictal hypoperfusion in temporal lobe epilepsy using FAIR-HASTE: comparison with H (2) (15) O PET measurements. Magn Reson Med. 2001;45:431–5.
Wolf RL, Alsop DC, Levy-Reis I, Meyer PT, Maldjian JA, Gonzalez-Atavales J, et al. Detection of mesial temporal lobe hypoperfusion in patients with temporal lobe epilepsy by use of arterial spin labeled perfusion MR imaging. Am J Neuroradiol. 2001;22:1334–41.
Szabo K, Poepel A, Pohlmann-Eden B, Hirsch J, Back T, Sedlaczek O, et al. Diffusion-weighted and perfusion MRI demonstrates parenchymal changes in complex partial status epilepticus. Brain A J Neurol. 2005;128:1369–76.
Toledo M, Munuera J, Salas-Puig X, Santamarina E, Lacuey N, Rovira A. Localisation value of ictal arterial spin-labelled sequences in partial seizures. Epileptic Disord. 2011;13:336–9.
Matsuura K, Maeda M, Okamoto K, Araki T, Miura Y, Hamada K, et al. Usefulness of arterial spin-labeling images in periictal state diagnosis of epilepsy. J Neurol Sci. 2015;359:424–9.
Pendse N, Wissmeyer M, Altrichter S, Vargas M, Delavelle J, Viallon M, et al. Interictal arterial spin-labeling MRI perfusion in intractable epilepsy. J Neuroradiol. 2010;37:60–3.
Leonhardt G, de Greiff A, Weber J, Ludwig T, Wiedemayer H, Forsting M, et al. Brain perfusion following single seizures. Epilepsia. 2005;46:1943–9.
Jokinen TS, Haaparanta-Solin M, Viitmaa R, Grönroos TJ, Johansson J, Bergamasco L, et al. FDG-PET in healthy and epileptic lagotto romagnolo dogs and changes in brain glucose uptake with age. Vet Radiol Ultrasound. 2014;55:331–41.
The technical assistance of Ella Wenz is gratefully acknowledged. The images were acquired at the Department of Veterinary Clinical Sciences, Clinic for Small Animals, Justus-Liebig-University Giessen, Germany.
No funding was received for this study.
Ethics approval and consent to participate
All investigations were performed in strict compliance with the restrictions of the German Animal Protection Law. For the study images acquired for previous research projects were assessed, thus approval from the Committee on the Ethics of Animal Experiments of the Justus-Liebig-University and the local Hessian government was not required.
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The work was performed at the Department of Veterinary Clinical Sciences, Clinic for Small Animals, Justus-Liebig-University Giessen, Germany
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
About this article
Cite this article
Hartmann, A., Scholz, V.B. & Lautenschläger, I.E. MRI perfusion analysis using freeware, standard imaging software. BMC Vet Res 16, 141 (2020). https://doi.org/10.1186/s12917-020-02352-0
- Magnetic resonance imaging
- Machine learning
- R package