lower level of detail (LOD) polygonal rendering for Volume representation does not use correct color map, also decimation
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When rendering a volume representation that takes 0.5 or more seconds to render, the polygonal lower level of detail representation for interaction is highly necessary.
The color map used when rendering the LOD polygonal representation does not match the color map being used to render the volume (or the color map used to render the polygonal surface when the representation is selected to be surface). It uses some default color map which is not changeable and usually wrong.
You can see the effect if you load the can.ex (ex2?) dataset, view it as a volume (with some parameter selected for color), and interact with it. It's not so glaring here as it can be due to the data values, but you can see the problem. In a dataset I am working with, I have the volume rendering on a blue to black to red color map, and when I interact and see the LOD rendering, I get crazy green and yellow colors.
As far as I can tell, what's going on is that in vtkPVLODVolume the color map which is set as the default is forever used for rendering the polygonal LOD surface, with the look up table never changing even when the user changes it for the volume rendering.
In vtkPVLODVolume::UpdateLODProperty I found a comment to the effect that the LODMapper's LUT had been initialized correctly with a commented-out call to set the lookup table to the volume's RGB transfer function. When I put this call back in, the color mapping was correct for LOD rendering. However, at that point it was also the case that I lost the decimation of the LOD polygonal surface, and the LOD polygonal surface was only rendered at high detail (and not decimated during interaction as it is while doing surface representation). I added a decimator, copying from the treatment of the polygonal surfaces, to alleviate that problem.
The fix needed (not necessarily my code changes here) is to make sure the polygonal LOD representation for volume uses the correct color map and also does decimation.
It might also make sense just to use the surface representation (the LOD one) for the volume LOD interaction representation.