Is there a way to merge several volume rendering objects ?

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Is there a way to merge several volume rendering objects ?

Post by Yann Cointepas »

I briefly tried to superimpose two volume rendering objects (one T1 MR with only the brain and one thresholded activation map) but I could only see one. Did I missed something in transparency configuration or is it impossible ? Ideally I'd like to be able to truly fusion the two volume rendering objects in a new one but it is probably difficult to implement.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Is there a way to merge several volume rendering objects ?

Post by riviere »

Hi Yann,

Volume rendering is using transparency, and transparency cannot be easily mixed in OpenGL, so you cannot see two volume renderings at the same location. You may have two clipped volume renderings with different clippings, with a few rendering problems also.

But you can fusion two (or more) volumes first, each with its own palette, then make a volume rendering object on the 2D fusion. It will make a RGB volume rendering, which needs more memory, and much slower to update when a palette changes, but which will do what you are asking for, I guess.
That's what anasimpleviewer does.

Denis
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: Is there a way to merge several volume rendering objects ?

Post by Yann Cointepas »

Cool. I tried volume rendering on a 2D fusion but the immediate result was strange (maybe bad transparency parameters or a 3D card problem) so I decided to ask this question before investigating further. In RGB mode, is there a way to play with transparency (I suppose that black is transparent).
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Is there a way to merge several volume rendering objects ?

Post by riviere »

Hi,
Yes, the opacity map is based on the RGB intensity. Typically, if the whole volume cube is opaque (or too opaque), you can either make the volumes from which you made the fusion darker, or use the volume rendering palette to increase the lower threshold. When using linear fusion, you may often get a grey background, not really black, and this may be the cause of te problem.
The other possibility is to use transparent colormaps on the volumes that you fusion, so as to have a RGBA 2D fusion (and not only RGB), in which case the volume rendering will follow the opacity of the RGBA fusion. It is useful if the intensity/opacity coupling of RGB is not what you want.

Denis
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: Is there a way to merge several volume rendering objects ?

Post by Yann Cointepas »

Cool !

That's very good to display activations in 3D with sulci when a mesh of the cortex cannot easily be obtained. You ony need an image of the brain and an activation map. But to make it user friendly, we should think of a new way to play with transparency. For instance, it is quite hard to set an appropriate transparency on gradient palette without seeing images histograms.

Playing with volume rendering has made me think about a feature request for Anatomist: add the possibility to freeze rendering in a window. Since volume rendrering can be quite slow. It would be very useful to stop volume rendering update while playing with palettes (in some windows we may want to see the palette update) and reactivate it later. One can do that by closing the window containing VR object but all the scene is lost (window size, objects in the window, point of view, clipping, etc.).

Yann
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Is there a way to merge several volume rendering objects ?

Post by riviere »

Hi,
Yes, changing colormaps which involve RGB volume renderings may be quite slow.
How would you think the user interface for such a "freeze" would be like ?
The best would probably be to update volume rendering objects in a separate thread with a possibility of interruption, so that the GUI is not frozen, and new changes in palettes would stop the unfinished update (and start a new update). It should also be possible to perform a "coarse-to-fine" update to display quickly an undersampled volume rendering. All this would maybe need a bit of infrastructure work, since the changed/update flags in objects are not designed to be asynchronous and I am not completely sure it would work well in the curent state, even it it would probably not require a lot of work.
Denis
Post Reply