[Paraview] Resample DataSet
Berk Geveci
berk.geveci at kitware.com
Wed Nov 12 07:16:37 EST 2008
Alternatively, you can use the programmable filter to merge arrays
from the output of the probe and the original dataset. Select both
datasets, apply programmable filter and use a script like:
i0 = self.GetInputDataObject(0,0)
i1 = self.GetInputDataObject(0,1)
o = self.GetOutputDataObject(0)
o.GetPointData().AddArray(i0.GetPointData().GetArray("RTData"))
o.GetPointData().AddArray(i1.GetPointData().GetArray("Elevation"))
where the RTData and Elevation should be data1 and data2. Then you can
use the calculator. In the not so far future, you should be able to do
something like
output.PointData += inputs[0].PointData["RTData"] -
inputs[1].PointData["Elevation"]
in the programmable filter. We are working on it...
-berk
On Tue, Nov 11, 2008 at 3:43 PM, John Biddiscombe <biddisco at cscs.ch> wrote:
> If you look at the vtkProbeFilter code, you can see that the source dataset
> (the geometry onto which you are sampling the input dataset), does not pass
> its scalars through the filter. I think that when it was written, it was
> assumed that probing of the data would occur onto some new geometry and the
> comparison you want to make wasn't imagined at the time. The original
> scalars are lost.
>
> You should be able to add a PassData(blah blah) at the appropriate place in
> the probe filter code and the original scalars will appear alongside the new
> ones.
>
> I would do this for you, but my version of the probe filter is modified
> somewhat and I don't want to mess about with the necessary
> merge/diff/conflicts.
>
> If I have time later in the week (when I'm stuck on a train!) I'll have a go
> at it for you.
>
> JB
>
>> Did you make sure in the Information tab?
>> DSZ
>>
>> Jacques Papper wrote:
>>>
>>> The number of points should be the same since I interpolate the data from
>>> one grid onto the other grid first before doing the difference.
>>>
>>> Jacques
>>>
>>> Dominik Szczerba wrote:
>>>>
>>>> The calculator filter assumes the same number of points, whereas this is
>>>> not the case. Note that x1-x2 is undefined if size(x1) != size(x2).
>>>> Better way to go is to compare bulk values e.g. integrated pressure over
>>>> some distinc region or 2D intersection plots along some line.
>>>>
>>>> Dominik
>>>>
>>>> Jacques Papper wrote:
>>>>>
>>>>> Hi Dominik,
>>>>>
>>>>> What I mean is that if I load :
>>>>> grid1, data1
>>>>> grid2, data2
>>>>> and
>>>>> interpolate data1 onto grid2
>>>>> Then data2 is no longer in the list of variables (see attached
>>>>> picture),
>>>>> and I can't use the calculator to do data2-data1
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>> Dominik Szczerba wrote:
>>>>>>
>>>>>> Yes I am doing something similar. What does it mean 'no longer have
>>>>>> access to data2'?
>>>>>> Dominik
>>>>>>
>>>>>> Jacques Papper wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm trying to interpolate a pressure field from one grid to another
>>>>>>> and then compute the difference between the original pressure field and the
>>>>>>> interpolated one.
>>>>>>> So if I have :
>>>>>>> grid1, data1
>>>>>>> grid2, data2
>>>>>>>
>>>>>>> I want to
>>>>>>> 1. interpolate data1 onto grid2
>>>>>>> 2. compute data2-data1
>>>>>>>
>>>>>>> I try to use the Resample Dataset filter which seems to work for step
>>>>>>> 1, but then I no longer have access to data2! Am I doing something wrong ,
>>>>>>> or do I need to code up the filter so that it copies the data associated
>>>>>>> with grid2 ?
>>>>>>> If anyone has done something similar in the past -- please help :) !
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> ---------------------------
>>>>>>> This email contains information that is private and confidential and
>>>>>>> is intended only for the addressee. If you are not the intended recipient
>>>>>>> please delete it and notify us immediately by e-mailing the sender.
>>>>>>> Note: All email sent to or from this address may be accessed by
>>>>>>> someone other than the recipient, for system management and security
>>>>>>> reasons.
>>>>>>> Aircraft Research Association Ltd. Registered in England,
>>>>>>> Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF
>>>>>>> England VAT No GB 196351245
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ParaView mailing list
>>>>>>> ParaView at paraview.org
>>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>
>>>>>
>>>>> ---------------------------
>>>>> This email contains information that is private and confidential and is
>>>>> intended only for the addressee. If you are not the intended recipient
>>>>> please delete it and notify us immediately by e-mailing the sender.
>>>>> Note: All email sent to or from this address may be accessed by someone
>>>>> other than the recipient, for system management and security reasons.
>>>>> Aircraft Research Association Ltd. Registered in England, Registration
>>>>> No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
>>>>> 196351245
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>
>>>
>>> ---------------------------
>>> This email contains information that is private and confidential and is
>>> intended only for the addressee. If you are not the intended recipient
>>> please delete it and notify us immediately by e-mailing the sender.
>>> Note: All email sent to or from this address may be accessed by someone
>>> other than the recipient, for system management and security reasons.
>>> Aircraft Research Association Ltd. Registered in England, Registration
>>> No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
>>> 196351245
>>>
>>>
>>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
More information about the ParaView
mailing list