<div dir="ltr">Thanks! It helps a lot!</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/25 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You're missing the setting up of ScalarOpacityFunction. I'd suggest<br>
using the Tools | Start Trace/Stop Trace to generate a trace for what<br>
happens when one sets up a volume rendering and then use the generate<br>
code as a guide.<br>
<br>
Utkarsh<br>
<div><div class="h5"><br>
On Mon, Nov 25, 2013 at 3:09 PM, Junyi Han <<a href="mailto:demonmerlin@gmail.com">demonmerlin@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I want to set the representation to 'Volume' instead of 'Surface'. But the<br>
> result shows the representation is still the 'Surface' after I modified my<br>
> code as shown below. Thanks ahead for any help!<br>
><br>
> Best wishes,<br>
> Junyi Han<br>
><br>
><br>
> CODE:<br>
><br>
> reader = OpenDataFile(VTKFile)<br>
> reader.PointData<br>
> view = GetRenderView()<br>
><br>
> dp = GetDisplayProperties()<br>
> dp.Representation = 'Volume'<br>
> lut = CreateLookupTable()<br>
> lut.RGBPoints = [0.0, 0.0, 0.0, 1.0,<br>
> 3.3, 1.0, 1.0, 1.0,<br>
> 6.674, 1.0, 0.0, 0.0]<br>
><br>
> readerRep = GetRepresentation()<br>
> readerRep.ColorArrayName = 'scaler_name'<br>
> readerRep.LookupTable = lut<br>
><br>
> Show(reader)<br>
> Render()<br>
><br>
> # Get a nice view angle<br>
> if count == 0:<br>
> cam = GetActiveCamera()<br>
> cam.Elevation(30)<br>
> cam.Azimuth(30)<br>
> Render()<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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 ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br></div>