[vtkusers] 3D regular scalar field visualisation

Karthik Krishnan karthik.krishnan at kitware.com
Fri Apr 30 14:09:15 EDT 2010


You need to set a desirable transfer function. Fire up your data in VolView
(or in Paraview). Play around with the transfer function editor.

--
karthik

On Fri, Apr 30, 2010 at 1:02 PM, Artem Babayan <
artem.paraview at googlemail.com> wrote:

> Hello,
>
> I am trying to visualize 3D scalar field defined on regular grid (i.e.
> STRUCTURED_POINTS dataset). What I would like to get is a
> semitransparent colored cloud. So far I did the following: read the
> data -> pass them to vtkFixedPointVolumeRayCastMapper -> pass it to
> actor -> pass it to renderer -> pass it to windows:
>
>      //read the volume from file
>      vtkSmartPointer<vtkStructuredPointsReader> reader_conc=
>                      vtkSmartPointer<vtkStructuredPointsReader>::New();
>      reader_conc->SetFileName("conc_3d.vtk");
>
>      //Create a mapper
>      vtkSmartPointer<vtkFixedPointVolumeRayCastMapper> mapper_conc =
>                   vtkSmartPointer<vtkFixedPointVolumeRayCastMapper>::New();
>      mapper_conc->SetInput(reader_conc->GetOutput());
>
>      //Create an actor
>      vtkSmartPointer<vtkVolume> actor_conc =
>                              vtkSmartPointer<vtkVolume>::New();
>      actor_conc->SetMapper(mapper_conc);
>
>      // Create a rendered
>      vtkSmartPointer<vtkRenderer> renderer =
>                              vtkSmartPointer<vtkRenderer>::New();
>      renderer->AddActor(actor_conc);
>
>     <Add renderer to the window etc.>
>
> But the results are not satisfactory -- all it shows is strange black
> and white image. I guess, it is necessary to set some parameters for
> the mapper? Which ones?
>
> Best wishes
> Artem
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100430/3e7e9c08/attachment.htm>


More information about the vtkusers mailing list