In this Blog post, I seek to describe a quick example of how to analyze high-resolution data across layers and columns with LAYNII.
This post is motivated by Shinho Cho. I want to thank Shinho for providing the example data used here.
There are 5 steps involved to unfold the cortex.
1.) Obtain boder lines of GM/WM and CSF.
This can be done with automatic segmentation algorithms or manually in FSLeyes.
2.) Calculating layers with LN_GROW_LAYERS
With this rim.nii file, LAYNII can generate the layers with the command:
LN_GROW_LAYERS -rim rim.nii -vinc 100
The result is a layer file layers.nii looking like this
Note on single slice data (e.g. for Shinho Cho ): when the “-threeD” flag is not set, the program LN_GROW_LAYERS estimates the layers on a slice-by-slice basis. This is done assuming that the slice direction is the third dimension in the nii header according to the default of x-y-z,as phase-read-slice. If your data are not stored like this, consider using the “-threeD” option in LN_GROW_LAYERS. Alternatively, the dimentsion can be exchanged with fslswapdim input x z y output.
3.) Setting landmarks
For the columnar distance calculation, you can choose a landmark manually anywhere in the layer.nii. E.g generate a new file that is everywhere zero except for one column, where the signal is 1.
4.) Calculating columnar distances
The columnar distances are calculated in the LAYNII program LN_COLUMNAR_DIST
LN_COLUMNAR_DIST -layer_file layers.nii -landmarks landmarks.nii -vinc 400
The layers and distances provide a orthogonal coordinate system that can be used to regrid the data into a 2-dim layer-column matrix.
The output of IMAGIRO is the file “unfoleded*.nii”.