Closed marlocorridor closed 8 years ago
Papaya currently supports GIFTI (.surf.gii) and Mango (.surf) surface formats (links to more info about these formats here). Currently, you need to create the surface format file beforehand -- this is, Papaya does not generate the surface from the image file automatically.
To create a surface file, you can use Mango: http://rii.uthscsa.edu/mango/mango.html
Load your image in Mango, then go to Image > Build Surface. You can adjust build parameters, such as threshold. When the surface looks like what you want, in the surface viewer go to File > Save As.
More info about loading surfaces in Papaya: https://github.com/rii-mango/Papaya/wiki/Configuration#surfaces
P.S. In the project, you can run tests/debug_server_surface.html to see the example in that screenshot.
I get it now. Thanks.
By the way, these info are not in the wiki yet right? :)
There is some info here: https://github.com/rii-mango/Papaya/wiki/Configuration#surfaces
But as always, the documentation could be better...
Are you saying that volume files (e.g. nifti files) cannot be viewed with the 3D viewer unless they are converted to surface files?
Yes, the viewer does not automatically convert the volumetric data to surface data. You'll need the GIFTI equivalent of the NIFTI data. It would be nice to add this feature, but at least for now, you need the surface data ahead of time.
Hello Martin, Any possibility of this feature to be introduced..? If it will then most of the issue is solved.
How to add the colors?
@rjsgml5698 The surface data file itself may contain colors in the form of a RGB triplet per vertex. Both GIFTI and Mango surface formats support this. If all you need is to specify one solid color for the entire surface, you can do this:
params["mySurface.surf.gii"] = {color: [1, 0, 0], alpha: 0.5};
I really appreciate it. I understood and it worked. Do you have any plans to make React.js?