You need to set a desirable transfer function. Fire up your data in VolView (or in Paraview). Play around with the transfer function editor.<br><br>--<br>karthik<br><br><div class="gmail_quote">On Fri, Apr 30, 2010 at 1:02 PM, Artem Babayan <span dir="ltr"><<a href="mailto:artem.paraview@googlemail.com">artem.paraview@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
<br>
I am trying to visualize 3D scalar field defined on regular grid (i.e.<br>
STRUCTURED_POINTS dataset). What I would like to get is a<br>
semitransparent colored cloud. So far I did the following: read the<br>
data -> pass them to vtkFixedPointVolumeRayCastMapper -> pass it to<br>
actor -> pass it to renderer -> pass it to windows:<br>
<br>
//read the volume from file<br>
vtkSmartPointer<vtkStructuredPointsReader> reader_conc=<br>
vtkSmartPointer<vtkStructuredPointsReader>::New();<br>
reader_conc->SetFileName("conc_3d.vtk");<br>
<br>
//Create a mapper<br>
vtkSmartPointer<vtkFixedPointVolumeRayCastMapper> mapper_conc =<br>
vtkSmartPointer<vtkFixedPointVolumeRayCastMapper>::New();<br>
mapper_conc->SetInput(reader_conc->GetOutput());<br>
<br>
//Create an actor<br>
vtkSmartPointer<vtkVolume> actor_conc =<br>
vtkSmartPointer<vtkVolume>::New();<br>
actor_conc->SetMapper(mapper_conc);<br>
<br>
// Create a rendered<br>
vtkSmartPointer<vtkRenderer> renderer =<br>
vtkSmartPointer<vtkRenderer>::New();<br>
renderer->AddActor(actor_conc);<br>
<br>
<Add renderer to the window etc.><br>
<br>
But the results are not satisfactory -- all it shows is strange black<br>
and white image. I guess, it is necessary to set some parameters for<br>
the mapper? Which ones?<br>
<br>
Best wishes<br>
Artem<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>