<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">&lt;<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You&#39;re missing the setting up of ScalarOpacityFunction. I&#39;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 &lt;<a href="mailto:demonmerlin@gmail.com">demonmerlin@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I want to set the representation to &#39;Volume&#39; instead of &#39;Surface&#39;. But the<br>
&gt; result shows the representation is still the &#39;Surface&#39; after I modified my<br>
&gt; code as shown below. Thanks ahead for any help!<br>
&gt;<br>
&gt; Best wishes,<br>
&gt; Junyi Han<br>
&gt;<br>
&gt;<br>
&gt; CODE:<br>
&gt;<br>
&gt;     reader = OpenDataFile(VTKFile)<br>
&gt;     reader.PointData<br>
&gt;     view = GetRenderView()<br>
&gt;<br>
&gt;     dp = GetDisplayProperties()<br>
&gt;     dp.Representation = &#39;Volume&#39;<br>
&gt;     lut = CreateLookupTable()<br>
&gt;     lut.RGBPoints  = [0.0, 0.0, 0.0, 1.0,<br>
&gt;                         3.3, 1.0, 1.0, 1.0,<br>
&gt;                       6.674, 1.0, 0.0, 0.0]<br>
&gt;<br>
&gt;     readerRep = GetRepresentation()<br>
&gt;     readerRep.ColorArrayName = &#39;scaler_name&#39;<br>
&gt;     readerRep.LookupTable = lut<br>
&gt;<br>
&gt;     Show(reader)<br>
&gt;     Render()<br>
&gt;<br>
&gt; # Get a nice view angle<br>
&gt;     if count == 0:<br>
&gt;         cam = GetActiveCamera()<br>
&gt;         cam.Elevation(30)<br>
&gt;         cam.Azimuth(30)<br>
&gt;         Render()<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
</blockquote></div><br></div>