help > RE: Error in viewing Surf Ice mesh by fsleyes
Oct 16, 2019  04:10 PM | Chris Rorden
RE: Error in viewing Surf Ice mesh by fsleyes
Yong,

1.) The menu item Scripting/Python/Help will print out all of the in-built Python functions and arguments for each. The function you are interested in is "meshcreate", where you supply an input voxelwise image, output mesh name, voxel intensity threshold, mesh reduction factor, minimum cluster size and smoothing style (0=none, 1=masked, 2=smoothed). So a minimal mesh creation would look like this: 

import gl
gl.meshcreate('/usr/local/fsl/data/standard/avg152T1_brain.nii.gz', '~/mymesh.gii', 5200, 0.2, 1, 1)

2.) I am not sure why FSLeyes can not read these GIfTI files. Perhaps it requires manifold volumes or has other expectations. You can view the GIfTI image with Surfice or with Matlab using this library
  https://www.artefact.tk/software/matlab/gifti/
I am happy to extend the file if I can add tags that help FSLeyes, but to my eyes it looks like a valid GIfTI image.

g = gifti('mymesh.gii')

>> g = gifti('mymesh.gii')
g =
struct with fields:
faces: [21973×3 int32]
mat: [4×4 double]
vertices: [10937×3 single]
>> figure; plot(g);

Threaded View

TitleAuthorDate
Yong Li Oct 16, 2019
Chris Rorden Oct 16, 2019
Yong Li Oct 17, 2019
RE: Error in viewing Surf Ice mesh by fsleyes
Chris Rorden Oct 16, 2019