Jona,<br><br>Ah, there was an issue running in client-server mode. I&#39;ve just committed a fix.<br><br>/cvsroot/ParaView3/ParaView3/Servers/ServerManager/vtkSMProxy.cxx,v  &lt;--  Servers/ServerManager/vtkSMProxy.cxx<br>
new revision: 1.114; previous revision: 1.113<br>/cvsroot/ParaView3/ParaView3/Servers/ServerManager/Resources/utilities.xml,v  &lt;--  Servers/ServerManager/Resources/utilities.xml<br>new revision: 1.174; previous revision: 1.173<br>
<br>Please update and try again.<br><br>Thanks<br>Utkarsh<br><br><br><div class="gmail_quote">On Wed, May 27, 2009 at 5:18 AM, BOUSSOIR Jonathan 167706 <span dir="ltr">&lt;<a href="mailto:Jonathan.BOUSSOIR@cea.fr">Jonathan.BOUSSOIR@cea.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Utkarsh,<br>
Thank you for your script but I have been a error when I excute this line : dp.ScalarOpacityFunction = opacity_func<br>
Thanks in advance for your kind help.<br>
Regards,<br>
Jona<br>
<br>
dp.ScalarOpacityFunction = opacity_func<br>
ERROR: In /home/myrrha/Desktop/paraview/paraview3.7/ParaView3/Servers/Common/vtkProcessModule.cxx, line 1045<br>
vtkProcessModule (0xef5150): Object type: vtkVolumeProperty, could not find requested method: &quot;SetScalarOpacity&quot;<br>
or the method was called with incorrect arguments.<br>
<br>
while processing<br>
Message 0 = Invoke<br>
  Argument 0 = id_value {78}<br>
  Argument 1 = string_value {SetScalarOpacity}<br>
  Argument 2 = id_value {662}<br>
<br>
<br>
ERROR: In /home/myrrha/Desktop/paraview/paraview3.6/ParaView3/Servers/Common/vtkProcessModule.cxx, line 1046<br>
vtkProcessModule (0xef5150): Aborting execution for debugging purposes.<br>
<br>
Abandon<br>
<br>
<br>
My script<br>
<br>
from paraview.simple import *<br>
Connect(&#39;localhost&#39;)<br>
<br>
reader = servermanager.sources.LegacyVTKReader(FileNames=&#39;wavelet.vtk&#39;)<br>
<br>
Show(reader)<br>
<br>
dp = GetDisplayProperties(reader)<br>
<br>
# Create LUT<br>
dp.LookupTable = MakeBlueToRedLT(37.35, 276)<br>
<br>
# Set array to color by<br>
dp.ColorAttributeType = &#39;POINT_DATA&#39;<br>
dp.ColorArrayName = &#39;RTData&#39;<br>
<br>
#dp.Representation = &#39;Volume&#39;<br>
#Render()<br>
<br>
# Register PiecewiseFunction if not already available.<br>
if not &quot;PiecewiseFunction&quot; in dir(servermanager.rendering):<br>
  servermanager.createModule(&quot;piecewise_functions&quot;, servermanager.rendering)<br>
<br>
# Setup opacity function<br>
opacity_func = servermanager.rendering.PiecewiseFunction()<br>
opacity_func.Points = [37.35, 0, 276.82, 0.5]<br>
dp.ScalarOpacityFunction = opacity_func<br>
<br>
dp.Representation = &#39;Volume&#39;<br>
Render()<br>
<br>
<br>
<br>
<br>
<br>
<br>
-------- Message d&#39;origine--------<br>
De: Utkarsh Ayachit [mailto:<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>]<br>
Date: lun. 25/05/2009 16:09<br>
À: BOUSSOIR Jonathan 167706<br>
Cc: <a href="mailto:paraview@paraview.org">paraview@paraview.org</a><br>
Objet : Re: [Paraview] [paraview] using with python to read file VTK in 3.7 and to show a volume representation<br>
<br>
Jona,<br>
<br>
Look at the attached script.<br>
For volume rendering you need to specify the scalar to use for volume<br>
rendering as well as the color lookup table as well as the scalar opacity<br>
function. The attached script illustrates how to do the same.<br>
<br>
Utkarsh<br>
<br>
On Mon, May 25, 2009 at 8:08 AM, BOUSSOIR Jonathan 167706 &lt;<br>
<a href="mailto:Jonathan.BOUSSOIR@cea.fr">Jonathan.BOUSSOIR@cea.fr</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I am new to paraview, I am using Linux. I read a lot of paraview emails<br>
&gt; this morning. I see you have been work hard last days on python script.<br>
&gt; I download last version and compile.<br>
&gt; Now I can read a file VTK surface sphere. But, I have still one error when<br>
&gt; I want to show my volume VTK file. I read a file then I tried to change the<br>
&gt; representation and I execute Render(), I have a problem : Cell Scalars not<br>
&gt; supported.<br>
&gt;<br>
&gt; I link my VTK file in my email.<br>
&gt; Thanks in advance for your kind help.<br>
&gt;<br>
&gt; Regards,<br>
&gt; Jona<br>
&gt;<br>
&gt;<br>
&gt; #!/usr/bin/python<br>
&gt; # -*- coding: latin-1 -*-<br>
&gt;<br>
&gt; from paraview.simple import *<br>
&gt; connection = servermanager.Connect(&#39;localhost&#39;)<br>
&gt;<br>
&gt; # Create the reader and set the filename.<br>
&gt; reader = servermanager.sources.LegacyVTKReader(FileNames=&#39;wavelet.vtk&#39;)<br>
&gt;<br>
&gt; Show(reader)<br>
&gt; Render()<br>
&gt;<br>
&gt; dp = GetDisplayProperties(reader)<br>
&gt; dp.Representation<br>
&gt; #&gt;&gt;&gt; : &#39;Slice&#39;<br>
&gt;<br>
&gt; dp.GetProperty(&quot;Representation&quot;).Available<br>
&gt; #&gt;&gt;&gt; : [&#39;Outline&#39;, &#39;Points&#39;, &#39;Wireframe&#39;, &#39;Surface&#39;, &#39;Surface With Edges&#39;,<br>
&gt; &#39;Volume&#39;, &#39;Slice&#39;]<br>
&gt;<br>
&gt; dp.Representation = &#39;Volume&#39;<br>
&gt;<br>
&gt; Show(reader)<br>
&gt; Render()<br>
&gt;<br>
&gt; ERROR: In<br>
&gt; /home/myrrha/Desktop/paraview/paraview3.7/ParaView3/VTK/VolumeRendering/vtkFixedPointVolumeRayCastMapper.cxx,<br>
&gt; line 1467<br>
&gt; vtkFixedPointVolumeRayCastMapper (0x2d7d650): Cell Scalars not supported<br>
&gt;<br>
&gt; Erreur de segmentation<br>
&gt;<br>
&gt; &quot;When I excute this last line &quot;Render()&quot;, I have a error, I don&#39;t<br>
&gt; understand&quot;<br>
&gt;<br>
&gt;<br>
&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>
&gt;<br>
<br>
</blockquote></div><br>