Hi Peter,<div><br></div><div>You can look at vtkUnstructuredGridVolumeRayCastMapper::Render():</div><div>For some reason, the following line fails to return a non-empty array for you.</div><div><br></div><div> this->Scalars = this->GetScalars(this->GetInput(), this->ScalarMode,</div>
<div> this->ArrayAccessMode,</div><div> this->ArrayId, this->ArrayName,</div><div> this->CellScalars);</div>
<div><br></div><div>You might want to play with vtkAbstractVolumeMapper::SelectScalarArray() to give the field array you want to render.</div><div><br></div><div>Hth,</div><div>Julien.<br><br><div class="gmail_quote">On Wed, Sep 14, 2011 at 8:49 AM, peterm <span dir="ltr"><<a href="mailto:madapeti@gmail.com">madapeti@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear all,<br>
<br>
I have a vtkUnstructuredGrid with 2 fields in it. I would like to run a<br>
vtkUnstructuredGridVolumeRayCastMapper to create volume renderings however I<br>
get an error message "Can't use the ray cast mapper without scalars!" when<br>
calling the Render() function.<br>
<br>
My question is in what way I have to transform the vtkUnstructuredGrid so<br>
that the scalar fields are transformed to the appropriate format used by<br>
vtkUnstructuredGridVolumeRayCastMapper?<br>
<br>
Thanks,<br>
Peter<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/volume-rendering-fields-tp4802631p4802631.html" target="_blank">http://vtk.1045678.n5.nabble.com/volume-rendering-fields-tp4802631p4802631.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<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></div>