Abstract
High-resolution fMRI in the sub-millimeter regime allows researchers to resolve brain activity across cortical layers and columns non-invasively. While these high-resolution data make it possible to address novel questions of directional information flow within and across brain circuits, the corresponding data analyses are challenged by MRI artifacts, including image blurring, image distortions, low SNR, and restricted coverage. These challenges often result in insufficient performance accuracy of conventional analysis pipelines. Here we introduce a new software suite that is specifically designed for layer-specific functional MRI: LAYNII. This toolbox is a collection of commandline executable programs written in C/C++ and is distributed open-source and as pre-compiled binaries for Linux, Windows, and macOS. LAYNII is designed for layer-fMRI data that suffer from SNR and coverage constraints and thus cannot be straight-forwardly analysed in alternative software packages. Some of the most popular programs of LAYNII contain ‘layerification’ and columnarization in the native voxel space of functional data as well as many other layer-fMRI specific analysis tasks: layer-specific smoothing, vein-removal of GE-BOLD data, quality assessment of artifact dominated sub-millimeter fMRI, as well as analyses of VASO data.
Highlights
A new software toolbox is introduced for layer-specific functional MRI: LAYNII.
LAYNII is a suite of command-line executable C++ programs for Linux, Windows, and macOS.
LAYNII is designed for layer-fMRI data that suffer from SNR and coverage constraints.
LAYNII performs layerification in the native voxel space of functional data.
LAYNII performs layer-smoothing, GE-BOLD vein removal, QA, and VASO analysis.
1. Introduction
Functional Magnetic Resonance Imaging (fMRI) aims to measure correlates of brain activity at the level of individual voxels. Recent advances in fMRI hardware (Yacoub and Wald 2018), readout strategies (Poser and Setsompop 2018), and fMRI contrasts (Huber et al. 2019b) provide estimates of brain activation with voxel-sizes in the sub-millimeter domain. Thus, modern fMRI data from ultra-high fields (UHF) are approaching the spatial scale of cortical layers and columns (Norris and Polimeni 2019). While the first decade of sub-millimeter fMRI research focused on data acquisition methods, the methodological research questions of the layer-fMRI field have since shifted towards addressing analysis challenges. As such, a recent survey of the ISMRM study group Current Issues in Brain Function showed that most high-resolution fMRI researchers consider analysis challenges to be more relevant than acquisition challenges (Huber for ISMRM SG CIBF 2018).
The specific shortcomings of common analysis approaches for high-resolution fMRI are listed in multiple review articles (Kemper et al. 2018; Polimeni et al. 2018), and there are many fMRI analysis software packages that are able to minimize these shortcomings to some degree: AFNI/SUMA (https://afni.nimh.nih.gov, (Cox 1996), ANTs (http://stnava.github.io/ANTs/, (Avants et al. 2008)), BrainVoyager (http://www.brainvoyager.com, (Goebel 2012)), CBSTools/Nighres (http://www.nitrc.org/projects/cbs-tools/, (Bazin et al. 2007), https://nighres.readthedocs.io/, (Huntenburg et al. 2018)), FreeSurfer (https://surfer.nmr.mgh.harvard.edu, (Fischl 2012)), FSL (http://fsl.fmrib.ox.ac.uk/fsl, (Jenkinson et al. 2012)), and SPM (http://www.fil.ion.ucl.ac.uk/spm (Ashburner 2012)).
Many of these packages, however, have been originally developed, validated and established for the application for fMRI data that have resolutions in the range of 1.5-5mm, large brain coverage and -weighted fMRI contrasts. Such fMRI data constitute the vast majority of the fMRI literature and are hereafter referred to as “conventional fMRI”. However, layer-fMRI data are different from conventional fMRI data and layer-fMRI data are limited by many unique high-resolution constraints. Thus, layer-fMRI data cannot be straightforwardly analysed with conventional analysis pipelines (Fig. 1). The specific layer-fMRI data constraints are listed below:
Low SNR: Layer-fMRI data are noisier compared to conventional fMRI data. In layer-fMRI studies, tSNR values in the single-digit regime are not uncommon. This indicates that layer-fMRI data are usually more limited by thermal noise than physiological noise (Tri- antafyllou et al. 2011). Therefore, many quality assessment (QA) tools that have originally been developed for conventional fMRI data are not applicable to layer-fMRI data. For example, in the thermal noise dominated regime, the QA metric of tSNR cannot capture many sources of MR-sequence related and physiological-noise-related signal clutter. These sources of signal instability are below the thermal noise floor (for more discussions of inappropriate QA metrics see section 2.5). Thus, for layer-fMRI data, new analysis tools with additional (and optimized) QA metrics are needed.
Due to the low tSNR in layer-fMRI, it can become necessary to average multiple data points across space (e.g. spatial smoothing, or voxel pooling). In many layer-fMRI application studies, it can be assumed that neighbouring columnar structures are performing the same neural task (e.g. top-down attention) with the identical layer-specific processing signature (albeit potentially different feature representations). In those cases, it can be beneficial to apply local smoothing within the layer direction and without signal blurring across layers (Blazejewska et al. 2019) to enhance the layer-specific processing signature. Alternatively, it can be beneficial to apply intracortical non-isotropic smoothing based on the directional functional activation (Lohmann et al. 2018) or based on the nonisotropic MRI signal intensity across the cortical depth. Thus, for layer-fMRI analyses, new software tools with a larger variety of anatomically informed spatial smoothing methods are needed.
Necessity to manually intervene: In layer-fMRI, the data acquisition procedure is usually pushed to its limits. This means that every acquisition protocol - and sometimes each participant-may suffer from individual image artifacts and other experimental short-comings. In comparison to standardized conventional fMRI that has gone through several decades of protocol optimizations, it is currently harder to establish stable and standardized analysis pipelines for layer-fMRI. In layer-fMRI, the researcher therefore needs to have the flexibility to specifically adjust the analysis pipeline for each individual data set. Thus, a flexible and modular analysis software can facilitate user-dependent and interactive intervention access-points along the analysis stream on a step-by-step and participant-by-participant basis. This flexible layer-fMRI analysis paradigm is in direct opposition to the demands of large scale population studies of conventional fMRI (UKBiobank, HCP, etc.). In those large scale studies, the analysis pipelines need to be executable with minimal user interventions; and in those population studies, analysis robustness can outrank small accuracy tradeoffs.
Restricted coverage: Layer-fMRI acquisition protocols are usually pushed to the limits of what the scanner can achieve. Thus, high spatial resolutions are often achieved by significant tradeoffs in coverage and even single-slice protocols are accepted as a compromise for resolution (Cheng et al. 2001; Guo et al. 2020; Kashyap et al. 2018b; Yacoub and Harel 2008). Furthermore, layer-fMRI data are often acquired with small coil arrays that do not facilitate straightforward whole-slice analyses. While it is without question that small fMRI coverage can be troublesome for many analyses, small coverage data play a crucial part in this rapidly developing field. However, many conventional fMRI analysis pipelines are not designed for (or are incompatible with) small coverage data. Therefore, new layer-fMRI analysis tools that are more accommodating to small coverage data are needed.
No topology requirements: Almost all current layer-fMRI studies use reduced field of views (Schluppeck et al. 2018) and do not exceed a coverage volume beyond a thin slab. However, many of the current topography-related analysis packages have been designed for whole brain analyses that need to fulfill a number of topological requirements. Namely, fMRI data are used in brain models of closed, continuous GM sheets, without holes or crossing surfaces. However, even though the biological structure of the cerebral cortex fulfils this requirement, common layer-fMRI EPI slab-data do not fulfill this requirement. It is not uncommon for some parts of the functional data to suffer from holes in the cortical sheet and not fulfill the original topology requirements. There are discontinuities, resolution constraints, as well as constraints of brain coverage (commonly 0.5-2.5 cm slabs) that violate the topology constraints in virtually all layer-fMRI data. Therefore, there is a need for analysis software that allows topographical analysis of layers and columns with fewer topological requirements (Kemper et al. 2018).
Necessity to work in voxel space: There are various philosophical approaches to layer-fMRI analyses. Many brain researchers prefer to analyse, depict and interpret their data in a data format that best resembles the object of interest. Since the brain consists of a folded sheet of stacked layers, one could analyze and depict brain data in surface space (using mesh vertices). Alternatively, many MRI and reconstruction methodologists prefer to keep their data as raw (and original) as possible and thus prefer to analyse, depict and interpret their data in the format they are acquired (in voxel space) and without additional necessary data conversions. Since layer-fMRI is still largely limited by the data acquisition strategies, it might be appropriate to favour data processing tools that operate in voxel space to avoid additional confounds that come from transitioning to surface space. Thus, in layer-fMRI, there is a need for purely voxel-based analysis software in addition to already existing surface-based analyses.
If researchers had access to layering analyses in voxel space, the data acquisition and analysis could be brought closer together. This would allow researchers to optimize acquisition and analysis concurrently and would enable a new form of fMRI studies that were still unthinkable until today. For example, with layer estimates directly accessible in the raw scanner voxel space, online analysis at the scanner console are doable and layer-dependent neural-feedback studies can become possible (van Hoof et al. 2020).
Accuracy and precision trumps streamlining: While some conventional fMRI analysis tools aim for stable and robust streamlined analysis that can process thousands of participants without necessary userinterventions, this is neither possible, nor currently demanded for layer-fMRI analyses. While minimal manual tuning of conventional analysis pipelines provides more than sufficient quality for conventional fMRI resolutions, it is not uncommon in layer-fMRI applications to invest 8-12 work hours per dataset for manual high-quality corrections of the segmented borders. Furthermore, it is not uncommon that the experimenter needs to spend more than an entire work week per participant to complete an analysis pipeline. This is due to the layer-fMRI specific requirement to have exceptional accuracy of the analysis and high precision of gray matter (GM) borders. Thus, a timely layer-fMRI analysis toolbox does not need to be optimized to provide moderate results for an extremely wide range of input data. Instead, a timely layer-fMRI analysis tool-box should rather be optimized to allow straightforward user-based manipulations of a wide range of algorithm parameters. This would aid the user to iteratively tweak the parameters for every dataset to end up with fine-tuned pipelines that provide the required quality. Such an approach is necessary to optimize layer-fMRI analysis strategies globally in the long term until the data quality will allow streamlined analyses.
No anatomical reference requirements: Since layer-fMRI data are limited by a high noise level, a successful study often depends on extensive averaging of countless task trials. In light of limited research funding for expensive scan time and ethically appropriate finite scan durations, it is often challenging for the experimenter to acquire additional non-fMRI auxiliary data that might aid the analysis. As such, it can be challenging to obtain high-quality high-resolution whole brain anatomical reference data, B0 and B1 maps, as well as reliable distortion inverted EPI reference data. It is also not uncommon that a researcher is confronted with the decision: either a) to obtain many auxiliary analysis-facilitating reference data without remaining scan time for sufficient functional averages, or b) to obtain sufficient functional averages for decent functional interpretability but without additional reference data. Furthermore, in cases when these auxiliary data are available, their utilization at submillimeter accuracy level is rarely perfect.
While the lack of reference data is not ideal, there is a need for software analyses that can still extract useful information from layer-fMRI without reference data. Thus, there is a need for a layer-fMRI analysis software that is able to perform layer-specific analyses directly in the distorted native EPI space without the requirement of additional non-fMRI data.
Non-BOLD fMRI contrasts: At high spatial resolutions, conventional GE-BOLD fMRI sequences are limited by spatially unspecific draining veins that oscure the underlying layer-specific neural activation. Thus, it is getting popular to use alternative fMRI contrasts that do not suffer this shortcoming (Chai et al. 2019; Huber et al. 2019b). One example is the blood volume sensitive VASO (vascular-space-occupancy) contrast that is used in approximately 30% of current layer-fMRI studies (Huber et al. 2020a). The VASO sequence, however, does not directly provide a single contrast time course like conventional fMRI GE-BOLD data do. Instead, raw VASO time series data consist of multiple interleaved contrasts with variable repetition times (TR) and require additional preprocessing steps to extract pure BOLD and pure blood-volume weighted time courses, respectively. Thus, there is a need for an analysis software that performs respective VASO processing analyses including temporal image resorting, nifti header manipulations and dynamic contrast divisions.
Draining vein problem: In cases where layer-fMRI data have already been acquired with GE-BOLD, the unwanted venous signal can no longer be accounted for with advanced acquisition methods. Instead, one could use knowledge of the directional blood flow in the cortical vasculature to estimate the venous signal contamination (Markuerkiaga et al. 2016; Uludag and Blinder 2018) and remove it (Markuerkiaga et al. 2016; Marquardt et al. 2018). Thus, a timely layer-fMRI analysis software should contain corresponding tools for model-based venous signal removal.
In short, layer-fMRI data often suffer from multiple short-comings that hinder a straightforward analysis of layers and columns. While the acquisition methodology needs to be further advanced to remove those shortcomings, there is a current need for a layer-analysis software that works despite each and all of the current shortcomings (Fig. 1).
Here, we present an fMRI analysis software suite LAYNII that is specifically designed for layer-fMRI data and that addresses all of the above listed challenges. LAYNII is designed to perform layer analyses entirely in voxel space and consists of many modular programs that perform layer-fMRI specific tasks:
Cortical depth and thickness measurements with corresponding assignments of layer tags to each GM voxel (a.k.a. layerification) in any segmented volume data set,
Estimation of columnar structures across voxels in any volume data set,
Performing various ways of layer-specific smoothing,
Providing a set of appropriate QA metrics for thermal noise-limited layer-fMRI data,
Pre-processing blood-volume based VASO fMRI contrasts that are optimized for the layer-specific microvascular responses,
Applying model-based de-veining algorithms of layer-fMRI GE-BOLD data.
2. LAYNII algorithms
2.1. Package structure
The LAYNII software suite is available as stand-alone C++ source code without external dependencies or needing libraries. It is distributed as pre-compiled (binary) installation packages for all major operating systems (Linux, Windows, macOS). LAYNII can read and write nifti files (Neuroimaging Informatics Technology; https://nifti.nimh.nih.gov/) in uncompressed NII and compressed NII.GZ formats.
The name LAYNII is derived from the two words “LAYER-fMRI” and “NIFTI”.1 The prefix LAY stresses that this suite is particularly built for layer-fMRI (which includes sub-millimeter fMRI and columnar fMRI). The suffix NII emphasizes that this software suite operates in the voxel space of nifti data. The pronunciation of LAYNII is ‘leIni’ (IPA) or “lei nee”, which is intended to sound similar to AFNI.
The structure of LAYNII is largely inspired by the philosophy of alternative software packages and is aimed to be as modular as possible. It is designed to consist of multiple individual lightweight programs that are executable from the command line and can be combined in pipeline scripts that may or may not include additional elements of alternative software suites like, AFNI, fslmaths, ANTs, etc. LAYNII’s modularity without external dependencies will also help to straightforwardly include LAYNII’s programs into already established software suites in the future. We follow the AFNI principle of providing mechanisms, not policies. We aim to give the user the power to assemble computing pieces in different ways to make customized analysis, which in turn means that it is the users responsibility to know what the individual programs do. Currently, the aim of the LAYNII package is not to provide a one-shot analysis solution for entire pipelines, as this is already well-covered by other available packages.
Some of the most popular LAYNII programs are discussed below. An exhaustive list of additional programs and tutorials of all (>30) programs is available on https://github.com/layerfMRI/LAYNII. Each individual program has a -help option that describes the main functionality and how to use it.
2.2. Layering: algorithm description and examples
Layer-fMRI necessitates determining the cortical depth of each gray matter voxel. This information can be used to pool together every voxel within a certain cortical depth range to generate “layers”. Since the cortex varies in thickness across regions, absolute (as opposed to relative) cortical depth measurements are often not very useful to consistently determine layers. To account for this variation across regions, local cortical thickness measurements are used to normalize the cortical depths. We refer to the resulting normalized cortical depth measurement as “equi-distant metric”. The equi-distant metric yields equi-distant layers, when quantized.
In addition to cortical thickness, the location and size of the cortical neurobiological layers also vary with regards to the cortical curvature. The effect of cortical curvature on layering was originally demonstrated by Bok in 1929, where he subdivided the cortex into columns to show that deeper layers get thicker and superficial layers get thinner around gyri. Meanwhile, deeper layers get thinner and superficial layers get thicker around sulci. This observation is known as the equi-volume principle (Waehnert et al. 2014).
In LAYNII, we provide both equi-distant and equi-volume layering options to the user. While solutions already exist (Bazin et al. 2007; Fischl 2012; Goebel 2012; Huntenburg et al. 2018; Saad and Reynolds 2012; van Mourik et al. 2019; Wagstyl et al. 2018), our implementation differs in a unique way. It is computed completely on the discrete lattice (as opposed to by means of surface approximations) (Glen et al. 2018; Huber et al. 2015). To give a description of our layering algorithm, first we define the terms that will be referred to later (also see Figure 2):
Layer(s): In neuroscience, the term “cortical layers” often refers to neurobiological layers. Here we are not using layers to exclusively mean neurobiological layers, but instead to mean “a thickness of some voxels laid within cortical gray matter” which may or may not correspond to neurobiological layers.
Inner gray matter surface: Portion of gray matter that mostly faces white matter.
Outer gray matter surface: Portion of gray matter that mostly faces cerebrospinal fluid.
Cortical thickness: Shortest streamline distance between outer and inner gray matter borders.
Cortical depth: Distance from inner or outer gray matter surface, a portion of cortical thickness. Slightly different from layer because this term indicates a quantitative measure which can be used to define the neurobiological layers.
Streamline: A line that connects inner and outer gray matter surfaces based on some principle (not necessarily the shortest Euclidean distance).
Column: A group of voxels that are successively penetrated by one or multiple streamlines. Not to be confused with neurobiological cortical columns which indicates a group of neurons, not voxels.
Unit column: Smallest unit of column that can be defined in a discrete lattice (ordered set of voxels) given the image resolution and topology of the cortex.
Curvature: A measure of ‘how much a shape bends’. More specifically, here we are defining it as a measure of ‘how much a unit column bends’. E.g. bananashaped or pyramidal-shaped.
Rim: A volume of cortical gray matter. Here, we specifically use this term to indicate our input image, which consists of four integer values (0=irrelevant voxels, 1=inner gray matter surface voxels, 2=outer gray matter surface voxels, 3=pure gray matter voxels; see panels of Fig. 2).
In what follows, we detail the implementation steps of layerification in LAYNII.
The layerification algorithm in LAYNII starts from a segmented rim image (see Fig2. Panel C).
For each voxel, we measure two cortical depths. One relative to the inner gray matter surface voxel and another relative to the outer gray matter surface voxels. We compute these cortical depths by using an iterative growing algorithm.
By adding relative distances to inner and outer gray matter surfaces, we compute the cortical thickness per voxel.
Cortical depth relative to inner gray matter surface voxels divided by thickness provides an equi-distant metric (ranges between 0 to 1).
One streamline per gray matter voxel (green) is defined by the closest outer (red) and the inner (blue) gray matter surface voxels. We use the streamlines to describe the curvature type of each unit column (as either gyrus, sulcus or straight wall). This is done by means of counting the unique inner and outer gray matter surface voxels each streamline of a unit column connects to. Note that this method avoids traditional curvature computations while still yielding the useful curvature type information.
Then we define our unit columns. A unit column has to touch at least one outer gray matter voxel and at least one inner gray matter voxel. A unit column might correspond exactly to one streamline where the cortex curvature is mostly straight (and thin). However, unit columns will often correspond to multiple streamlines when the cortex is curved (and thick). Such unit columns exhaustively cover all gray matter voxels (see illustrative examples in Fig. 2E).
By exploiting the equi-distant metric, we count the voxels that fall close to the superficial side versus the deeper side of the middle gray matter surface.
In order to ultimately estimate equi-volume layers, we solve a mass-balance problem to compute how much and to which direction the middle gray matter should be pushed to, in order to balance the amount of voxels on each side. We call the resulting numbers equivolume factors.
Then we exploit the equi-distant metric as a constrained vector space (adding up to always one when the normalized cortical depth relative to inner and outer gray matter surfaces are added together). This constrained vector space can be recognized as a simplex space of two dimensions. The n-dimensional simplex space was first described by August Ferdinand Möbius in 1827 under the name “barycentric coordinates” and brought back to attention in the modern era by John Aitchison in 1986 (Aitchison 1986) under the name compositional data. We perform a mathematical translation operation that is defined as a linear operator within the simplex space (called perturbation in Pawlowsky-Glahn et al. (2015)) by using the equivolume factors. This translation balances the metric space in a way to yield the equi-volume metric. Note that this operation is done on a per unit-column basis.
Since the unit-columns have sharp transitions in between, it can be advantageous to smooth these transitions to have a more biologically plausible equivolume metric distribution over gray matter voxels. We use iterative smoothing with a small kernel to prevent leakage around kissing gyri and tight sulci.
As the final step, we quantize the equi-distant and equi-volume metrics to provide the desired number of layers to the user. However, note that we are also providing the equi-distant and equi-volume metrics as default outputs. This is advantageous to allow the users to choose their own quantization methods.
Layering in LAYNII works directly on 2D and 3D images. In addition, it works equally well for partial coverage and whole brain images. As an example, see top row of Fig. 3 for layering applied on a 2D image; middle row for a 3D partial coverage image (cut from respective whole brain data) and bottom row for a whole brain image.
Since the LAYNII algorithms are operating directly in voxel space, the layerification can be significantly faster than conventional approaches. For instance, the duration for whole-brain 0.5 mm iso. data processing on a single CPU takes approximately 8 sec for equi-distancing and 48 sec for equivoluming. The corresponding computation times for 0.2 mm whole brain data (BigBrain) takes 2 and 12 min respectively. For more information on the computation times, see: https://thingsonthings.org/ln2_layers/.
For a practical (video-) tutorial of performing layerification directly on layer-fMRI EPI data see here: https://layerfmri.com/analysispipeline/ and here: https://layerfmri.com/quick-layering/. For an in-depth discussion and comparison of equi-distance layering, equivolume layering and additional layering algorithms that are implemented in LAYNII see: https://layerfmri.com/equivol/. For more detailed explanations of the algorithm implementations see: https://thingsonthings.org/ln2_layers/.
2.3. Estimation of columnar distances
While voxels with the same relative distance to the GM surfaces are collected into bins of layers, it can also be possible to group voxels into bins of the same columnar distances, in the orthogonal direction to layers, where the distances are measured from specified landmarks. Such estimates of columnar structures that span across all layers of the cortical depth are also often needed for many steps of layer-fMRI analysis. That is, in studies where layer-specific activity cannot be assumed to be identical across large patches of GM, it becomes necessary to perform simultaneous laminar and columnar analyses (Hollander et al. 2020; Huber et al. 2020b; Schneider et al. 2019). As such, estimates of cortical columns are vital for research questions addressing the topographical distributions of layer-dependent brain activation. Past examples are a) the primary motor cortex with tapping induces activation patches that do not extend across a cortical patch of few millimeters (Huber et al. 2020b), b) somatotopically aligned body-part representations in the primary sensory cortex (Yu et al. 2019), c) layer-dependent signal distribution across visual eccentricity (Huber et al. 2019a)(p 25), d) for columnar-specific functional hierarchy mapping (Huber et al. 2020a), e) or for cortical unfolding (Persichetti et al. 2020). In LAYNII, columnar distances are calculated in a six-step algorithm that is schematically illustrated in Fig. 4A:
In contrast to layer estimates, there is usually no clear physiologically defined coordinate system origin. While layer distances are inherently normalized to a coordinate system between WM and CSF borders, the origin of columnar estimates is highly dependent on the specific study and research question. Thus in LAYNII, columnar estimates are generated based on a manually set landmark (Fig. 4A). This is the starting point of the algorithm (white arrow).
This landmark is used as the origin of a subsequence growing algorithm. In order to account for the fact that the GM of a neighboring sulcus can be closer than the distance of a column within a sulcus of kissing gyri, the distance is estimated here with a local grow-algorithm that extends the local patch of columnar distances iteratively voxel-by-voxel (step-size=1 voxel).
Since the growing algorithm works in voxel space, it can only estimate distances in units of integer multiples of voxel distances. This means that a diagonal voxel neighbour is estimated as being two steps away (one step in each orthogonal direction), whereas the Euclidean distance is actually smaller (square root of two). The corresponding Pythagorean errors can be accounted for with a local smoothing step along the layer direction only. I
n the next step, the columnar distances are extrapolated across layers. The columnar distance value of every voxel is simply inherited from the next closest voxel that has a determined distance estimate already. This is done within the GM ribbon only (to avoid leakage from neighboring sulci).
Again, this step comes along with Pythagorean errors (mismatch of growing iteration steps and Euclidean distance) that can be accounted for with within-layer smoothing.
Finally, the user can choose the desired column thickness. This is done with the optional -Ncolumns flag of the LAYNII program. When this parameter is not specified by the user, the maximum number of columns is used and the resulting columnar estimates are one voxel thick. For smaller values of -Ncolumns, the columns become thicker.
A more detailed explanation of the columnarization in the LAYNII program LN_ 3DCOLUMNS, and the unfolding program LN_ IMAGIRO is given here: https://layerfmri.com/columns/.
2.4. Layer-specific smoothing
Due to the low tSNR in layer-fMRI, it can become advantageous to apply spatial smoothing. In order not to compromise the locally specific layer-fMRI signal of interest, the spatial smoothing kernel needs to be exclusively applied in anatomically informed directions only. Spatial smoothing in specific layer directions has been originally proposed for vertex-based analyses in (Polimeni et al. 2015), re-implemented for voxel-based layer smoothing in (Huber et al. 2017; 2018), and it has been ultimately described in full depth later (Blazejewska et al. 2019). This form of layer-specific smoothing is commonly applied locally in a way that the signal leakage drops off based on a Gaussian kernel of a given full-width-half-maximum (FWHM), analogous to conventional isotropic smoothing. In contrast to conventional isotropic smoothing (Stelzer et al. 2014), however, the layer-specific smoothing has an additional signal leakage drop off penalty perpendicularly to the layer-direction. Thus, for layer-specific smoothing, the signal leakage is restricted across voxels in different layers, despite the case that they might be very close to each other in Euclidean space. In the LAYNII program, LN_ LAYER_ SMOOTH this is implemented as volume smoothing in voxel space by restricting the smoothing kernel across voxels whose centroids are located in the same cortical depth. The smoothing is thus applied within masks of previously defined layers only. When the smoothing kernel sizes are particularly large and approach the spatial scale of the distance between touching gyri, it becomes necessary for the algorithm to consider signal leakage across sulci in very close proximity (Fig. 5A). While the problem of signal leakage across neighbouring gyri is inherently avoided in surface-based smoothing approaches (Jo et al. 2007; Kiebel et al. 2000), it needs to be explicitly taken care of in layer-specific volume smoothing programs of LAYNII. In the LAYNII implementation of layer-specific smoothing, a specific -NoKissing flag ensures that smoothing does not occur blindly across all voxels in close proximity, but only in those voxels that are connected to the same GM area.
While this form of intracortical smoothing requires accurate knowledge of the local layer geometry within the cortex, there are alternative approaches to apply layer-specific smoothing in preferred layer-directions without the need to have pre-defined layer labels available. For example, it has been suggested to apply intracortical non-isotropic smoothing based on the local functional activation (Lohmann et al. 2018; Smith and Brady 1997) or based on the non-isotropic MRI signal intensity across the cortical depth. In LAYNII, this form of smoothing is implemented in the program LN_ GRADSMOOTH by taking advantage of the fact that highresolution EPI intensities contain informative anatomical information too. This form of smoothing estimates the signal leakage kernel with two penalty functions; a) Gaussian weighted Euclidean distance of seed and target voxel, and b) local entropy weighted signal difference of the seed and target voxel. Just like for isotropic and layer-smoothing, the size of the Gaussian kernel can be adjusted by means of a user-defined -FWHM parameter. The entropy weighted signal difference can be adjusted by the user by means of a -selectivity parameter. E.g., for a common -selectivity parameter of 0.08, the signal leakage is restricted to the local voxels that have a similar signal intensity, which differ from the central voxel by less than 8% of the local signal variance. For a more conservative -selectivity parameter of 0.04, the signal leakage is restricted to the local voxels that have a similar signal intensity, which differ from the central voxel by less than 4% of the local signal variance (see examples in Fig. 5B). Since the smoothing kernel is determined in a data-driven way, its application is significantly more convenient for the researcher to use. Labor intensive segmentation is not necessary to be able to perform this way of smoothing.
This algorithm of intensity-based smoothing is very similar to a large number of previously described edge-preserving smoothing methods (Ding et al. 2005; Gerig et al. 1992; Lohmann et al. 2018; Moraschi et al. 2010; Smith and Brady 1997; Weickert and Scharr 2002), which are implemented in AFNI and FSL as 3danisosmooth, 3dBlurInMask, or SUSAN, and are also referred to as diffusion filter. The LAYNII implementation LN_ GRADSMOOTH differs from those algorithms in the sense that it is optimized for applications in layer-fMRI. Since layer-fMRI data are usually very noisy, the smoothing kernel should not be generated on the actual time series data or the statistical activation data themselves. Instead, the LAYNII implementation estimates the smoothing kernel on an independent optimized input file, e.g., an isotropically smoothed EPI with anatomical contrast. This is readily doable in layer-fMRI data because of the exquisite structural details visible in sub-millimeter EPI. Furthermore, the LAYNII implementation can avoid signal leakage of unconnected islands of similar signals intensities across kissing gyri (Fig. 5A).
These forms of anatomically informed gradient smoothing and layer smoothing are particularly beneficial in layer-fMRI studies where it can be assumed that neighboring columns perform the same neural task with the identical layer-dependent activation signature ((Beckett et al. 2020; Finn et al. 2019)).
Fig. 5C-G shows representative example results of anatomically informed smoothing applications. It can be seen that the characteristic double peak in the primary motor cortex is preserved across a wide range of algorithm parameters. Furthermore, it can be seen that for larger smoothing kernels, it becomes important to prevent signal leakage across kissing gyri.
Additional descriptions of the smoothing algorithms and their respective application in LAYNII is given here: https://layerfmri.com/anatomically-informed-spatial-smoothing/.
2.5. Time series quality measures
Rigorous quality assessment of fMRI time series has become a fundamental pillar of any good code of conduct in fMRI research. In conventional fMRI, a consensus about good practices has been found and these practices are implemented in the major standardized analysis streams (Esteban et al. 2019). In layer-fMRI, however, conventional QA metrics are not
sufficient or can even be completely inapplicable. Examples of metrics insufficient for layer-fMRI QA include a.) tSNR, b.) motion displacement, or c.) variance explained of neural ICA components.
tSNR: Since tSNR is calculated by means and the temporal standard deviation (STDEV), it cannot easily capture multiple sources of variance that are adding non-linearly (sum of squares). Since layer-fMRI is usually dominated by thermal noise, layer-fMRI specific artifacts are not well captured in tSNR maps. They are rather hidden in the thermal noise (for more discussion and examples see https://layerfmri.com/qa/).
Motion displacement: While it is critically important in layer-fMRI to manually check displacement estimates like in conventional fMRI, it is not sufficient. In layer-fMRI motion usually comes along with higher-order EPI-Phase inconsistencies too. Namely, even when the rigid head motion can be corrected for, motion-related distortion changes and motion related B0-changes cause intermittent artifacts. For example illustrations see https://layerfmri.com/qa/.
Variance explained in neural ICA components: While the relative variance explained by neural ICA (independent component analysis) components is a useful measure for conventional fMRI, it is limited in layer-fMRI applications. ICA works best, if Gaussian and non-Gaussian fluctuation sources can be separated from each other. Unfortunately however, in layer-fMRI, the neurally-driven temporal fMRI signal fluctuations are deeply hidden in the dominating Gaussian thermal noise and it is not uncommon that there isn’t a single neural ICA component selectable in layer-fMRI analyses. For example illustrations see https://layerfmri.com/qa/.
Due to the limits discussed above, conventional QA metrics in layer-fMRI data, additional and adapted metrics are needed. Since most layer-fMRI data are acquired in the thermal noise dominated regime, the noise can often be considered to be Gaussian. This means that non-thermal noise (e.g. artifact-induced signal clutter) can be identified by its non-Gaussian characteristics. Two useful measures to quantify how non-Gaussian a noise distribution is, are the measures of kurtosis and skewness (Berman et al. 2019). Fig. 6E,H depict a layer-fMRI example, where skew and kurtosis maps can depict artifact affected areas that are not clearly detectable in conventional tSNR maps.
While thermal noise is not coupled across space and time, some forms of layer-fMRI artifacts result in strong noise coupling. This noise coupling can be used to identify artifacts and depict them despite the presence of dominating Gaussian noise. Informative measures that can be estimated on a voxel-wise level are: a) auto-correlation and b) the correlation with the global signal. Fig. 6F,G depicts layer-fMRI examples where these measures can isolate and depict phase inconsistencies that arise from pushing the imaging gradients to their limits.
While the above QA metrics are very useful to characterize the time course quality of individual voxels, they cannot easily capture spatio-temporal interactions. E.g. if neigh-boring voxels share the same sources of noise (e.g. due to spatial signal leakage), the above mentioned QA metrics are ignorant to this. This is particularly problematic because the EPI readout for layer-fMR is usually very long and layer fMRI data are, thus, expected to suffer from unwanted related temporal noise coupling between neighboring voxels.
To characterize the strengths and the pattern of the temporal correlation of neighboring voxels, a so-called noise kernel calculation is implemented in LAYNII as described in Fig. 7A. The LAYNII program estimates the average temporal correlation of neighboring voxels. In contrast to functional smoothness estimations in alternative software suites, the LAYNII implementation of the noise kernel estimation does not simplify the noise coupling with individual Gaussian FWHM values and/or exponential decay terms. Instead, LAYNII also writes out the 3-dimensional noise kernel as a volume nii file. This can be advantageous because a full noise kernel can capture negative side lobes, anti-correlations, as well as common saw-tooth patterns between odd and even lines. Furthermore, it also provides estimates along the diagonal directions, which can be helpful for 3D acquisition sequences (3D-EPI or 3D-GRASE). This form of three dimensional noise-correlation kernel can be used for data-driven deconvolution-based image sharpening filters. Furthermore, such analyses could be applied across layers and columns to estimate the topographical features of functional connectivity within the cortex (see Fig. S8 in (Huber et al. 2020b)).
Additional descriptions of the QA algorithms, the limits of their interpretability and their respective application in LAYNII is given here: https://layerfmri.com/qa/.
2.6. VASO specific programs
High-resolution GE-BOLD fMRI suffers from unwanted signals of large draining veins. Due to this limitation, the use of alternative functional contrasts has become popular (Chai et al. 2019; Huber et al. 2019b). The fastest growing layer-fMRI sequence in recent years is the SS-SI -VASO approach (Huber et al. 2020a). The VASO (Vascular space occupancy) contrast is based on the difference between longitudinal relaxation times (T1) of tissue and blood water (Lu et al. 2003). It is generated by applying an inversion pulse before signal acquisition, so as to effectively null the contribution of blood water magnetization at the time of signal excitation, while keeping substantial tissue signal for detection. The VASO signal is thus believed to be inversely proportional to CBV changes and can non-invasively capture micro-vascular layer-specific signal responses through selective detection of signal changes in the extravascular compartment concurrent with changes in the nulled blood compartment. The specific UHF-optimized Slab-selective slice inversion (SS-SI)-VASO approach acquires blood-nulled images and GE-BOLD images concomitantly (Huber et al. 2014b). To directly provide a CBV and BOLD contrast time course comparable to conventional fMRI signal contrast analyses, the raw VASO time series need to be temporally resorted and orthogonalized into clean -dependent and T1-dependent functional contrasts. The corresponding preprocessing steps are illustrated in Fig. 8A. To remove unwanted -related signal in CBV-time series, LAYNII assumes a simple magnetization model that obeys the Bloch equations (Fig. 8C). According to the Bloch equations, T1 and decays behave like two independent relaxation effects that can be described in a multiplicative fashion. This means that unwanted contrast in the CBV-weighted signal can be canceled out by means of dynamic division of MR images with and without preceding T1-weighting (Fig. 8C).
Fig. 8D-E depicts a representative example of VASO and BOLD data as they are generated from LAYNII. Note that the VASO output is inversely correlated with dynamic CBV changes.
For a hands-on example of how the application of LAYNII works for layer-fMRI VASO applications see here: https://layerfmri.com/analysispipeline/.
2.7. Model based deveining
Even though high-resolution GE-BOLD is known to suffer from unwanted locally-nonspecific signals of large draining veins, due to its exceptionally high sensitivity it is the most popular acquisition method for layer-fMRI data. Due to the directional blood drainage towards the cortical surface, the unwanted GE-BOLD signal of large veins is known to increase towards the cortical surface. Based on this knowledge of the angioarchitecture, it has been proposed that the unwanted layer-specific venous signal bias in GE-BOLD can be accounted for in retrospective model-based analysis steps. There are multiple possible signal models becoming popular in the field of layer-fMRI (Fig. 9A):
The linear-offset model is based on the assumption that the layer-specific microvascular signal is added on top of a task-independent macrovascular signal. Thus, it is assumed that a simple task-contrast subtraction or a simple linear-trend-removal would get rid of the unwanted macrovascular component of the BOLD signal. The linear offset model has been explicitly discussed in the context of linear correlation analyses (Fracasso et al. 2018) and in the context of layer-dependent shape parameters (Gau et al. 2020). This linear model is furthermore implicitly used for in countless task contrast subtraction analyses of previous layer-fMRI studies.
The scaling model is based on the assumption that the layer-specific bias in GE-BOLD is driven by layerdependent variations of vein density. As such, it is assumed that the superficial signal is larger than the signal in deeper layers, simply because the amount of venous blood volume is higher in superficial layers compared to deeper layers. Or in other words, the macrovasculature acts like a layer-specific signal amplification (gain). Thus, it is assumed that a simple multiplicative (or divisory) normalization can correct for the macrovascular signal bias. This layer-dependent signal normalization has been proposed as part of several layer-fMRI analysis strategies, including:
scaling the layer-dependent signal with estimates of layer-dependent venous CBV (Guidi et al. 2020),
normalizing the signal difference between different task responses by the mean signal response of all involved task responses (Kashyap et al. 2018a),
refraining to infer neuroscience conclusions solely based on task response differences in favour of focusing on task response ratios that are normalized by the presumably vascularly driven signal fluctuations (Lawrence et al. 2019).
The leakage model is based on the assumption that the BOLD signal in each layer constitutes a signal mixture of neural activity from multiple layers. Namely, it is assumed that a voxel in a given layer contains some neural signal from the layer of interest plus an unwanted integrated activity signal of all the layers beneath. E.g. it is assumed that the BOLD signal in a voxel of a superficial layer contains both the desired superficial signal plus unwanted signal from the deeper layers. The BOLD signal model in each layer is then usually parameterized as a weighted sum of the layer itself and the signal from deeper layers. To ultimately use this model to correct for unwanted leaked signals, a spatial signal deconvolution approach is applied. (However, note that some implementations of such deconvolution models refrain from the term “deconvolution” in favor of the terms ‘matrix inversion” or “consecutive signal subtraction”). Very often, the leakage model is combined with the scaling model. Layer-fMRI focused implementations of BOLD signal models that are assuming spatial signal leakage across layers have been described by a large number of research labs, including models from Heinzle et al. 2016, Markuerkiaga et al. 2016, Merola et al. 2018, Puckett et al. 2016, Lacy et al. 2020 Corbitt et al. 2018, and Havlicek et al 2019. All of these signal leakage models estimate the signal in superficial layers as a sum of the microvascular response within the given layer plus a weighted sum of the signal from all other layers below. The main difference between the various leakage models comes from the procedure of how the respective summation weights are estimated. The model described in (Lacy et al. 2020; Puckett et al. 2016) try to describe the venous signal draining by means of travelling wave equations. The models described in (Corbitt et al. 2018; Markuerkiaga et al. 2016) are aiming to perform forward simulations without the explicit aim to invert the model for venous signal removal. The models described in (Havlicek and Uludag 2019; Heinzle et al. 2016), proposes such a model inversion for the removal of unwanted venous signal in layer-fMRI signal processing. The newer model in (Havlicek and Uludag 2019) entails more physiologically-informed constraints than the initial model in (Heinzle et al. 2016).
In most of those models, the summation weights of layer-dependent signal leakage are derived based on more-or-less appropriate assumptions of the layer-dependent blood vessel architecture and/or experimental data. The weights are usually dependent on resting CBVv and CBF assumptions across cortical depth.
In current layer-dependent applications that use such model-based vein removals, these models are applied on an area-wide scale (e.g. (Marquardt et al. 2018)). I.e. usually, fMRI signals are pooled from the layers of large cortical patches and their effect is solely investigated in the form of one-dimensional layer profiles. In LAYNII, however, the various de-veining algorithms are implemented to work on a voxel-by-voxel level. This allows the researcher to appreciate the signal distribution along the topographical space across layers and columns, simultaneously. Furthermore, the resulting signal maps provide an intuitive understanding of the noise amplification that comes along with the various de-veining algorithms of the respective models (See Fig. 9B for examples).
Additional descriptions of the deveining algorithms and their respective application in LAYNII is given here: https://layerfmri.com/devein/
3. Discussion
Here, we present an fMRI analysis toolbox that is specifically developed for layer-fMRI applications. It has minimal requirements on the input data and works in the native data format of voxels as they come off the scanner. Its application ranges from layer/column assignment, over anatomically informed smoothing and QA, up to vein removal and VASO analyses.
3.1. What LAYNII does not contain
LAYNII is not designed to duplicate analysis features that have already been implemented in alternative fMRI software packages with the same capabilities. Even though there are specific layer-fMRI demands for partial coverage image alignment, LAYNII does not perform it itself. Since LAYNII also works in the native EPI-space, image alignment is not absolutely necessary to begin with. If a layer-fMRI user is interested in alignment constraints that are specific to layer-fMRI data, we refer to the instructions of how to perform image alignment of layer-fMRI data with ITK-snap (Yushkevich et al. 2006) and ANTs (https://layerfmri.com/high-quality-registration/), or with AFNI (https://blog.cogneurostats.com/aligning-partial-volume-fmri-in-afni/). Furthermore, even though tissue type segmentation is particularly important in layer-fMRI analyses, LAYNII does not contain its own segmentation tools. In layer-fMRI, GM borders commonly need to be manually adjusted anyway, thus in layer-fMRI, it is often most efficient to fully manually segment the areas of interest within the limited EPI coverage without the necessity of automated segmentation tools. For a rough first estimate of GM borders as an input to LAYNII, alternative software packages can be used. E.g. the interested reader is referred to an instruction of how to use FreeSurfer, nighres and SUMA to generate an input rim file for LAYNII here: (https://layerfmri.com/getting-layers-in-epi-space/), this segmentation can be further corrected with the semi-manual segmentation tool Segmentator (Gulban et al. 2018) (https://github.com/ofgulban/segmentator). A collection of non-LAYNII scripts and programs that are designed to work in tandem with LAYNII available to download here: https://github.com/ofgulban/LAYNII_extras.
3.2. Potential application of LAYNII outside of layer-fMRI
Here, ‘layer-fMRI’ is used as an umbrella term for depth-dependent fMRI, intra-cortical fMRI, and sub-millimeter fMRI in general (footnote: https://layerfmri.com/terminology/). This means that LAYNII is also explicitly intended for activation analysis for constant signal across cortical depth (Fig. 5) a.k.a. columnar fMRI. LAYNII is originally intended -but not limited to-functional MRI. In fact, layer-fMRI is applicable and has been applied to high-resolution structural MRI, as well as histology data with and without restricted field of views (E.g. Fig. 3 and (Huber et al. 2017)). We believe that LAYNII might also be specifically suited for in-vivo sub-millimeter diffusion-weighted data. While LAYNII is time-efficiently applicable to conventional high-resolution whole brain anatomical data, it is not specifically advertised for this purpose. Alternatively, analysis software packages are more extensively tested, documented and supported with exhaustive educational tutorials for this purpose.
While LAYNII is specifically designed for high-resolution applications, individual programs can also be applied as lower spatial resolution fMRI data too. Namely, the VASO-specific analyses can -and have been-applied to lower-resolution 3 mm data too (Huber et al. 2014b). And similarly, the quality assessment metrics can also be beneficial at lower resolutions (Kurban et al. 2020).
Since LAYNII works directly in voxel space without imposing topological constraints, it can straightforwardly generate layers and column estimates in 2D data. This allows applications in common single slice data of preclinical MRI in rodents, cats and monkeys, and it allows layer profile extraction of figures from any electronic publication including the seminal microscopy images of an entire century of cyto-architecture (Brodmann 1909), myelo-architecture (Vogt and Vogt 1919) and angioarchitecture (Pfeifer 1940) research. Note, however, that in 2D, the equi-volume layering approach converges with an equi-area approach. For more information on how to generate layer-profiles of literature figures see: https://layerfmri.com/how-to-convert-any-paper-figure-into-a-layer-profile/.
3.3. Usage in the field
The LAYNII software suite has been used in multiple high-resolution fMRI studies across the world. It’s Github site welcomes >1400 unique visitors per year and its code is being cloned >100 times per month. It found particular application for layer-fMRI studies in the motor cortex (Huber et al. 2017), in the sensory cortex (Yu et al. 2019), in DLPFC (Finn et al. 2019), for columnar imaging in the motor cortex (Huber et al. 2020b), in layer-specific functional connectivity mapping (Huber et al. 2020a), for mental imaginary layer-fMRI (Persichetti et al. 2020), for methods development of new sequence concepts (Beckett et al. 2020; Chai et al. 2019; Guidi et al. 2020), for visual layer-fMRI (Zamboni et al. 2020), and for methods debugging of human 9.4T layer-fMRI (Huber et al. 2018).
3.4. How LAYNII’s evolved from other packages
All of the discussed LAYNII programs (BOLD correction, equi-distance and equi-volume layering, etc.) have been initially implemented in the ODIN (Object-oriented Development Interface for NMR) environment (Jochimsen and Von Mengershausen 2004). This LAYNII predecessor software suite was originally used in many initial layer-fMRI studies (Guidi et al. 2017; 2020; Huber et al. 2014a; 2017; 2016a;b). However, since this software package had more than 30 dependencies, and required files to be located in certain root-locations, it was not straightforwardly usable across various operating platforms, nor was it installable on servers with conservative user access. Thus, with guidance from the NIH data science and sharing team (https://cmn.nimh.nih.gov/) and the AFNI team (https://afni.nimh.nih.gov/), the layer-fMRI algorithms were reimplemented outside of ODIN with a data I/O that is inherited from the original NIFTI release (https://nifti.nimh.nih.gov/). Thus, LAYNII does not have any residual external dependencies of third-party software, nor does it rely on internal or external libraries.
Conclusion
We developed a user-friendly and well-documented software package that makes cutting-edge layer-fMRI image processing tools available to the research community. The toolbox is easy to install via source code or pre-compiled binaries for Linux, Windows and macOS and provides a comprehensive set of advanced techniques for layer-fMRI analyses. While the current functionality largely focuses on applications where the challenges of layer-fMRI data do not allow the application of standard analysis pipelines of the major software packages, we hope that the flexible and modular framework encourages contribution of new tools, stimulates collaboration, and accelerates progress in the promising field of layer-fMRI neuroimaging.
Funding
Parts of this research was supported by the NIMH Intramural Research Program (ZIA-MH002783). Laurentius Huber was funded form the NWO VENI project 016.Veni.198.032 for part of the study. Benedikt Poser is partially funded by the NWO VIDI grant 16.Vidi.178.052 and by the National Institute for Health grant (R01MH/111444) (PI David Feinberg). Portions of this study used the high-performance computational capabilities of the Biowulf Linux cluster at the National Institutes of Health, Bethesda, MD (biowulf.nih.gov). Rainer Goebel is partly funded by the European Research Council Grant ERC-2010-AdG 269853 and Human Brain Project Grant FP7-ICT-2013-FET-F/604102. Nils Nothnagel and Jozien Goense are funded by the Medical Research Council (MR/R005745/1). Andrew Tyler Morgan is funded by the Medical Research Council (MR/N008537/1) and the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 785907 and 945539 (Human Brain Project SGA2 and SGA3)
Discussions of code
We thank Sriranga Kashyap for many informative questions of previous versions of LAYNII. We thank Kamil Uludag for helpful discussions and contributions on model-based-vein removal (Fig. 9). We thank Elisha Merriam for discussions about the least noise amplifications in LN_ BOCO with spline surround-division. We thank the many users of LAYNII that submitted bug reports and feature requests to our repository.
Acquisition of example data
We thank Kenny Chung and Joe Stolinski for radiographic assistance with experiments conducted at NIH (Figs. 4C, 5E, 6, 9B). We thank Sean Marrett for co-acquiring data used in Fig. 6, and 9B. We thank FMRIF (especially Andy Derbyshire), NMRF (especially Joelle Sarlls and Lalith Talagala), and Scannexus (especially Chris Wiggins), where the example data were acquired. We thank Ruediger Stirnberg and Tony Stoeker for their segmented IR-3D-EPI sequence that was used to obtain data in Fig. 8.
Financial interest
Author OFG and RG work for Brain Innovation and have financial interest tied to the company.
Betha users
We thank the many LAYNII users who sent feedback via Github issues. We also thank Dimo Ivanov, Sri Kashyap and Deni Kurban for testing the binaries.
Data and Software availability
Example data, source code, binary executables, installation instructions, installer packages can be found here: https://doi.org/10.5281/zenodo.3514298 via a BSD-3 license. Also see LAYNII repository: https://github.com/layerfMRI/LAYNII. And common analysis pipelines in which LAYNII is used here: https://github.com/ofgulban/LAYNII_extras.
Acknowledgements
We thank Pilou Bazin for contributing comments, discussions and ideas regarding the algorithms and implementation of the equi-volume layerification and layer-specific smoothing programs of LAYNII. We thank Kamil Uludag and Martin Havlicek for comments on the manuscript regarding the model-based vein removal.
Footnotes
1 The name has nothing to do with the author’s wife’s pet name: Leni, nor does it relate to the kissable laynii: https://www.urbandictionary.com/laynii.