[Paraview] Custom Reader Issue

Mark Olesen Mark.Olesen at faurecia.com
Wed Mar 24 08:21:45 EDT 2010


On Wed, 2010-03-24 at 12:02 +0000, Adriano Gagliardi 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.

Yes and no.

You should take a look at how to write custom panels
http://www.cmake.org/Wiki/CustomObjectPanels

This will let you add various Qt elements to the reader panel.
If you mark their corresponding properties with << is_internal="1" >> in
the SM xml, you can set/unset the values directly.
One of the elements could, for example, be used to populate/repopulate
some vtkDataArraySelection containers.

For these purposes, inheriting from pqAutoGeneratedObjectPanel should be
sufficient.

There is only one side-effect that I haven't been able to work around:
Updating the vtkDataArraySelection in this manner *will* cause the
reader panel to notice that it has been changed (lighting up the Apply
button). Pressing the Reset button fixes that while still retaining the
changes that your custom Qt bits did.

It would still be nice to figure how to avoid this last bit.
Perhaps someone from the mailing list, or from KitWare, has a good
suggestion.

/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.



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.



More information about the ParaView mailing list