<div>Hi Andreas:</div>
<div> </div>
<div> Have you tried visualizing the EnSight data using ParaView UI (instead of python script)? If it is due to the EnSight reader, please let me know.</div>
<div> </div>
<div> -Zhanping<br><br></div>
<div class="gmail_quote">On Wed, Apr 7, 2010 at 11:12 AM, Andreas Maier <span dir="ltr"><<a href="mailto:andi.maier@mytum.de">andi.maier@mytum.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I want to read cell data tuples in pvpython, but somehow I am stuck. My data<br>is read from an ensight case file and I can process it until that point when<br>
I need to access the single tuples of my cell data arrays. Please find an<br>extract of my pvpython-code below. Does anyone know how to solve that<br>problem? Thanks in advance for your efforts.<br><br>Best regards,<br><br>
Andreas<br><br>>from paraview import servermanager, vtk<br>><br>> # Set up connection to the Paraview server<br>>if not servermanager.ActiveConnection:<br>> connection = servermanager.Connect()<br>
>if not connection:<br>> raise exceptions.RuntimeError, "Connection to server failed"<br>><br>> # read ensight source object<br>>reader = servermanager.sources.ensight()<br>>reader.ByteOrder = 1<br>
>resultfile = "...._structure_new2.case"<br>>reader.CaseFileName = resultfile<br>>reader.UpdatePipelineInformation()<br>><br>> # Point to Cell Data<br>>ptc = servermanager.filters.PointDataToCellData(Input=reader)<br>
>ptc.UpdatePipeline()<br>><br>>pdi = ptc.GetDataInformation().DataInformation<br>>numCells = pdi.GetNumberOfCells()<br>>celldata = pdi.GetCellDataInformation()<br>><br>> # here I get my vtkPVArrayInformation<br>
>vM_array = celldata.GetArrayInformation("vMises_stress")<br>>for i in range(numCells):<br>> vMises_str = vM_array.GetTuple1(i) ## <- this does not work<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 ParaView Wiki at: <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>
</blockquote></div><br><br clear="all"><br>-- <br>Zhanping Liu, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x 138<br><a href="http://www.zhanpingliu.org">http://www.zhanpingliu.org</a><br>