I'm trying to create a volume rendering. The output seems to be ok, but is very pixelated. It seems like the sampling resolution is too low. I tried adjusting the imageSampleDistance and autoAdjustSampleDistances, but the result was the same. My basic code looks like this:<br>
<br><br><div><span style="white-space:pre-wrap"></span>volumeMapper = vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();</div><div><span style="white-space:pre-wrap"></span>volumeMapper->SetInputConnection(reader[1]->GetOutputPort());</div>
<div><br></div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer<vtkVolumeProperty> volumeProperty = vtkSmartPointer<vtkVolumeProperty>::New();</div>
<div><br></div><div><span style="white-space:pre-wrap"></span>vtkSmartPointer<vtkPiecewiseFunction> compositeOpacity = vtkSmartPointer<vtkPiecewiseFunction>::New();</div><div>compositeOpacity->AddPoint(0.0,0.0);</div>
<div>compositeOpacity->AddPoint(40.0,1.0);</div><div>volumeProperty->SetScalarOpacity(compositeOpacity);</div><div><br></div><div><span style="white-space:pre-wrap"></span>vtkSmartPointer<vtkColorTransferFunction> color = vtkSmartPointer<vtkColorTransferFunction>::New();</div>
<div>color->AddRGBPoint(0.0 , 0.23,0.30,0.75);</div><div>color->AddRGBPoint(40.0, 0.8 ,0.05 ,0.4);</div><div><span style="white-space:pre-wrap">c</span>olor->SetColorSpaceToDiverging();</div>
<div>volumeProperty->SetColor(color);</div><div><br></div><div><span style="white-space:pre-wrap">v</span>tkSmartPointer<vtkVolume> volume = vtkSmartPointer<vtkVolume>::New();</div><div>
<span style="white-space:pre-wrap"></span>volume->SetMapper(volumeMapper);</div><div><span style="white-space:pre-wrap"></span>volume->SetProperty(volumeProperty);<br><br>The volume is the added to a renderer (I have multiple vtkRenderers but only 1 vtkRenderWindow). I'm also using QT (qvtk widget).<br>
</div>And since a picture says more than a 1000 words, an example of what is looks like: <a href="http://dl.dropbox.com/u/27566470/pixels.png">http://dl.dropbox.com/u/27566470/pixels.png</a><br>This is a crop (without resize) of a screenshot from my running program. All other (non volume) elements look fine.<br>
<br>Does anyone have any idea how to solve this?<br><br><br>Cheers,<br>Tijmen<br>