GithubHelp home page GithubHelp logo

smazurchuk / gifti Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gllmflndn/gifti

0.0 1.0 0.0 1010 KB

MATLAB/Octave GIfTI Library

Home Page: https://www.artefact.tk/software/matlab/gifti/

License: GNU General Public License v2.0

MATLAB 21.94% Makefile 0.13% C 77.93%

gifti's Introduction

GIfTI library for MATLAB/Octave

This GIfTI library allows to handle the GIfTI Geometry file format from the Neuroimaging Informatics Technology Initiative (NIfTI) using a MATLAB/Octave class:

It relies on external libraries:

Note that these tools are already included in the GIfTI library provided here, so you don't need to install them separately.

There are import facilities from FreeSurfer, VTK, Wavefront OBJ, Stanford PLY, STL and MZ3 file formats.

There are export facilities to VTK, Collada, IDTF, Wavefront OBJ and JS/JSON (for Plotly) file formats.

This library is also part of SPM.

INSTALLATION

MATLAB R2007a or above is required to use most of the features of this toolbox. GNU Octave is also supported.

All the code is embedded in a @gifti class. To install it, all you need is to make sure that the directory containing @gifti is in MATLAB path:

addpath /home/login/Documents/MATLAB/gifti

The library relies on a number of C-MEX files (zstream, base64, xml_parser). Compiled versions for 64 bit MATLAB on Windows, Linux and Mac are provided but they can easily be compiled by yourself otherwise, see @gifti/private/Makefile.

TUTORIAL

In the following, we use the files contained in BV_GIFTI.tar.gz (BrainVISA examples), available from the NITRC website:

% Read the GIfTI surface file
g = gifti('sujet01_Lwhite.surf.gii')

% Read the GIfTI shape file
c = gifti('sujet01_Lwhite.shape.gii')

% Display mesh
figure; plot(g);
% Display mesh with curvature
figure; plot(g,c);

In a similar way, a gifti object can be created from scratch and saved to a file:

load mri
D = squeeze(D);
Ds = smooth3(D);
g = gifti(isosurface(Ds,5))

h = plot(g);
daspect([1,1,.4]); view(45,30); axis tight
lightangle(45,30);
set(h,'SpecularColorReflectance',0,'SpecularExponent',50)

save(g,'mri.surf.gii','Base64Binary');

See also: export to Plotly.

gifti's People

Contributors

gllmflndn avatar dimitripapadopoulos avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.