rii-mango / Papaya

A pure JavaScript medical research image viewer.
Other
553 stars 205 forks source link

Q: how could we enable 3d view same on the Readme example image #61

Closed marlocorridor closed 8 years ago

marlocorridor commented 8 years ago

3d image

rii-mango commented 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

rii-mango commented 8 years ago

P.S. In the project, you can run tests/debug_server_surface.html to see the example in that screenshot.

marlocorridor commented 8 years ago

I get it now. Thanks.

By the way, these info are not in the wiki yet right? :)

rii-mango commented 8 years ago

There is some info here: https://github.com/rii-mango/Papaya/wiki/Configuration#surfaces

But as always, the documentation could be better...

cancan101 commented 7 years ago

Are you saying that volume files (e.g. nifti files) cannot be viewed with the 3D viewer unless they are converted to surface files?

martinezmj-ims commented 7 years ago

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.

niks2060 commented 5 years ago

Hello Martin, Any possibility of this feature to be introduced..? If it will then most of the issue is solved.

rjsgml5698 commented 5 years ago

How to add the colors?

martinezmj-ims commented 5 years ago

@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};

rjsgml5698 commented 5 years ago

I really appreciate it. I understood and it worked. Do you have any plans to make React.js?