Skip to content

neurolabusc/surfice_atlas

Repository files navigation

Introduction

This is a Matlab script for converting voxelwise Atlases saved in NIfTI format to meshes saved in MZ3 format used by Surfice. Also included is a script to create nodes.

Requirements

To run this script you will need:

  • Matlab
  • SPM
  • spmScripts
  • The scripts included in this repository
  • A NIfTI format atlas to convert

Converting an Atlas from a voxelwise image to a mesh.

The command nii_nii2atlas will convert a NIfTI volume into a mesh. This repository includes a sample atlas, which you can convert with the command nii_nii2atlas('HarvardOxford-cort-maxprob-thr0-1mm.nii.gz'). This command assumes that there is a reasonably small number of discrete regions in your atlas. In other words, you will not get sensible results if you provide a NIfTI image of a T1 anatomical scan where intensity is continuous. This script will create a MZ3 file. If you open this with Surfice, it will either appear shiny or matte. If it appears matte, it suggests that the front and back faces are reversed. Use the Advanced/ReverseFaces and Advanced/SaveMesh menu items to save a mesh where the front and back faces are specified correctly.

Optionally, you can provide a Color Lookup Table to map a specific region to a specific color. The Matlab script writeLut demonstrates how to create a custom color table. You can also use these color tables with ImageJ and MRIcron. A graphical LUT makers is available. You can use existing LUTs that are included with ImageJ or use those included with MRIcron (stored in its lut folder).

Converting an Atlas from a voxelwise image to a node map.

Node maps are useful for showing connectomes. The script nii_nii2nodz will open an atlas in NIfTI format and generate a sphere at the center of each region. This repository includes a sample atlas, which you can convert with the command nii_nii2nodz('HarvardOxford-cort-maxprob-thr0-1mm.nii.gz').

Surfice Atlas

About

Convert NIfTI-format atlases to Surface MZ3 meshes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages