[vtk-developers] Multi-Volume RayCasting
Radi1982 at gmx.de
Mon Dec 19 11:27:01 EST 2011
I am trying to do multi-volume rendering in VTK. Specifically, I am trying to accomplish the following:
My application does volume rendering of multiple datasets (using vtkVolumeRayCastMapper). Now I want to add a view showing the overlay of these datasets. Simply adding all the actors to a new renderer doesn't work, because the dataset rendered last will always have priority over the others. As far as I can see, I need a new kind of volume raycaster and volume raycast function, one that casts rays through all datasets at once and composits samples from all volumes at each step of the ray. I didn't find such a raycaster in VTK, and asking the users list didn't help.
I am considering writing such a raycaster myself, but I am not sure how to do it. I want the separate datasets to appear exactly the same way as in their separate views, meaning they should have the same position and same transfer and opacity functions. If I move a single dataset in its view, I also want it to move in the overlay. This means that this new raycaster needs not only the datasets as input, but also needs access to the vtkVolumeProperty and vtkMatrix4x4 of the source dataset's actor.
I don't want to hack something that is difficult to maintain and might break with new VTK releases, so I am looking for advice on how to best accomplish this.
My first thought was creating a new actor, vtkMultiVolume, which can take multiple vtkVolumeProperties and multiple vtkMatrix4x4 for the positioning. These would be the ones that are also used in the separate views of the datasets. I'd then add the source datasets as input to my new RayCastMapper and would use the properties and matrices of vtkMultiVolume to raycast them.
I am also unsure whether to use inheritance or not. Most methods of vtkVolumeRayCastMapper and related classes are not virtual, making this difficult. On the other hand, some classes used in conjunction with raycasting specifically expect a vtkVolume (not a vtkMultiVolume), like the gradient estimators used for shading.
I would appreciate any advice anyone could give me on this.
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
More information about the vtk-developers