[Paraview] Saving integrated data on an animated slice
Adriano Gagliardi
agagliardi at ara.co.uk
Tue Nov 30 11:24:42 EST 2010
Richard,
I don't thionk you'll need the first programmable filter. The following
should be a start:
vtkUnsData = self.GetInputDataObject(0,0)
fout = open(filename,'a')
#then you can use the write function to write data to file ie
fout.write("%s" % (vtkUnsData.GetPointData().GetTuple1(0))
fout.close()
I've never used Surface Flow so don't know what type of data-set you will be
working with.
Good luck!
Adriano
===================================
Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford
Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk
-----Original Message-----
From: Richard GRENON [mailto:richard.grenon at onera.fr]
Sent: 30 November 2010 15:55
To: agagliardi at ara.co.uk
Cc: 'Biddiscombe, John A.'; paraview at paraview.org
Subject: Re: [Paraview] Saving integrated data on an animated slice
Thanks, Adriano.
This seems to be a very good idea. I could attach a Programmable Filter
script after my "Surface flow" filter.
My script should first create the data file with an "append" status so that
it would not be overwritten at each animation step, then it should output
the "Surface Flow" point value at each step. So maybe two Programmable
Filter scripts? The first one before the animated Clip filter to create the
output file, the second after the Surface flow filter. Maybe a pipeline like
that:
- Programmable Filter 1 : Creates the output file with "append" status.
Should execute once!
- Animated Clip : X coordinate of the cutting plane origin is animated.
- Surface Flow filter: performs integrations and gives a "Surface Flow"
point value.
- Programmable Filter 2: write the "Surface Flow" value. Should execute at
each animation step.
I will try to do that, but I am not very easy with Python, so if someone can
help me to write these two scripts, thanks in advance.
Richard.
Adriano Gagliardi wrote:
> Could you put together a Programmable Filter script that can execute
> and write out the data you want as the clip is animated?
>
>
> ===================================
>
> Adriano Gagliardi MEng PhD
> Business Sector Leader
> Computational Aerodynamics
> Aircraft Research Association Ltd.
> Manton Lane
> Bedford
>
> Tel: 01234 32 4644
> E-mail: agagliardi at ara.co.uk
> Url: www.ara.co.uk
> -----Original Message-----
> From: paraview-bounces at paraview.org
> [mailto:paraview-bounces at paraview.org]
> On Behalf Of Richard GRENON
> Sent: 30 November 2010 15:00
> To: Biddiscombe, John A.
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] Saving integrated data on an animated slice
>
> Thanks, John, but I don't know how to use this. Does it need some code
> writing?
> I cannot compile PV and I was wondering if saving data from each step
> of an animated clip on static objects was possible with the last PV 381
binaries.
> Is there any filter, or maybe Python script to do that? I tried to
> play the animation in a Python script and use CreateWriter as found on
> a Wiki page, but it does not work (CreateWriter seems to be for future PV
3.9).
>
> Richard
>
> Biddiscombe, John A. wrote:
>
>> vtkExtractDataOverTime
>>
>>
> --
> Richard GRENON
> ONERA
> Departement d'Aerodynamique Appliquee - DAAP/ACI
> 8 rue des Vertugadins
> 92190 MEUDON - FRANCE
> phone : +33 1 46 73 42 17
> fax : +33 1 46 73 41 46
> mailto:Richard.Grenon at onera.fr
> http://www.onera.fr
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> 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
>
> **********************************************************************
>
>
>
--
Richard GRENON
ONERA
Departement d'Aerodynamique Appliquee - DAAP/ACI
8 rue des Vertugadins
92190 MEUDON - FRANCE
phone : +33 1 46 73 42 17
fax : +33 1 46 73 41 46
mailto:Richard.Grenon at onera.fr
http://www.onera.fr
**********************************************************************
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
**********************************************************************
More information about the ParaView
mailing list