<html><body>
<p><tt><font size="2">Dear Berk,<br>
</font></tt><br>
<tt><font size="2">this really helped me a lot, thanks!<br>
</font></tt><br>
<br>
<tt><font size="2">But now Im stuck with another problem.<br>
</font></tt><br>
<tt><font size="2">The scalar value that I'm trying to compare from the two data sets have the same names.<br>
</font></tt><br>
<br>
<tt><font size="2">meanTotalPressure<br>
</font></tt><br>
<br>
<tt><font size="2">So when I do the AddArray() in my script the second array simply overrides the first one.<br>
</font></tt><br>
<tt><font size="2"><a href="http://www.vtk.org/doc/nightly/html/classvtkFieldData.html#a22259e3c071ac8ff7a62ac49e9f1a92e">http://www.vtk.org/doc/nightly/html/classvtkFieldData.html#a22259e3c071ac8ff7a62ac49e9f1a92e</a><br>
</font></tt><br>
<br>
<tt><font size="2">I tried to change the name with SetName() method, but it changes the Array name globally, and the second time I run the filter the GetArray returns NoneType object.<br>
</font></tt><br>
<br>
<tt><font size="2">Do I have to copy the object to rename it?<br>
</font></tt><br>
<br>
<tt><font size="2">Sincerely,<br>
</font></tt><br>
<tt><font size="2">Luca<br>
</font></tt><br>
<tt><font size="2">-----------------------------------<br>
</font></tt><tt><font size="2">i0 = self.GetInputDataObject(0,0)<br>
</font></tt><tt><font size="2">i1 = self.GetInputDataObject(0,1)<br>
</font></tt><tt><font size="2">o = self.GetOutputDataObject(0)<br>
</font></tt><tt><font size="2">print "the class is: " + str(i0.GetPointData().GetArray("meanTotalPressureMonitor").__class__)<br>
</font></tt><tt><font size="2">array0 = i0.GetPointData().GetArray("meanTotalPressureMonitor")<br>
</font></tt><tt><font size="2">array0.SetName("meanTotalPressure0")<br>
</font></tt><tt><font size="2">o.GetPointData().AddArray(array0)<br>
</font></tt><tt><font size="2">array1 = i1.GetPointData().GetArray("meanTotalPressureMonitor")<br>
</font></tt><tt><font size="2">array1.SetName("meanTotalPressure1")<br>
</font></tt><tt><font size="2">o.GetPointData().AddArray(array1)<br>
</font></tt><tt><font size="2">-----------------------------------<br>
</font></tt><br>
<br>
<tt><font size="2">Berk Geveci <berk.geveci@kitware.com> wrote on 03/23/2010 08:57:52 PM:<br>
</font></tt><tt><font size="2">><br>
</font></tt><tt><font size="2">> This is because the EnSight reader produces a multi-block dataset. Try<br>
</font></tt><tt><font size="2">> applying Merge Blocks filter first.<br>
</font></tt><tt><font size="2">><br>
</font></tt><tt><font size="2">> -berk<br>
</font></tt><tt><font size="2">><br>
</font></tt><tt><font size="2">> On Mon, Mar 22, 2010 at 1:12 PM, <Luca.Clementi@tororosso.com> wrote:<br>
</font></tt><tt><font size="2">> > Hi all,<br>
</font></tt><tt><font size="2">> > Im trying to compare two data sets in Ensight .case format.<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > I found only this thread referring to data set comparison:<br>
</font></tt><tt><font size="2">> > <a href="http://www.cmake.org/pipermail/paraview/2008-November/010034.html">http://www.cmake.org/pipermail/paraview/2008-November/010034.html</a><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > But I could not get it to work. I tried resamply directly the two Ensight<br>
</font></tt><tt><font size="2">> > data reader. Then I also tried to filter the two Ensight data readers<br>
</font></tt><tt><font size="2">> > through a CellDatatoPointData reader and also through a CellCenter (with<br>
</font></tt><tt><font size="2">> > vertex cells active), but I always get:<br>
</font></tt><tt><font size="2">> > ERROR: In<br>
</font></tt><tt><font size="2">> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/<br>
</font></tt><tt><font size="2">> ParaView3/VTK/Filtering/vtkDataSet.cxx,<br>
</font></tt><tt><font size="2">> > line 406<br>
</font></tt><tt><font size="2">> > vtkUnstructuredGrid (0x3a46da0): Point array vtkValidPointMask with 1<br>
</font></tt><tt><font size="2">> > components, only has 3726 tuples but there are 407364 pointsERROR: In<br>
</font></tt><tt><font size="2">> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/<br>
</font></tt><tt><font size="2">> ParaView3/VTK/Filtering/vtkDataSet.cxx,<br>
</font></tt><tt><font size="2">> > line 406<br>
</font></tt><tt><font size="2">> > vtkUnstructuredGrid (0x67183e0): Point array vtkValidPointMask with 1<br>
</font></tt><tt><font size="2">> > components, only has 3726 tuples but there are 407364 points<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > ERROR: In<br>
</font></tt><tt><font size="2">> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/<br>
</font></tt><tt><font size="2">> ParaView3/VTK/Filtering/vtkExecutive.cxx,<br>
</font></tt><tt><font size="2">> > line 757<br>
</font></tt><tt><font size="2">> > vtkCompositeDataPipeline (0x65c0b20): Algorithm<br>
</font></tt><tt><font size="2">> > vtkPVGeometryFilter(0x65bdb80) returned failure for request:<br>
</font></tt><tt><font size="2">> > vtkInformation (0x67155a0)<br>
</font></tt><tt><font size="2">> > Debug: Off<br>
</font></tt><tt><font size="2">> > Modified Time: 13672858<br>
</font></tt><tt><font size="2">> > Reference Count: 1<br>
</font></tt><tt><font size="2">> > Registered Events: (none)<br>
</font></tt><tt><font size="2">> > Request: REQUEST_DATA<br>
</font></tt><tt><font size="2">> > FROM_OUTPUT_PORT: 0<br>
</font></tt><tt><font size="2">> > ALGORITHM_AFTER_FORWARD: 1<br>
</font></tt><tt><font size="2">> > FORWARD_DIRECTION: 0<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > I also tried the programmable filter suggested in the previous email,<br>
</font></tt><tt><font size="2">> > (using two input file with the same geometry), but in that case I always<br>
</font></tt><tt><font size="2">> > get:<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > paraview version 3.6.2, Date: 2009-05-18<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > Traceback (most recent call last):<br>
</font></tt><tt><font size="2">> > File "<string>", line 25, in <module><br>
</font></tt><tt><font size="2">> > File "<string>", line 5, in RequestData<br>
</font></tt><tt><font size="2">> > AttributeError: GetPointData<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > That's the filter Im trying to use:<br>
</font></tt><tt><font size="2">> > i0 = self.GetInputDataObject(0,0)<br>
</font></tt><tt><font size="2">> > i1 = self.GetInputDataObject(0,1)<br>
</font></tt><tt><font size="2">> > o = self.GetOutputDataObject(0)<br>
</font></tt><tt><font size="2">> > o.GetPointData().AddArray(i0.GetPointData().GetArray<br>
</font></tt><tt><font size="2">> ("meanTotalPressureMonitor"))<br>
</font></tt><tt><font size="2">> > o.GetPointData().AddArray(i1.GetPointData().GetArray<br>
</font></tt><tt><font size="2">> ("meanTotalPressureMonitor"))<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > Thank you very much for your help!<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> > Sincerely,<br>
</font></tt><tt><font size="2">> > Luca<br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ><br>
</font></tt><tt><font size="2">> ></font></tt><br>
<BR>
_________________________________________________________________________________________________________________<BR>
Questo messaggio è da intendersi esclusivamente ad uso del destinatario e può contenere informazioni che sono di natura privilegiata, confidenziale<BR>
o non divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non è il destinatario designato, o il dipendente/agente responsabile<BR>
per la consegna del messaggio al destinatario designato, si informa che ogni disseminazione, distribuzione o copiatura di questa comunicazione è <BR>
strettamente proibita anche ai sensi del decreto legislativo 196/03 . Se avete ricevuto questo messaggio per errore, vi preghiamo di notificarcelo<BR>
immediatamente a mezzo e-mail di risposta e successivamente di procedere alla cancellazione di questa e-mail e relativi allegati dal vostro sistema.<BR>
_________________________________________________________________________________________________________________<BR>
This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from <BR>
disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the <BR>
message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly <BR>
prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from <BR>
your system.<BR>
_________________________________________________________________________________________________________________<BR>
</body></html>