aces / brainbrowser

Web-based visualization tools for neurological data.
https://brainbrowser.cbrain.mcgill.ca/
GNU Affero General Public License v3.0
351 stars 122 forks source link

Support for for GifTI #321

Closed chrisgorgo closed 7 years ago

chrisgorgo commented 7 years ago

Currently BrainBrowser Surface viewer support binary and asc (text) file formats used internally by FreeSurfer. GifTI is a more standardized way of storing surface information (both in terms of surface shape as well as values on vertices). It would be a great addition if BrainBrowser supported GifTI surfaces, scalars and label maps. Both freesurfer (freeview and tkviewer) as well as the connectome workbench both support GIfTI. More about the format: https://www.nitrc.org/projects/gifti/

rdvincent commented 7 years ago

@chrisfilo Thanks for the suggestion. I'm not aware of any pure-Javascript implementations of GIfTI, are you?

chrisgorgo commented 7 years ago

There is this: https://github.com/rii-mango/GIFTI-Reader-JS

chrisgorgo commented 7 years ago

I see you started working on it. That's fantastic. Would it help if I tried to test it?

rdvincent commented 7 years ago

Sure. Just check out the rdv-gifti branch on:

https://github.com/rdvincent/brainbrowser

It seems to work ok for the GIFTI surfaces I have; it is also possible to read vertex data. My biggest problem is a low diversity of GIFTI sample images.

chrisgorgo commented 7 years ago

Attached some examples I have been working with. I'm interested in plotting lh.sig.shape.gii on top of lh.pial.surf.gii.

fsaverage_examples_small.zip

rdvincent commented 7 years ago

Those images seem to work fine as single pairs. I'm not happy with how the two shape files interact when both are loaded, but I suspect a generic brainbrowser issue.

FYI mni-display can now visualize GIFTI surfaces and I have recently added shape and label data.

chrisgorgo commented 7 years ago

I experience similar problems before gifti support when loading left and right inflated surfaces at the same time (the shape origin was not offset and the two shapes overlapped). It wasn't present when I loaded pial or white surfaces. It would be nice to get that sorted out. I'll try to provide some screenshots.

Thanks for the heads up about mni-display. I'm working on support for surface data in neurovault.org and this reassures me that going with GifTI downloads maximizes compatibility with existing software.

rdvincent commented 7 years ago

My experience with GIFTI so far is that the coordinate system is inconsistently defined from file to file - that's the biggest weakness of the surface format that I've encountered. For example, the two surface files you just uploaded do not contain coordinate transforms.

chrisgorgo commented 7 years ago

I can confirm the gifti support is working correctly. Thanks!