[vtkusers] 2 Questions: volume rendering / z-buffer data

Eik Deistung vtk at deistung.de
Wed Feb 18 14:37:11 EST 2004


Hi
I have two Questions:

1. Z Buffer
How do I get  the Z-Buffer data?

Ok I use

  vtkRendererSource *ren1Image = vtkRendererSource::New();
  ren1Image->SetInput(ren1);
  ren1Image->DepthValuesOn();
  ren1Image->RenderFlagOn();

to read the data from the render.
My problem is I need the Z-Buffer data.

 vtkImageExtractComponents * com = vtkImageExtractComponents::New();
  com->SetInput(ren1Image->GetOutput());
  com->SetComponents(3);

with this construction I get only the RGB-Componets

how do I get  the Z-Buffer data To show them or to filter them?

At the Moment I use this construction ...

 vtkDataSetMapper* mapperBMP = vtkDataSetMapper::New();
  mapperBMP->SetInput( (vtkDataSet *) com->GetOutput());

 vtkImageExtractComponents * com = vtkImageExtractComponents::New();
  com->SetInput(sobel->GetOutput());



2. Volumerendering
The vtkVolumeRayCastMapper can not use float data. But my volume data is
float. How can I use then with  vtkVolumeRayCastMapper. Can I transform they
to unsigned char?


thx for help

eik deistung




More information about the vtkusers mailing list