<div>
<div>Hi,</div><div><br></div><div>I tried to do DRR rendering using vtkFixedPointVolumeRayCastMapper additive blend mode. The documentation says "Additive blend mode adds scalars along the ray and multiply them by their opacity mapping value", which is DRR rendering.</div><div><br></div><div>However, the rendering I got still looks like composite mode. The pixels nearby block the pixels far way. </div><div><br></div><div>Can anyone let me know how to do DRR rendering with VTK? Thanks!</div><div><br></div><div>My code:</div><div><br></div><div>vtkVolume *volume = vtkVolume::New();</div><div>vtkFixedPointVolumeRayCastMapper *mapper = vtkFixedPointVolumeRayCastMapper::New();</div><div>mapper->SetInputConnection( reader->GetOutputPort() );</div><div><br></div><div>vtkColorTransferFunction *colorFun = vtkColorTransferFunction::New();</div><div>vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New();</div><div><br></div><div>vtkVolumeProperty *property = vtkVolumeProperty::New();</div><div>property->SetIndependentComponents(independentComponents);</div><div>property->SetColor( colorFun );</div><div>property->SetScalarOpacity( opacityFun );</div><div>property->SetInterpolationTypeToLinear();</div><div><br></div><div>volume->SetProperty( property );</div><div>volume->SetMapper( mapper );</div><div><br></div><div>colorFun->AddRGBSegment(opacityLevel - 0.5*opacityWindow, 0.0, 0.0, 0.0,</div><div> opacityLevel + 0.5*opacityWindow, 1.0, 1.0, 1.0 );</div><div>opacityFun->AddSegment( opacityLevel - 0.5*opacityWindow, 1.0,</div><div> opacityLevel + 0.5*opacityWindow, 1.0 );</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span> </div><div>mapper->SetBlendModeToAdditive();</div><div>property->ShadeOff();</div><div><br></div><div><br></div>
</div>
<div><div><br></div><div>-- </div><div>Shun Miao</div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>