Abstract
Introduction
Aggressive brain tumors are challenging to accurately diagnose and treat in both pediatric and adult populations. 1 They are often characterized by a high degree of spatiotemporal tissue heterogeneity, which may not be easily interpreted on conventional imaging including magnetic resonance imaging (MRI-T1 weighting, T2 weighting or FLAIR) 2 and computerized tomographic imaging. Further obstacles arise when tumors are present in regions where performing a biopsy is considered too high risk, particularly in brainstem tumors. Thus, the need for accurate quantification of noninvasive neuroimaging biomarkers is paramount. Diffusion-weighted imaging (DWI) has long been used as a qualitative supplement to tumor diagnosis.3–5 DWI is an MR technique that allows us to indirectly observe the degree of water displacement (Brownian motion) within the tissue by measuring the voxel-wise signal loss in the image following the application of an encoding gradient. This displacement can be quantitatively calculated as the apparent diffusion coefficient (ADC), measured in mm2/s. 6
Quantitative DWI methods, however, have mainly been limited to region-of-interest (ROI)7–9 approaches analyzing whole tumor diffusion. While more informative than qualitative observational methods, these do not solve the problem of tissue heterogeneity. Spatial variances between aggressive tumor growth, necrosis, and inflammation may be diagnostically significant, but are averaged over the tumor volume in traditional methods.
These challenges haveled to the development of many highly sophisticated advanced imaging analysis techniques. A promising approach is functional diffusion mapping (fDM). 10 fDM is a method of generating parametric maps from two coregistered diffusion images by calculating the voxel-wise change in ADC. This preserves the spatial information in the diffusion changes within the tumor tissue across these two time points. Existing fDM approaches have looked only at two imaging time points, often comparing pre- and postradiation effects.10,11 While these spatial analyses seem promising in improved outcome prediction, they still provide an incomplete picture of the long-term tumor progression and treatment response, of particular importance in prolonged therapies such as tumor vaccines. 12
Here, we introduce an extension of fDM called serial functional diffusion mapping (sfDM). sfDM aims to analyze the entire diffusion profile of the tumor progression through the course of the disease. This allows for (1) spatiotemporal quantitation of the diffusion properties of a tumor given a particular therapy and (2) characterization of the natural progression of specific brain tumors. sfDM is capable of quantitative and qualitative analysis of serial tumor imaging. The goal of the software is to provide the tools necessary to analyze a tumor data set in the context of spatiotemporal parametric mapping: the image registration pipeline, biomarker extraction, and visualization tools. Figure 1 outlines the general workflow when using sfDM.

