Equi-voluming: The Anakin Skywalker of layering algorithms

Authors: Renzo Huber and Faruk Gulban

When you want to analyze functional magnetic resonance imaging (fMRI) signals across cortical depths, you need to know which voxel overlaps with which cortical depth. The relative cortical depth of each voxel is calculated based on the geometry of the proximal cortical gray matter boundaries. One of these boundaries is the inner gray matter boundary which often faces the white matter and the other boundary is the outer gray matter boundary which often faces the cerebrospinal fluid. Once the cortical depth of each voxel is calculated based on the cortical gray matter geometry, corresponding layers can be assigned to cortical depths based on several principles.

One of the fundamental principles used for “assigning layers to cortical depths” (aka layering, layerification) is the equi-volume principle. This layering principle was proposed by Bok in 1929, where he tries to subdivide the cortex across little layer-chunks that have the same volume. I.e. gyri and sulci will exhibit any given layer at a different cortical depth, dependent on the cortical folding and volume sizes (see figure below).

With respect to applying equi-volume principle in layer-fMRI, the equi-volume layering has gone through quite a story. A plot with many parallels to Anakin Skywalker.

In this blog, the equi-volume layering approach is evaluated. Furthermore, it is demonstrated how to use it in LAYNII software.

Continue reading “Equi-voluming: The Anakin Skywalker of layering algorithms”

Referral to description of layerification algorithm in LN2_LAYERS

How can one assign layers to discrete voxels? Is it possible to perform topographical fMRI analyses across layers and columns directly in the original voxel space that raw data from the scanner come in? 

Continue reading “Referral to description of layerification algorithm in LN2_LAYERS”

MP2RAGE: challenges and artifacts of its use for layer-fMRI

The MP2RAGE sequence is very popular for 7T anatomical imaging and is very commonly used to acquire 0.7-1 mm resolution whole brain anatomical reference data. Aside of this common application, it can also be very helpful for layer-fMRI studies to obtain even higher resolution T1 maps in the range of 0.5mm iso. However, when optimizing MP2RAGE sequence parameters for layer-fMRI studies, there are a few things that might be helpful to keep in mind.

In this post, I would like to discuss the challenges of using the popular MP2RAGE sequence in layer-fMRI studies. Specifically I will discuss challenges/features regarding:

Continue reading “MP2RAGE: challenges and artifacts of its use for layer-fMRI”

Example analysis pipeline of layer-VASO

In this blog post I want to go through the analysis pipeline of layer-dependent VASO.

I will go through the all the analysis steps that need to be done to go from raw data from the scanner to final layer profiles. The entire thing will take about 30 min (10 min analysis and 20 min explaining and browsing through data).

During the entire analysis pipeline I am using the following software packages: SPM, AFNI, and LAYNII, and gnuplot (if you want fancier plotting tools)

Continue reading “Example analysis pipeline of layer-VASO”

How many layers should I extract?

In this blog post, I want to share my thoughts on the number of layers that should be extracted from any given dataset. I will try to give an overview of how many layers are usually extracted in the field, I’ll describe my personal choices of layer numbers, and I will try to discuss the challenges of layer signal extraction along the way.

Continue reading “How many layers should I extract?”

Registration of high-resolution data

In this blog post Sri Kashyap and I describe how to deal with the registration of high-resolution datasets across days, across different resolutions, and across different sequences.

I am particularly fond of the following two tools: Firstly, ITK-SNAP for visually-guided manual alignment and secondly, using ANTs programs: antsRegistration and antsApplyTransforms.

Continue reading “Registration of high-resolution data”

TR-FOCI pulse optimisations for SS-SI VASO

CBV-fMRI with VASO is highly dependent on a good inversion contrast. It gives it its CBV sensitivity and is also responsible for most of the VASO specific pitfalls (e.g. inflow, CSF etc. ). And thus, it should be optimized as much as possible.

In this blog post, I want to describe the most important features of a reliable inversion pulse for the application of VASO at 7T with a head transmit coil.

Continue reading “TR-FOCI pulse optimisations for SS-SI VASO”

Installing ISIS-conv on MAC

ISIS-conv is a very useful dicom to nii converter from Enrico Reimer. ISIS-conv gets along with a lot of challenging data sets that no other converter (that I know of) can handle so conveniently:

  • SMS-data, where individual slices have a non-constant inter-slice distances.
  • VASO data with non-constant TRs
  • Multi-echo, multi-coil, and Magnitude/Phase data.

