[vtkusers] volume rendering fields

Julien Finet julien.finet at kitware.com
Wed Sep 14 10:27:28 EDT 2011


Hi Peter,

You can look at vtkUnstructuredGridVolumeRayCastMapper::Render():
For some reason, the following line fails to return a non-empty array for
you.

  this->Scalars = this->GetScalars(this->GetInput(), this->ScalarMode,
                                   this->ArrayAccessMode,
                                   this->ArrayId, this->ArrayName,
                                   this->CellScalars);

You might want to play with vtkAbstractVolumeMapper::SelectScalarArray() to
give the field array you want to render.

Hth,
Julien.

On Wed, Sep 14, 2011 at 8:49 AM, peterm <madapeti at gmail.com> wrote:

> Dear all,
>
> I have a vtkUnstructuredGrid with 2 fields in it. I would like to run a
> vtkUnstructuredGridVolumeRayCastMapper to create volume renderings however
> I
> get an error message "Can't use the ray cast mapper without scalars!" when
> calling the Render() function.
>
> My question is in what way I have to transform the vtkUnstructuredGrid so
> that the scalar fields are transformed to the appropriate format used by
> vtkUnstructuredGridVolumeRayCastMapper?
>
> Thanks,
> Peter
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/volume-rendering-fields-tp4802631p4802631.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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/20110914/6f94ee89/attachment.htm>


More information about the vtkusers mailing list