General sfDM workflow.
The typical sfDM workflow takes as inputs the patient's diffusion and reference images for each time point, along with a user-defined tumor ROI. The sfDM pipeline automatically performs a series of image registrations and calculates parametric maps for every user-selected time point. These parametric maps are then used to generate a patient-specific fDM timeline.
An additional obstacle encountered in tumor research is the relative lack of transparency in the methods and algorithms employed by investigators. The use of closed-source, “in-house”–developed or expensive commercial software creates a hurdle that impedes the reproducibility and validation of promising new methods by restricting their user base. sfDM is provided as an open-source package with the intention of not only transparently broadening its user base but also to more efficiently improve and optimize its functionality through community feedback and development. This approach is critical for the use of the sfDM technique to eventually be implemented and validated for the analysis of diffusion imaging data from multi-institutional Phase II and III brain tumor therapy studies. 13 In addition, this approach will also help validate the sfDM technique as a potential “point-of-care” analysis tool to be used in the clinic and help with the day-to-day management of neuro-oncology patients.
Software Details
The sfDM pipeline is described in detail below. It is designed as a series of image registrations to align every subject's imaging time point into a common, high-resolution 3D space to allow for voxel-wise comparison across time. The multiple registrations are necessary due to the low resolution of conventionally acquired diffusion images. Beyond the created parametric maps, the pipeline outputs subject-specific diffusion timelines and calculates several fDM statistics (outline below) for each pair of time points being compared.
sfDM is written in Python and relies on a backbone built with the open-source data-processing framework Nipype. 14 sfDM interfaces with several existing, commonly used neuroimage manipulation software packages and libraries including FSL, 15 AFNI, 16 and NIPY, 17 and introduces newly developed brain tumor-specific visualization tools. sfDM is compatible with Linux and OSX operating systems and can be run on Windows using a virtual machine.
Inputs
sfDM requires as input at least one high-resolution structural image (T1- or T2-weighted) to serve as the spatial reference for the registration of each imaging time point (sfDM label:
DWI is typically acquired at lower resolutions as a sacrifice to acquisition speed. Most modern protocols acquire a standard T2-weighted image with no diffusion gradient (the b0 image), followed by a set of images acquired using orthogonal diffusion directions. The calculated diffusion maps are created as the normalized difference in signal between the b0 image and the averaged set of diffusion images (b1), with lower signal indicating increased diffusion. Therefore, ideally the b0 image is used for registration due to its higher signal and better tissue contrast, with each resulting registration matrix applied to the ADC image. The b0 image, however, is not always consistently available in the same space as the derived ADC, particularly when analyzing retrospective or multisite data. Because of this, sfDM gives the option of directly using the available ADC image for the first registration step, in spite of its lower signal-to-noise ratio.
Image Registration Module
As a preprocessing step, the reference and diffusion images are brain extracted using FSL's Brain Extraction Tool using robust brain center estimation and a low fractional intensity threshold. Figure 2 shows a typical workflow using default parameters, outlining the image registration steps performed by sfDM. This workflow is generated for each subject, outlining the specific options and parameters chosen by the user. To prevent gross misalignments, we first register the low-resolution diffusion image to the higher resolution time point reference image using a rigid-body linear registration. The time point reference image is then used as the input for registration to the high-resolution subject reference, with registration parameters applied to the diffusion and tumor ROI. The linear registration of each time point reference to subject reference space occurs in two steps: first, an affine registration using FSL's linear registration tool, followed by a fine registration with fast Fourier transform (FFT) interpolation with AFNI's 3dVolReg tool. An additional step following the linear registrations is to use the brain-extracted

Image registration pipeline.
The final registration node is a linear registration with a Hellinger distance metric (using AFNI) as default. sfDM also gives the option of using a nonlinear transformation using FSL's nonlinear registration tool (FNIRT), which may be beneficial in the case of evident mass effect. As FNIRT is dependent on image intensities for registrations, only the registered ADC maps are used in this step to prevent errors due to any contrast inconsistencies in the
In a properly set up environment, sfDM can take advantage of Nipype's built-in parallel-processing interface using Grid Engine 18 to run each time point's registration in parallel to reduce the processing time. This is of course dependent on the number of processing cores and memory available.
Image registration nodes automatically performed by the sfDM pipeline. Graph shows all the default image parameters for a typical run of sfDM. The graph is subdivided into Reg (linear registration) and Warp (modular nonlinear registration) phases to allow for modular flexibility in registration algorithms determined by the user. Each node is a processing step in the pipeline, with the used image-processing pipeline in parenthesis. A subject-specific graph outlining all user options is generated for every subject as a standard output.
sfDM Generation
Functional diffusion maps are generated by calculating the voxel-wise difference between pairs of registered time points. The user must specify which time points to use to generate the fDMs for (see sfDM Usage). For ongoing studies, sfDM, the incremental addition of new time points to an existing data set, only requires the additional registration to the common space, followed by the recalculation of difference maps and voxel weighting for all time points.
Outputs
In addition to the calculated fDMs, the pipeline outputs three-plane slice images at a user-defined coordinate, such as the center of the tumor or any other ROI, as well as scatter plot of voxel intensity changes (Fig. 3) for every generated map. Currently, the default threshold for a significant change in ADC is 0.4 mm2/s, as empirically derived by Ellingson et al. 19 However, future development will include the option of calculating patient-specific values by using an ROI of normal tissue at each time point.

Sample time point output images.
Optionally, sfDM will generate a subject-specific fDM timeline (Fig. 4). The fDM timeline provides a comprehensive view of the tumor progression from baseline through the subsequent time points.

Sample patient timeline.
Table 1 lists the metrics that are calculated for each map generated. Previous fDM studies have proposed multiple approaches for the calculation of fDM metrics. When comparing pre- and postradiation images, for example, including only voxels classified as tumor tissue at both time points (AND operation) was shown to have superior predictive power. 11 Other studies suggest including any tissue classified as tumor in either time points (OR operation). 20 sfDM generates fractional increase in ADC (fiADC), fractional decrease in ADC (fdADC), and the ratio of fiADC/(fdADC + 0.01) (fDM Ratio – the addition of 0.01 to the denominator avoids a potential division by 0) using both approaches. Additionally, sfDM generates a weighted metric, where each voxel's contribution to the extracted metric is weighted by the proportion of time points in which the voxel is classified as tumor (ie, a voxel present in all time points is given a weight of 1, whereas a voxel only present in 10% of time points is given a weight of 0.1). This novel approach presents a compromise between excluding potentially explanatory voxels from the metric extraction (AND function) and inevitably including healthy tissue in the image subtraction, which may obfuscate desired within-tumor ADC changes (OR function).
sfDM output metrics.
sfDM Usage
sfDM is run using a graphical user interface (Fig. 5). The user must specify the path of each input, along with the days after each scan from the first available imaging time point (referenced as baseline). Finally, the user supplies the coordinates of the ROI to be used for image generation (in structural reference space), along with the option to include a treatment marker to signal the start of a treatment. This is only used in the fDM timeline image generation. The selected image location and options are conveniently saved in JavaScript Object Notation format to allow easy recall and record keeping. The processing modules are then run sequentially by using the buttons on the right-hand side, allowing the user to perform a data check upon each module completion.

Graphical user interface for sfDM.
Figure 6 shows the graphical user interface for generating fDM timelines. This step is performed following registration and allows the user to select the time point pairs to be used in fDM generation. The timeline generation takes as input a “Serial” list, which consists of sequential parametric maps, and a “Baseline” list, which consists of subsequent time points compared to a specific time point of interest. These, however, are only by convention and may be freely modified by the user.

Timeline generation Graphical User Interface (GUI).
Testing
To test for potential variation in the output as a result of different registration methods, we ran diffusion-weighted images from a newly diagnosed pediatric brainstem glioma patient enrolled in a Phase I tumor vaccine trial at our institution 21 through our software using various settings. We ran five time points starting with the postradiation scan as baseline, using three registration methods: linear registration using b0 as initial source, linear registration using ADC as initial source, and nonlinear registration using b0 as initial source. All tumor ROIs were manually drawn using FSLView, and all additional parameters were set as default (see software documentation for full list of parameters at https://pypi.python.org/pypi/sfDM/). The patient was treated with concurrent radiation and chemotherapy prior to the start of vaccine, and the baseline scan was chosen as the time point at initial vaccine dose.
Additionally, we tested the nonlinear registration on a pediatric subject with a supratentorial mass that demonstrated a large calcification with mass effect distorting the adjacent left lateral ventricle, which later subsided. The large tissue distortion and proximity to the ventricle can be a challenge to image registration. We chose the scan prior to the observed calcification as the baseline and ran the pipeline with the default parameters using the nonlinear registration option.
Results
The provided defaults performed generally well with the data set used. However, using only ADC maps for initial registration required some manual removal of noise from the initial image on two of the five time points. Figure 7 shows the comparison between fDMs using three different registration methods at two different time points compared to baseline. As previously observed by Ellingson et al. 22 , nonlinear registration shows a decrease in the volume of tissue classified as significantly different (Fig. 8). While a small difference is observed between the linear registration methods, particularly in the fdADC, the overall trend is consistent. Finally, the nonlinear registration on the subject presenting with a calcification and mass effect was successful in spite of the large tissue distortion and intensity variation (Fig. 9). It should be noted that the diagnostic utility of a voxel-wise comparison between such large tissue distortion needs to be validated.

fDM comparison between registration methods.

Comparison of extracted weighted fDM metrics using different image registration methods for five time points using the same patient. While some differences are observed, the overall trend is consistent.

Nonlinear registration on a supratentorial mass that presented with calcification with mass effect on the adjacent left lateral ventricle. Despite large tissue distortion and intensity variation, the image registration was successful as evident by the consistent spatial location of the lateral ventricles.
Image registration required the longest amount of processing time, generally estimated at 20–30 minutes per image time point when using a linear pipeline approach (ie, no parallel processing). The final nonlinear registration option requires an additional 20 minutes per time point. Parallelizing the registrations is able to significantly reduce processing time. Care must be taken with the number of cores required, however, as this creates a bottleneck in memory with each parallel registration utilizing roughly 300 MB of RAM. All subsequent steps required less than 10 minutes per patient.
Discussion
When applied to fDMs, nonlinear registration algorithms have been previously shown to improve image registration and outcome prediction. However, care must be taken with assumptions made about corresponding tissue mapping across time points when doing so. 22 When analyzing patient cohorts, a consistent registration method should be enforced whenever possible. Even though the observed registration methods showed similar trends, the subtle difference in extracted metrics could become a confounding factor.
sfDM is a promising tool for the generation of serial parametric maps. While the test cases we presented were pediatric brain tumors, sfDM can easily be applied to adult populations. Additionally, this approach can be extended to include multimodal quantitative imaging data beyond DWI including diffusion tensor MRI and also perfusion MR (which included permeability MR imaging and arterial spin labeling). 23 Conveniently, sfDM provides the direct ADC registration method, which eliminates the need for a b0 image as the initial source of registration, which can be generalized to these additional imaging modalities.
This software does have limitations. Image registration is highly dependent on the quality of image acquisition, and careful quality control must be established in order to obtain meaningful results. Diffusion imaging can also suffer from susceptibility, gradient, and physiological artifacts, and ultimately, the results will only be as good as the images used to derive them. These artifacts can be particularly apparent in sensitive areas such as the brainstem, and we recommend a careful image acquisition protocol design in order to attenuate these problems in prospective studies (such as cardiac gating and proper shimming).
Furthermore, the presence of resection cavities, excessive mass effect, or tumor recurrence can cause the registrations to fail. To attenuate potential interpretation errors due to misregistration, we have incorporated break points at the end of each module that require visual inspection of the pipeline outputs. This does require the user to have previous experience with image registration methods in order to accurately identify any existing problems. Future iterations of the software will aim to incorporate more robust and automated methods for detecting and alerting users of any errors. This will have the added benefit of expanding the potential user base to include researchers and clinicians who may not be as familiar with the underlying methodology, with the goal of developing it into a true “point-of-care” tool. Finally, fDM is a useful and promising technique, but it is also very context-specific and requires clinical validation across several populations. Interpretation is highly dependent on tumor type, treatment, and patient population. 24
This software is still young, and future work will be aimed at improving usability from user feedback. Additional features will include the ability to differentially weigh tissue types such as necrosis or contrast enhancement in order to increase fDM sensitivity, as well as allowing users to more easily alter patient-specific parameters directly from the graphical user interface.
Availability
sfDM is available for download from https://pypi.python.org/pypi/sfDM/with documentation and installation instructions. The latest source code can be found at http://github.com/PIRCImagingTools/sfDM.sfDM is distributed under the BSD license, which allows anyone to freely use, distribute, and modify the source code.
Conclusion
We have introduced sfDM: a new open-source package capable of generating serial functional diffusion maps and extracting meaningful tumor diffusion-weighted MR biomarkers. sfDM is an efficient way to standardize and process serial functional diffusion maps in large cohorts, emphasizing transparency and reproducibility.
Author Contributions
Conceived and designed the experiments: RC, AP, VG. Analyzed the data: RC. Wrote the first draft of the manuscript: RC. Contributed to the writing of the manuscript: RC, AP, VG. Agree with manuscript results and conclusions: RC, AP, VG. Jointly developed the structure and arguments for the paper: RC, AP, VG. Made critical revisions and approved final version: RC, AP, VG. All authors reviewed and approved of the final manuscript.
