[vtkusers] Fixed: problem with vtkRenderLargeImage and vtkVolumeRaycastMapper

Simon Drouin drouin.simon at gmail.com
Wed Jun 10 10:07:25 EDT 2009


Hi All,

I believe I have found a fix to the problem that caused volumes rendered
with vtkVolumeRayCastMapper to show lines of background pixels where the
patches rendered by vtkRenderLargeImage meet. This bug has been reported
previously on this list. I include in this message a diff between my version
of vtkVolumeRaycastMapper.cxx and the one in the CVS. Can someone review my
change and apply the patch?

In short, the problem was that the width and height of the images rendered
by the mappers where computed with floating point numbers and then cast to
int. It caused those dimensions to be short by 1 pixel in most cases. It
usually has no noticeable effect. But in the case where the mapper is used
with vtkRenderLargeImage, each of the patches rendered by
vtkRenderLargeImage is short by 1 pixel and so there is a gap between them.

I believe the same problem is present in other software volume mappers such
as vtkFixedPointVolumeRaycastMapper.

s.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090610/3f81002d/attachment.htm>
-------------- next part --------------
1372,1373c1372,1373
<   this->ImageInUseSize[0] = static_cast<int>(maxX) - static_cast<int>(minX) + 1 ;
<   this->ImageInUseSize[1] = static_cast<int>(maxY) - static_cast<int>(minY) + 1 ;
---
>   this->ImageInUseSize[0] = static_cast<int>(maxX - minX + 1.0);
>   this->ImageInUseSize[1] = static_cast<int>(maxY - minY + 1.0);


More information about the vtkusers mailing list