[Paraview] Data set comparison

Luca.Clementi at tororosso.com Luca.Clementi at tororosso.com
Mon Mar 29 11:34:04 EDT 2010


Dear Berk,

this really helped me a lot, thanks!


But now Im stuck with another problem.

The scalar value that I'm trying to compare from the two data sets have the
same names.


meanTotalPressure


So when I do the AddArray() in my script the second array simply overrides
the first one.

http://www.vtk.org/doc/nightly/html/classvtkFieldData.html#a22259e3c071ac8ff7a62ac49e9f1a92e



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.


Do I have to copy the object to rename it?


Sincerely,

Luca

-----------------------------------
i0 = self.GetInputDataObject(0,0)
i1 = self.GetInputDataObject(0,1)
o = self.GetOutputDataObject(0)
print "the class is: " + str(i0.GetPointData().GetArray
("meanTotalPressureMonitor").__class__)
array0 = i0.GetPointData().GetArray("meanTotalPressureMonitor")
array0.SetName("meanTotalPressure0")
o.GetPointData().AddArray(array0)
array1 = i1.GetPointData().GetArray("meanTotalPressureMonitor")
array1.SetName("meanTotalPressure1")
o.GetPointData().AddArray(array1)
-----------------------------------


Berk Geveci <berk.geveci at kitware.com> wrote on 03/23/2010 08:57:52 PM:
>
> This is because the EnSight reader produces a multi-block dataset. Try
> applying Merge Blocks filter first.
>
> -berk
>
> On Mon, Mar 22, 2010 at 1:12 PM,  <Luca.Clementi at tororosso.com> wrote:
> > Hi all,
> > Im trying to compare two data sets in Ensight .case format.
> >
> > I found only this thread referring to data set comparison:
> > http://www.cmake.org/pipermail/paraview/2008-November/010034.html
> >
> > But I could not get it to work. I tried resamply directly the two
Ensight
> > data reader. Then I also tried to filter the two Ensight data readers
> > through a CellDatatoPointData reader and also through a CellCenter
(with
> > vertex cells active), but I always get:
> > ERROR: In
> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/
> ParaView3/VTK/Filtering/vtkDataSet.cxx,
> > line 406
> > vtkUnstructuredGrid (0x3a46da0): Point array vtkValidPointMask with 1
> > components, only has 3726 tuples but there are 407364 pointsERROR: In
> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/
> ParaView3/VTK/Filtering/vtkDataSet.cxx,
> > line 406
> > vtkUnstructuredGrid (0x67183e0): Point array vtkValidPointMask with 1
> > components, only has 3726 tuples but there are 407364 points
> >
> >
> > ERROR: In
> > /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/
> ParaView3/VTK/Filtering/vtkExecutive.cxx,
> > line 757
> > vtkCompositeDataPipeline (0x65c0b20): Algorithm
> > vtkPVGeometryFilter(0x65bdb80) returned failure for request:
> > vtkInformation (0x67155a0)
> >  Debug: Off
> >  Modified Time: 13672858
> >  Reference Count: 1
> >  Registered Events: (none)
> >  Request: REQUEST_DATA
> >  FROM_OUTPUT_PORT: 0
> >  ALGORITHM_AFTER_FORWARD: 1
> >  FORWARD_DIRECTION: 0
> >
> >
> > I also tried the programmable filter suggested in the previous email,
> > (using two input file with the same geometry), but in that case I
always
> > get:
> >
> > paraview version 3.6.2, Date: 2009-05-18
> >
> > Traceback (most recent call last):
> >  File "<string>", line 25, in <module>
> >  File "<string>", line 5, in RequestData
> > AttributeError: GetPointData
> >
> >
> > That's the filter Im trying to use:
> > i0 = self.GetInputDataObject(0,0)
> > i1 = self.GetInputDataObject(0,1)
> > o = self.GetOutputDataObject(0)
> > o.GetPointData().AddArray(i0.GetPointData().GetArray
> ("meanTotalPressureMonitor"))
> > o.GetPointData().AddArray(i1.GetPointData().GetArray
> ("meanTotalPressureMonitor"))
> >
> >
> > Thank you very much for your help!
> >
> > Sincerely,
> > Luca
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100329/2167b295/attachment-0001.htm>


More information about the ParaView mailing list