There is a Mac-installation package of ISIS-conv. Unfortunately, however, with every IOS update, it has become more complicated to install it.

Since, I spend too much time figuring out how to install it after every update, I am collecting the necessary steps in this Blog post for future reference:

Continue reading “Installing ISIS-conv on MAC”

Anatomically informed spatial smoothing

In this blog post, I want to describe the application and working principle of a few spatial smoothing algorithms that are implemented in LAYNII.

  1. Confined smoothing along similar anatomical structures with LN_GRADSMOOTH
  2. Smoothing along the layers with LN_LAYERSMOOTH
  3. Smoothing within columns with LN_LAYERSMOOTH
  4. Smoothing across specific spatial dimensions only with LN_DIRECT_SMOOTH
  5. Smoothing long the time domain with LN_TEMPSMOOTH

Continue reading “Anatomically informed spatial smoothing”

3D-printing nii data

In this blog post, I want to write about pipelines on how to prepare Nifti-brain data and make them printable by a 3D-printer.

Two pipelines are shown. One pipeline describes the 3D-printing the cortical folding structure that is estimated with Freesurfer and subsequently corrected with Meshlab. And another pipeline describes how you can 3D-print any binary nii-volume by using the AFNI-program IsoSurface and correct the output with netfabb.  Continue reading “3D-printing nii data”

How to convert any paper figure into a layer-profile

Often we would like to normalize depth-dependent fMRI signals and assign it to specific cytoarchitectonially defined cortical layers. However, we often only have access to cytoarchitectonial histology data in the form to figures in papers. But since we only have the web-view or the PDF available, we cannot easily extract those data as a layer-profile. Since most layering tools are designed for nii data only, paper figures (e.g. jpg or GNP) are not straight-forwardly transformed to layer profiles.

In this blob post, I describe a set of steps on how to convert any paper figure into a nii-file that allows the extraction of layer profiles.

Continue reading “How to convert any paper figure into a layer-profile”

Unwanted spatial blurring during resampling

In layer-fMRI, we spend so much time and effort to achieve high spatial resolutions and small voxel sizes during the acquisition. However, during the evaluation pipeline much of this spatial resolution can be lost during multiple resampling steps.

In this post, I want to discuss sources of signal blurring during spatial resampling steps and potential strategies to account for them.

Continue reading “Unwanted spatial blurring during resampling”

Smoothing within layers

Smoothing within layers can be advantageous for multiple reasons:

  • Increasing the CNR without loosing spatial information across cortical depths.
  • Visualization of striping pattern across columnar structures.
  • Avoiding leakage of physiological noise from CSF space into GM tissue.

image88.gif Continue reading “Smoothing within layers”

Quick analysis pipeline of getting layer fMRI profiles without anatomical reference data

This is a step-by-step description on how to obtain layer profiles from any high-resolution fMRI dataset. It is based on manual delineated ROIs and does not require the tricky analysis steps including distortion correction, registration to whole brain “anatomical” datasets, or automatic tissue type segmentation. Hence this is a very quick way for a first glance of the freshly acquired data.

This post shows how you can get from activation maps to layer-profiles in 10 min. In a quick and dirty way.

The important steps are: 1.) Upscaling, 2.) Manual delineation of GM, 3.) Calculation of cortical depths in ROI, 4.) Extracting functional data based on calculated cortical depths.

Continue reading “Quick analysis pipeline of getting layer fMRI profiles without anatomical reference data”

Bias field correction

This post shows the overview of doing bias field correction in in SPM. Doing this helps me a lot to improve the accuracy of FreeSurfer with MP2RAGE data. The members of Polimeni’s group also use it as an additional per-processing step before giving the data to Freesurfer.

The SPM bis field correction is part of the segmentation pipeline in SPM. I use the following bash script and the following matlab stript:

Bias_field_script_job.m and  start_bias_field.sh.

Continue reading “Bias field correction”

Using a standalone Nifti I/O in C++

In this blog post, I describe how you can build your own standalone C++ program to analyze nii data without any dependencies beyond C++.  Hence, it will work without the  libraries from other fMRI software packages, e.g. odin, afni. The only tricky part is to use a stand alone nii I/O to write your own C++ evaluation programs. Here, I do it by incorporating the few files that i borrowed from the afni source code.

Continue reading “Using a standalone Nifti I/O in C++”