[Paraview] Custom Reader Issue
Adriano Gagliardi
agagliardi at ara.co.uk
Wed Mar 24 12:18:14 EDT 2010
Paul/Mark,
Thanks for the suggestions. I am going to take a look at both options and
get an idea of time to implement. I knew some work with Qt code was
possible, but I didn't realise it was possible to implement your own method
instead of using the vtkMacros.
Again, thanks for the suggestions. I'll do a bit more investigating.
Regards,
Adriano
-----Original Message-----
From: Paul Edwards [mailto:paul.m.edwards at gmail.com]
Sent: 24 March 2010 12:28
To: agagliardi at ara.co.uk
Cc: Mark Olesen; ParaView
Subject: Re: [Paraview] Custom Reader Issue
Hi Adriano,
Rather than using the vtkSetStringMacro you could implement your own method
that is called when the data file is set. As well as doing what the macro
does (i.e. set the member variable, call SetModified etc), this function
could request information from the server about what arrays can be found on
the file and update the object panel.
Regards,
Paul
On 24 March 2010 12:02, Adriano Gagliardi <agagliardi at ara.co.uk> wrote:
>
> Yeah, that's what I am using at the moment. However, when I select my
> mesh file initially using File->Open, RequestInformation is called. At
> this point in time, no data file has been selected. I then have a
> vtkSetStringMacro that allows me to browse for a second input file
> (the data file). However, for this to then be read in to obtain the
> variables contained within (hence populate the point array table), I
> need to click apply again so that RequestInformation is called. I was
> just wondering if there was a workaround so I could avoid having to
reapply the filter.
>
> Adriano
>
>
> -----Original Message-----
> From: Mark Olesen [mailto:Mark.Olesen at faurecia.com]
> Sent: 24 March 2010 11:57
> To: agagliardi at ara.co.uk
> Subject: Re: [Paraview] Custom Reader Issue
>
> On Wed, 2010-03-24 at 11:00 +0000, Adriano Gagliardi wrote:
>> Hi,
>>
>> I have a reader that currently reads in a mesh. As an option it will
>> read in a data file associated with the mesh, if provided via file
>> browsing. At the moment the list of data arrays only appears after
>> the filter is applied, since it will only then read in the data file.
>> So the user then has to select the variables he/she wants and then
>> reapplies the filter. I'd like to avoid this and, instead, have it so
>> if the user browses and selects a data file that it will then
>> populate the
> point array selection immediately i.e.
>> before the filter is applied. Is this possible?
>
> AFIAK that's the purpose of the RequestInformation() method.
> You can use it populate arrays etc. The vtkOpenFOAMReader.cxx (for
> example) does just that too.
>
> /mark
>
>
> DISCLAIMER:
> This electronic transmission (and any attachments thereto) is intended
> solely for the use of the addressee(s). It may contain confidential or
> legally privileged information. If you are not the intended recipient
> of this message, you must delete it immediately and notify the sender.
> Any unauthorized use or disclosure of this message is strictly prohibited.
> Faurecia does not guarantee the integrity of this transmission and
> shall therefore never be liable if the message is altered or falsified
> nor for any virus, interception or damage to your system.
>
>
> ---------------------------
> 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
>
>
> _______________________________________________
> 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
More information about the ParaView
mailing list