{'fraction_non_alphanumeric': 0.03649918647854489, 'fraction_numerical': 0.019718788702979675, 'mean_word_length': 4.987205583018319, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Neurological software tool for reliable atrophy measurement (NeuroSTREAM) of the lateral ventricles on clinical-quality T2-FLAIR MRI scans in multiple sclerosis

Background There is a need for a brain volume measure applicable to the clinical routine scans. Nearly every multiple sclerosis (MS) protocol includes low-resolution 2D T2-FLAIR imaging. Objectives To develop and validate cross-sectional and longitudinal brain atrophy measures on clinical-quality T2-FLAIR images in MS patients. Methods A real-world dataset from 109 MS patients from 62 MRI scanners was used to develop a lateral ventricular volume (LVV) algorithm with a longitudinal Jacobian-based extension, called NeuroSTREAM. Gold-standard LVV was calculated on high-resolution T1 1 mm, while NeuroSTREAM LVV was obtained on low-resolution T2-FLAIR 3 mm thick images. Scan-rescan reliability was assessed in 5 subjects. The variability of LVV measurement at different field strengths was tested in 76 healthy controls and 125 MS patients who obtained both 1.5T and 3T scans in 72 hours. Clinical validation of algorithm was performed in 176 MS patients who obtained serial yearly MRI 1.5T scans for 10 years. Results Correlation between gold-standard high-resolution T1 LVV and low-resolution T2-FLAIR LVV was r = 0.99, p < 0.001 and the scan-rescan coefficient of variation was 0.84%. Correlation between low-resolution T2-FLAIR LVV on 1.5T and 3T was r = 0.99, p < 0.001 and the scan-rescan coefficient of variation was 2.69% cross-sectionally and 2.08% via Jacobian integration. NeuroSTREAM showed comparable effect size (d = 0.39–0.71) in separating MS patients with and without confirmed disability progression, compared to SIENA and VIENA. Conclusions Brain atrophy measurement on clinical quality T2-FLAIR scans is feasible, accurate, reliable, and relates to clinical outcomes.


Introduction
Brain atrophy in multiple sclerosis (MS) was classically thought of as a late-stage phenomenon, secondary to the more salient white matter (WM) lesions (sclerosi) lending the disease its name (Murray, 2005). Over the past two decades, though, understanding of brain atrophy in MS has been substantially revised. It is now clear that atrophy begins very early in the disease process (Uher et al., 2014;Kalkers, 2002), can progress relatively independently of overt lesions (Fisniku et al., 2008), affects both gray matter (GM) and WM, and proceeds at up to 5 times the rate associated with normal aging (Miller et al., 2002). Perhaps most important of all, quantitative measurements of atrophy have been shown to be the best correlates and long-term predictors of both cognitive and clinical disability (Benedict et al., 2006;De Stefano et al., 2014;Summers et al., 2008;Zivadinov et al., 2016b of brain atrophy in MS is largely due to the emergence of quantitative image-based computational techniques for measuring brain atrophy more precisely and accurately than is possible by eye. These techniques include brain parenchymal fraction (BPF), boundary shift integral (BSI), structural image evaluation, using normalization, of atrophy (SIENA), voxel-, tensor-, and deformation-based mapping, and many others (Smith et al., 2002;Avants et al., 2008;Freeborough and Fox, 1997;Ashburner and Friston, 2000). However, despite their success in research, it has proven difficult to translate these approaches to clinical routine data. Unlike the research-quality MRI sequences underpinning many prior studies, clinical routine images pose many unique challenges. They often have lower signal-to-noise ratio (SNR) and/or spatial resolution due to trade-offs in scanning time. Also due to time constraints, full head coverage is often neglected. Clinical scans also lack standardization, which in turn is compounded by changes in MRI machine and/or scanner upgrades. Finally, they are also more susceptible to artifacts including gradient distortion, wrap-around and patient motion. For all these reasons, retrospective and/or prospective quantitative atrophy analysis in a clinical setting raises numerous theoretical and practical challenges.
Previous efforts at routinely-applicable atrophy measures have included qualitative metrics like ordinal scales (Simon et al., 2006) and semi-quantitative linear metrics like third ventricular width (Benedict et al., 2006). However, they failed to achieve widespread adoption, potentially due to issues of intra−/inter-rater variability and acquisition-related variability. Thus, there is a need for a brain atrophy measurement technique complementary to existing techniques: a fully quantitative method focused on robustness and applicability to clinical routine scans and large pre-existing datasets, while maintaining as much as possible the precision and accuracy of more traditional research methods.
Measurement of ventricular volume (VV) provides a potential solution to many of problems listed above, due to a confluence of physiological and technical factors. The potential for lateral VV (LVV) to be used as an early predictive marker for disability and cognitive impairment, and for use in identifying at-risk patients, was discussed more than a decade ago (Dalton et al., 2004). More recently, it has been shown that VV is one of the best predictors of confirmed MS disability progression and that VV can act as a proxy for more complex brain atrophy measures, like whole brain atrophy, over the long-term. In 176 MS patients followed with serial MRI over 10 years, the effect size between stable and disability-progression groups was similar for whole brain and LVV changes (d = 0.55 for whole brain, d = 0.51 for LVV), and both measures showed significant separation within the first two years (Zivadinov et al., 2016b). Change in LVV also correlated significantly with changes in GM and cortical atrophy over the 10-year period. In another longitudinal study of 54 patients, VV change over two years was found to be even more predictive of 5-year disability progression than whole brain volume change (Lukas et al., 2010). An even larger retrospective study of 261 subjects also showed VV change as one of the most important predictors of 10-year disability progression (Popescu et al., 2013).
From a technical perspective, LVV measurement may benefit from a number of factors (Table 1). First, the ventricle/tissue border is high contrast on T2-FLAIR (Zivadinov et al., 2016b). This means that contrast-to-noise ratio is generally high, even on rapidly acquired clinical routine scans. Second, the ventricles have a relatively simple shape, resulting in predictable edge positions and considerably less partialvoluming than the highly gyrified cortex. Because of this, LVV measurement may tolerate low resolution scans better than whole brain measurement. Finally, the central position of the lateral ventricles in the head confers two additional advantages: the lateral ventricles are unlikely to be cut off even in partial-head scans, and gradient distortion errors are diminished (Caramanos et al., 2010).
Various methods have previously been devised to segment and/or quantify VV on MRI in both healthy controls and in other diseases.
Template-based techniques have been very successful, and include ALVIN (Kempton et al., 2011), ANIMAL (Collins et al., 1995), decision fusion (Heckemann et al., 2006), and multi-atlas selection (Aljabar et al., 2009). These are based on non-linear alignment to a template (or templates), and subsequent transfer of template-space labels to the target image. FIRST (Patenaude et al., 2011) takes an alternative approach, fitting a priori parametric shape models to the target image, which produces excellent results for subcortical nuclei, but faces some difficulties with the ventricles. More-recently, patch-based (Coupé et al., 2011) and machine learning techniques (Julazadeh et al., 2012) have also been proposed. Combination techniques fusing various expert rules and other heuristics with intensity information have seen some success as well (Barra and Boire, 2001;Xia et al., 2004). A direct longitudinal technique -VIENA -modifying the popular SIENA approach to assess edge motion solely along the ventricular border (rather than the whole brain) has also been described and validated (Vrenken et al., 2014). However, none of these approaches have focused specifically on clinical quality T2-FLAIR scans. Therefore, we set out to develop and validate an LVV quantification tool for this purpose. Our goal was not to produce a method more precise or accurate than those described above. Rather, we sought to produce a highly robust technique capable of operating on clinical-quality T2-FLAIR images and producing results similar to more established techniques run on high-resolution scans. To do this, we extended an earlier idea for whole brain analysis proposed by (Baillard et al., 2001), and adapted it to LVV measurement on T2-FLAIR images. The core of our approach is a combination of multi-atlas segmentation and level-set refinement. We also extended the crosssectional method for direct longitudinal analysis by including an optional Jacobian integration step. We called the resulting algorithm "Neurological Software Tool for Reliable Atrophy Measurement" -NeuroSTREAM.

Subjects and datasets
For this study, de-identified, retrospective datasets were used. Demographic and clinical characteristics are reported in Supplement Table 1, while the MRI acquisition characteristics are reported in the Supplement Table 2. The Institutional Review Board of the University of Buffalo approved the use of all datasets.

Creation of templates and atlases
To provide the basis for template-driven segmentation, we first created three atrophy-level-specific templates. Since the major goal of this work was to produce an algorithm applicable to real-world data, we compiled a non-biased anonymized development dataset of paired T2-FLAIR and high-resolution T1 scans from 109 MS patients across 62 Table 1 Summary of common clinical-routine imaging challenges and the properties of LVV that allow it to provide mitigation for many of these challenges. (LVV = lateral ventricular volume).

Challenge LVV mitigation
Low-resolution scans Low-complexity border and simple topology allow better fitting of edges and use of constraints Imprecise positioning/ gradient distortions Nearness to the isocentre alleviates warping issues Incomplete head coverage LVV's centrality makes it unlikely to be cut off Other artifacts Wrap-around is mitigated by central position, noise by the strength of the border, motion by the use of topological constraints and the simple structure MRI scanners. This dataset was randomly selected from a number of published and unpublished datasets (Santos and Weinstock-Guttman, 2006;Uher et al., 2015;Zivadinov et al., 2017;Zivadinov et al., 2016aZivadinov et al., , 2016c, using a weighted sampling technique to uniformly cover a wide range of atrophy levels and lesion loads, while simultaneously balancing 1.5T and 3T scans. Scans were converted to NIfTI format, but no other prior pre-processing was performed. This multi-site, multiscanner dataset was representative of MS in general, with 72% females, and a mean age of 36.4 ± 12.4 years. On each subject's high-resolution T1 scan, SIENAX  was applied, with initial BET parameters of f = 0.3 and with the head and neck cleanup option enabled. Manual correction of deskulling was performed as necessary, and the regional option was employed to produce central CSF masks. Using the resulting normalized brain volume measurements, subjects were split into low, medium, and highatrophy tertiles. From each of the three tertiles, T2-FLAIR images were combined using non-linear symmetric diffeomorphic image registration with trilinear interpolation to generate unbiased, multi-scanner, tertilespecific 1 mm isotropic T2-FLAIR templates (Avants et al., 2008). Reflecting the fact that lesion masks might not be available in future automated analyses, we did not employ cost-function masking. Initial rigid registrations were performed to create a midspace image within each tertile. The final three templates are shown in Fig. 1.
In addition to each template itself, template-specific ventricle atlases were created as follows. Central CSF (cCSF) masks derived from regional SIENAX outputs were manually adjusted by expert operators (DR/JD) to correct errors and to remove non-LVV CSF (e.g. cisterns and third ventricle). The corresponding 3D-T1 scans were then registered to the subjects' T2-FLAIR images using rigid-body registration, and the resulting transforms were composited with the subjects' T2-FLAIR-totemplate non-linear transforms to bring each manually corrected LVV mask into template space. Individual subjects' normalized ventricle maps were then combined into a single ventricle map via voxelwise majority vote.
Finally, supplementary binary masks were created directly in each template space for use in later algorithm steps: • A forced inclusion mask composed of areas within the lateral ventricles that are often automatically misclassified, primarily regions with a high probability of containing choroid plexus.
• A forced exclusion mask composed of areas outside the lateral ventricles but easily automatically misclassified, including the third ventricle and nearby cisterns.
• A template-space sub-AC/PC mask to exclude areas below the anterior-posterior commissure line. Although the inferior horns of the lateral ventricles also lie below this plane, they are small and often lead to misclassification.
Examples of these masks for the middle tertile atlas/template pair are shown in Fig. 2.

Algorithm description
The proposed NeuroSTREAM algorithm can be conceptualized in three phases: pre-processing, template-based segmentation, and levelset refinement. An overview of all processing steps is shown in Fig. 3.

Pre-processing
First, T2-FLAIR images are preprocessed to improve consistency and address specific issues. Initial reorientation and robust field of view selection are performed to ensure that the image is in a roughly standard position and that areas outside the head are cropped out (i.e., extra Fig. 1. Individual patients' images encompass a wide range of atrophy levels, making alignment to a single normative template (such as MNI152) problematic. NeuroSTREAM addresses this problem by providing atrophy-specific templates. These MS-specific T2-FLAIR templates were derived from a multi-scanner, multi-field-strength population. The population was split into tertiles based on normalized brain volume before creating a nonbiased, nonlinear template for each tertile. During processing, a subject's scan is aligned to all three templates, and resulting segmentations and maps are derived by a joint-fusion weighting scheme based on how well each alignment performed. Left: low atrophy template; Center: mid-atrophy template; Right: high-atrophy template. To incorporate a-priori expert information into the NeuroSTREAM pipelines, binary mask volumes are included with each atrophy-level template. A calculation zone restricts the analysis to a probableventricle zone. An initial ventricle map provides a starting point for subsequent level set analysis. Forced inclusion and exclusion areas specifically include and exclude oftenmisclassified areas like choroid plexus and midline. Finally, an AC/PC plane map is used to reproducibly restrict measurement to the body, anterior, and posterior horns of the lateral ventricles. AC = anterior commissure, PC = posterior commissure. neck tissue). Next, bias field inhomogeneity is corrected using the N4 algorithm (Tustison and Avants, 2010). After these more generallyapplicable steps, a T2-FLAIR-specific intensity Winsorization (Wilcox and Wilcox, 2005) routine is employed with an upper cutoff at the 97.5th percentile. This is done to ensure that very bright, subject-specific lesions do not substantially bias subsequent steps, but are also not completely ignored in the fitting. Then, for numerical purposes and to ensure consistency, the image is upsampled to 1 mm cubic voxels using windowed sinc interpolation. Finally, the isotropic, upsampled image is smoothed using a nonlinear anisotropic diffusion algorithm to reduce noise while preserving strong edges (Perona and Malik, 1990).

Multi-atlas segmentation
Non-linear alignment to each of the three previously-described templates is then performed via a two-stage process. In stage one, a linear alignment is performed using a 12 degree-of-freedom affine transformation model with a mutual information cost function (Avants et al., 2008). For this alignment, the full head is used. In stage two, a second linear alignment is performed using the same transformation and cost function, but with a cost function weighting map restricted to within 2 cm of the ventricles in template space. Finally, in stage three a non-linear alignment is performed using the SyN transform (Avants et al., 2008), again with the restricted ventricle-specific weighting mask. The final nonlinear transformations from each template are then applied to each of the three ventricular atlases, and the resulting maps are combined into a single map using the joint label fusion technique (Wang and Yushkevich, 2013). This joint fusion technique takes into account the quality of underlying fit of the images, giving more weight to atlases corresponding to templates that have been more accurately warped to the target subject's T2-FLAIR image. The same joint fusion process is applied for each atlas's related supporting maps, using the warp field determined from the atlas itself.

Level set refinement
The template-based segmentation described above provides a map of the ventricles that is often of good quality. However, SyN and most similar non-linear warping techniques are toplogy-preserving. While generally a positive feature, this can be problematic with low-resolution scans in which portions of the ventricles may appear effectively disconnected even when upsampled (Coupé et al., 2011). The level-set framework provides an effective complementary approach, since it naturally handles changes in toplogy (Heimann and Meinzer, 2009). Therefore, a numerical level-set based evolution is performed on the initial template-based LVV segmentation. The level-set speed function, which drives the evolution of the segmentation, is produced via a voxelwise combination of factors. First, two groups of voxels are selected: those within the preliminary LVV and at least 1 mm from the border (inside voxels) and those outside the preliminary LVV between 1 mm and 10 mm from the border (outside voxels). A logistic regression model is then fit between the intensities of these two voxel sets to produce a function predicting probability of LVV membership from image intensity. From this function, a voxel-wise LVV probability map is created, and then refined as follows: all voxels in the forced inclusion mask are set to have a probability of 1, all voxels in the forced exclusion mask are set to have a probability of 0, and all voxels in the sub-AC/PC mask are set to have a probability of 0. Given this speed function and the initial LVV segmentation from the template-based stage, a level-set evolution is then performed with 25 iterations and a curvature value of 0.2 (Yushkevich et al., 2006).

Partial volume estimation
Despite the ventricles' comparatively simple topology, most voxels along the edges of the LVV still contain portions of both CSF and surrounding tissue. Common approaches to deal with this issue involve the use of explicit Gaussian mixture models to assign tissue-specific partial volume estimates (PVE) to each voxel (Avants et al., 2011;Zhang et al., 2001). However, this method is not reliable on T2-FLAIR images where unpredictable periventricular lesions substantially skew intensity distributions. To address this, the proposed algorithm instead uses a simpler but more robust super-resolution technique, relying on the level set evolution itself to perform implicit edge-based partial volume estimation. Each voxel within the LVV mask and the previously described speed function is subdivided into 8 subvoxels. An additional level-set refinement is then performed for 5 iterations in this higher-resolution space, and the final map is then subsampled back into the original space. The proportion of subvoxels included within the level set segmentation for each voxel then provides an approximate PVE estimate. This approach is numerically similar to previous level-set based PVE techniques (Rifai et al., 2000).

. Direct longitudinal analysis via Jacobian integration
Because direct longitudinal approaches can often provide more accurate and precise outcomes (Zivadinov et al., 2016c) by avoiding compounded measurement errors, we also extended the above algorithm to use a Jacobian integration technique (Nakamura et al., 2014) to evaluate longitudinal T2-FLAIR changes. In this case, the full crosssectional algorithm is run on both baseline and follow-up images to produce independent LVV maps. Then, the two images are warped together using nonlinear warping into a non-biased halfway space (Avants et al., 2012). Subsequently, the two ventricular masks are also brought into the halfway space and combined to produce a halfway LVV map. At the same time, the warp field is differentiated to produce a Jacobian determinant map. Finally, the Jacobian determinant field is integrated within the joint LVV map to produce a final estimate of percent volumetric change in LVV from baseline to follow-up. An overview of this processing is shown in Fig. 4.

Implementation details
The proposed method was implemented in Python and made use of the NiPype Neuroimaging Python framework (Gorgolewski et al., 2011). Experiments were carried out on a 32-core system with 192GB of RAM. Template alignment and longitudinal warping were performed using the ANTs toolkit (Avants et al., 2008), and logistic speed function prediction was performed with the scikit-learn machine learning toolbox (Pedregosa et al., 2011).

Validation
To validate the proposed NeuroSTREAM algorithm, we employed a number of complementary approaches in order to assess overall accuracy, precision, inter-scanner stability, and relevance to clinical outcomes. All NeuroSTREAM analyses described below were conducted fully automatically, with manual review of automatically generated segmentation images (and warp images in the case of longitudinal pairs). As the approach is intended to be fully automated, cases were not manually corrected -they were either accepted or rejected outright. Due to the exploratory nature of these validation analyses and the high interdependence between the various observations, correction for multiple comparisons between tests was not employed in this study.
2.4.1. Accuracy and agreement with manual gold standard (cross sectional) To address accuracy, a manual gold standard dataset was created.  An additional 30 independent MRI exams were selected randomly from the same pool as the dataset used for creation of templates and atlases, stratified to include 10 scans each of 3 mm, 5 mm, and 7 mm slice thickness T2-FLAIRs. Each exam also contained a high-resolution T1weighted image. Lateral ventricles were delineated manually in JIM 6.0 (Xinapse Systems, UK) on the T1-weighted images, beginning at the slice best corresponding to the AC/PC line as determined on orthogonal views. Volumes were computed at a subvoxel level and summed across ROIs. NeuroSTREAM was then run independently on the corresponding T2-FLAIR images, and the resulting automated volumes were compared to the manual gold standard volumes. Association with NeuroSTREAM was assessed by pairwise correlation, intra-class correlation (ICC), Bland-Altman (BA) plot, and casewise coefficient of variation (CoV). The same analyses were carried out on 3 mm, 5 mm, and 7 mm subsets, as well as acquisition-direction subsets, to determine the effects of these parameters.

Precision via scan-rescan (cross sectional and longitudinal)
To assess precision, we used a previously collected dataset of scan and re-scan sessions on the same 3.0 T GE Signa Excite HD 12.0 Twin Speed 8-channel scanner. A cohort of 6 volunteers (2 HC, 4 MS) with mean age was 28.7 ± 18.7 years, was scanned twice within one week, and protocols included identical 3 mm T2-FLAIR acquisitions.
For this scan-rescan dataset, NeuroSTREAM was run on each scan for each subject, and the Jacobian extension was run on each pair. Cross-sectional association was assessed by pairwise correlation, ICC, Bland-Altman plot, and casewise CoV. Longitudinal error was calculated as the median absolute Jacobian-derived percent change, with the true change assumed to be 0%.

Inter-scanner stability (cross sectional and longitudinal)
To assess stability across scanners, a previously collected dataset consisting of 125 MS patients and 76 healthy controls scanned at both 1.5T and 3T was used. Subjects were 72% female, with a mean age of 42.5 ± 11.1 years. All subjects were examined on both scanners within 72 h, and the order in which subjects were scanned was randomized. The scanners used were a 1.5T GE Signa Excite HD 12.0 8channel scanner and a 3T GE Signa Excite HD 12.0 Twin Speed 8channel scanner (General Electric Milwaukee, WI). 2D 3 mm T2-FLAIR acquisitions were included in each scanning session. Sequences were not identical between the two scanners, but rather reflected optimizations for the specific field strengths as would be seen in clinical practice.
As with the scan-rescan dataset, NeuroSTREAM was run on both scans for each subject, and association was again assessed by pairwise correlation, ICC, Bland-Altman plot, and casewise CoV. As above, longitudinal error was calculated as the median absolute Jacobian-derived percent change, with the true change assumed to be 0%.

Clinical relevance (cross sectional and longitudinal)
To assess clinical relevance, we used a 10-year serial validation dataset (Zivadinov et al., 2016b). Serial yearly MRI data were obtained from 176 early RRMS patients who were initially enrolled into the 2year, double-blind, placebo-controlled Avonex-Steroid-Azathioprine (ASA) study (Havrdova et al., 2009). MRI scans with 1 mm thick 3D-T1s and 3 mm thick 2D T2-FLAIRs were acquired on a 1.5 T scanner at baseline and at yearly intervals, and confirmed disability progression (CDP) status was assessed at the 10-year follow-up. Full details of the design, demographic and clinical characteristics, and results of the study were previously reported (Zivadinov et al., 2016b). 100 patients developed CDP and 76 remained stable.
NeuroSTREAM was run on each scan for each subject. Additionally, the longitudinal Jacobian integration component was used to evaluate pairwise, within-subject changes. SIENAX and SIENA were previously applied to this dataset, and processing included lesion in-painting, manual skull stripping correction, and manual acceptance of results. Prospectively, we also applied the VIENA longitudinal ventricular change measurement tool (Vrenken et al., 2014) on these corrected Fig. 6. Representative image of NeuroSTREAM algorithm performance on a scan with substantial RF artifact. The high-contrast of the ventricles, the multi-atlas approach, and the spatial regularization of the level-set refinement allow the algorithm to be very robust to artifacts like this that are common in clinical routine imaging.
images. We compared NeuroSTREAM to conventional VV measures -SIENAX ventricular CSF (VCSF) for cross-sectional and VIENA percent ventricular CSF volume change (PVCSFVC) for longitudinal -by investigating the correlations between the various measures. We also evaluated the direct relationship between NeuroSTREAM LVV and whole-brain measures -SIENAX normalized brain volume (NBV) and SIENA percent brain volume change (PBVC). To determine the clinical relevance of NeuroSTREAM, we compared each measure with respect to development of CDP at 10 years, as previously reported for SIENA/ SIENAX (Zivadinov et al., 2016b).

Development dataset
The NeuroSTREAM algorithm successfully delineated the LVV on a wide variety of cases (Fig. 5), and was visually assessed as failed in only 1 case (~1%) from the template/atlas creation dataset. The algorithm performed well even in cases with extreme lesion load or corruption by MRI artifacts (Fig. 6).

Accuracy and agreement with manual gold standard (cross sectional)
On the independent testing dataset, no cases failed visual quality control. R 2 correlation coefficient between high-resolution, manuallydelineated gold standard 3D-T1 volumes and automated volumes (from low-resolution T2-FLAIR) was 0.99 (p < 0.001), ICC was 0.99, and CoV was 3.82%, as shown in Fig. 6. The BA plot did not show any evidence of bias as a function of LVV (Fig. 7). When evaluated as a function of slice thickness, R 2 remained 0.99 in all subsets, and ICC was also consistently 0.99 (to 2 significant digits). However, CoV was 3.15% for 3 mm scans, 4.09% for 5 mm scans, and 4.22% for 7 mm scans. Seven scans were sagittally acquired, and the remaining scans were axially acquired. When evaluated as a function of orientation, R 2 and ICC were again 0.99 for both axial and sagittal scans. CoV was 3.84% for axial scans and 3.73% for sagittal scans.

Precision via scan-rescan (cross sectional and longitudinal)
The algorithm did not fail in any cases. R2 correlation coefficient was 0.99, ICC was 0.99, and CoV was 0.84%. The BA plot did not show any evidence of bias as a function of LVV (Fig. 7). Mean absolute Jacobian-derived percent change between scans was 0.68%.

Inter-scanner stability (cross sectional and longitudinal)
Out of 402 total scans, 4 analyses failed (< 1%). R2 correlation coefficient was 0.99, ICC was 0.99, and CoV was 2.69%. The BA plot did not show any evidence of bias as a function of LVV (Fig. 7). Mean absolute Jacobian-derived percent change from 1.5 to 3T was 2.08%.

Clinical relevance (cross sectional and longitudinal)
NeuroSTREAM was visually assessed as failed in 27 out of 1931 individual cross-sectional exams (~1.4%). Longitudinal Jacobian analysis was assessed as failed in 46 out of 1767 longitudinal scan pairs (~2.6%).
During the 10 year time period, PBVC changed by − 6.5%, corresponding to an annualized PBVC of −0.67%. In contrast, ventricular volume change as measured by VIENA on high-resolution T1 increased by 41.97%, corresponding to an annualized change rate of 3.57%a > 5-fold greater rate than PBVC. NeuroSTREAM LVV measures on low-resolution T2-FLAIR corresponded with VIENA, with PLVVC increasing by 38.64% over the same period (resulting in an annualized PLVVC of 3.32%).
Correlations between NeuroSTREAM and high-resolution T1-derived SIENAX VCSF and VIENA are reported in Table 2. Cross-sectional correlations were at or above r = 0.9, and 10-year change showed a correlation of 0.88. All p-values were below 0.01. Agreement was very high in all cases. NeuroSTREAM LVV was also significantly correlated with whole brain volumes and volume changes from SIENAX and SIENA, with longitudinal changes showing a correlation of r = − 0.581 (p < 0.001). For comparison, the analogous correlation between highresolution 3D T1 derived VIENA change with PBVC was r = − 0.635 (p < 0.0001). Table 3 reproduces the relationship between evolution of brain atrophy and CDP group for whole brain measures previously published (Zivadinov et al., 2016b). Previously, high-resolution-T1-derived PBVC showed significant group separation of confirmed disability progression (48 weeks) vs. stable MS within the first year of follow-up (54.0% difference, p = 0.053), and this difference remained significant at all time points of the study (effect sizes 0.27-0.70). VIENA (Table 4) showed similar results, with a significant difference after the first year (46.58% difference, p < 0.03) and effect sizes ranging from 0.31 to 0.62. This pattern remained the case with T2-FLAIR-derived NeuroSTREAM LVV, which showed separation after one year (60.0% difference, p < 0.009). The differences in NeuroSTREAM LVV also remained significant at all subsequent time points (effect sizes 0.39-0.71, Table 5), with the exception of a trend (p = 0.052) at 24 months. Graphical plots of SIENA PBVC, VIENA PVCSFVC, and NeuroSTREAM PLVVC are shown in Fig. 8.

Discussion
In this study, we developed and validated a new algorithm for measuring brain atrophy via LVV. LVV reflects both GM and whole brain atrophy (Zivadinov et al., 2016b), has clear borders even on lowquality scans, and is minimally susceptible to common MRI artifacts. Throughout development, we paid specific attention to the issues that arise when measuring brain atrophy on clinical-quality T2-FLAIR images, an MRI sequence performed as part of nearly all diagnostic and monitoring examinations for MS.
Our results show that NeuroSTREAM metrics are comparable to manual gold-standard, and to sophisticated SIENAX and VIENA LVV Table 2 Correlations between NeuroSTREAM LVV and previously established brain atrophy measures on the clinical 10-year serial dataset (Zivadinov et al., 2016a(Zivadinov et al., , 2016b(Zivadinov et al., , 2016c. NeuroSTREAM was assessed on conventional T2-FLAIR, and all other target measures were assessed on high-resolution 3D T1 images. Baseline and follow-up values are based on cross-sectional NeuroSTREAM, and change values are based on the Jacobian determinant extension. LVV = lateral ventricular volume, vCSF = ventricular CSF, NBV = normalized brain volume.

Table 3
Reproduced with permission from (Zivadinov et al., 2016b). SIENA percent brain volume change from baseline to follow-up at each time point, derived form high-resolution 3D T1 images. All p-values are age and sex corrected. Between group p-values are derived from ANCOVA analysis. PBVC = percent brain volume change, CDP = confirmed disability progression over 10 years. CDP group shows atrophy differentiation after only 1 year. measures. This is despite the fact that NeuroSTREAM is applied to lowresolution images with 300% coarser voxels (3 mm vs. 1 mm). Furthermore, the resulting LVV measures have a similar predictive profile to SIENAX-and VIENA-derived LVV. The algorithm was also extremely robust, failing in only 1 of the development cases (which included very extreme cases), and failing in < 2% of the cross-sectional cases and < 3% of the longitudinal case pairs in the large clinical dataset (despite clear artifacts on many scans and many cases with extensive lesion load). The inter-scanner reproducibility between 1.5T and 3.0T, at 2.69% cross-sectionally and 2.08% via direct Jacobian, also compares favorably to whole-brain measures performed on high-resolution images. In a recent study, Chu et al. evaluated paired 1.5T and 3.0T scans repeated on the same subjects within 1 month (Chu et al., 2016). They performed SIENAX on each scan, and compared the resulting whole brain volume measurements. Their data showed a 3.37% average absolute difference between scans. The improved results from LVV likely reflect both the distortion protection afforded by closeness to the isocenter and the simpler geometry of the ventricles compared to cortical gyri. When comparing error rates to whole brain measures, it is also important to consider that ventricular volume expands at a higher relative rate of up to 3-5 times that of whole brain volume (Popescu  , 2013;Zivadinov et al., 2016b). Although NeuroSTREAM metrics are in line with other methods, their precision, accuracy, and predictive value generally do not exceed these prior methods. This is as expected, since the goal of NeuroSTREAM is not to improve upon well-validated methods like VIENA in a research setting, but rather to expand the potential reach of automated atrophy quantification to a broader range of clinical exams. The findings of this study indicate that clinical-quality T2-FLAIR can indeed be used for meaningful and reliable brain atrophy measurements.
In addition to prospective clinical-quality scan analysis, there is potentially an important place for a method like that proposed here in the analysis of retrospective datasets. Many previous studies in MS have been performed with lesions as an MRI endpoint, and these studies have not always included high resolution T1-weighted images or used consistent full-head head coverage. Similarly, many latent clinical scans have not been used at all in a research setting. The ability to perform LVV measurement on all these datasets and to pool them together may eventually allow for large-scale data mining and informatics techniques to be brought to bear in providing more individually meaningful predictions in a clinical setting. For example, k nearest neighbor and kernel density techniques are simple and powerful non-parametric techniques that can match individuals for many variables simultaneously. However, these powerful techniques suffer from the "curse of dimensionality" and usually require far more data points than traditional MRI studies can provide.
While designing the NeuroSTREAM algorithm, many trade-offs were made between performance and robustness. For example, intensity Winsorization to minimize the influence of lesions is a relatively simplistic approach, whereas many automated lesion detection/classification algorithms have been devised and even used routinely in practice (Lladó et al., 2011). However, these approaches generally require multiple input images (e.g. T2-FLAIR and T1) and complex statistical models that must be tuned to specific scanners and imaging protocols. Therefore, incorporating these approaches would have limited the generalizability of the LVV algorithm and potentially increased the number of failed cases. Similarly, logistic regression is a basic technique for classification, potentially improved upon by more modern machine learning methods like SVD, decision trees, and others. However, logistic regression is a very robust technique, and the proposed method of applying it on a case-by-case basis allows for a fast and widely applicable means of assigning probabilities to individual image voxels.
An advantage of the proposed method is that it is fully automated. In theory, other methods for atrophy measurement like SIENAX and SPM are also fully automated. However, on scans with imperfect quality, manual corrections to de-skulling procedures are often required to avoid failed cases or erroneous data. By limiting itself to a more easily segmentable region, the proposed NeuroSTREAM technique can be more fully automated.

Limitations and future work
We have shown both here and previously that LVV is significantly correlated with both whole brain atrophy and clinical outcomes. However, it remains a proxy, with all the attendant caveats of any proxy measure. In particular, mild enlargement of the ventricles with unknown etiology is a relatively common incidental finding that may not reflect overall brain atrophy. This may therefore limit the applicability of single, cross-sectional LVV measurements to individual subjects in general, even outside the scope of the currently proposed algorithm.
Another potential issue is that of normalization. Normalizing brain volume measures to intracranial volume has improved inter-subject data comparison with other techniques, by correcting for non-pathological natural variations in brain size (Sanfilipo et al., 2004). For the current algorithm, we found more variability and introduction of analysis failures in estimating intracranial volume on low-quality T2-FLAIR scans than was gained by including it (once sex is taken into account as a factor). Therefore, we did not include it in the present work. However, future approaches may be able to provide a more accurate estimate of intracranial volume without sacrificing accuracy or robustness.
The method at present is also only applicable to T2-FLAIR scans. We chose this because it is the "lowest common denominator" of clinical MS MRI imaging protocols. Although this makes it generally and widely applicable, many individual researchers may have other scans available. With high-resolution research quality images, alternate approaches like SIENA/X, VIENA, and SPM are likely the best option. However, there may be a middle ground where low-resolution T1weighted images, T2 images, or PD images may be present, and might provide valuable additional information for LVV segmentation. We are therefore working to extend the method to these additional image weightings. Indeed, there is also a potential value for even high-resolution T1 data, in providing a more accurate control for NeuroSTREAM measures taken in practice.

Conclusions
NeuroSTREAM is able to measure LVV accurately, precisely, and reliably on clinical-quality T2-FLAIR images, and changes in NeuroSTREAM-derived LVV relate to clinical outcomes. This provides an important complementary approach for performing meaningful atrophy analysis of real-world imaging datasets and clinical routine scans where no high-resolution T1-weighted images are available.