[Paraview-developers] where in reader is best place to initialize data arrays?...

Joshua Murphy Joshua.Murphy at lasp.colorado.edu
Wed Feb 20 13:59:56 EST 2013


Hi Utkarsh,

Thanks for the reply!  I thought I was doing it in the correct spot… I do preserve the user selections, but what was getting me is that, when restoring state, Paraview is calling my "enableArray()" routine before RequestInformation() is ever called.  The result was that my array list was being force-populated by the state restoration rather than waiting for my reader to build the array list from the input file.  This caused all kinds of headaches from having double entries in the list, to requesting garbage if my reader had changed slightly.  My interim fix is to just check, when I am populating the arrays for the first time, to see if the array already exists, and if so, to leave it alone.  I don't think this is a perfect solution, as I would think that paraview should wait until after RequestInformation() is called before trying to set the state of the arrays.

Anyway, I have it working in the meantime.  Thanks for you response!

-Josh


From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com<mailto:utkarsh.ayachit at kitware.com>>
Date: Wednesday, February 20, 2013 10:25 AM
To: Joshua Murphy <joshua.murphy at lasp.colorado.edu<mailto:joshua.murphy at lasp.colorado.edu>>
Cc: "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: Re: [Paraview-developers] where in reader is best place to initialize data arrays?...

You surely should be populating your list of arrays in RequestInformation(), but you may want to always preserve what the user chose. The way you have it setup, the user-choice of arrays will be cleared anytime RequestInformation() gets called and that method can get called for several reasons during the lifetime of the reader.

Utkarsh

On Tue, Feb 19, 2013 at 9:07 PM, Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>> wrote:
Hello,

Hopefully this can be answered quickly by someone in the know…

I am tracking down a restore state bug in my reader, and I have nailed it down to the following situation:

When restoring state, ParaView is using my setArrayStatus() function before I have finished initializing my array list within RequestInformation().

This causes the on/off status of the arrays in the state being restored to be ignored, as I clobber them when I initialize the list.

My question is this: where should I be populating my list of available arrays if not in RequestInformation()?  The way I have it set up now works fine for when I load data from scratch, but when restoring from a state, as I said, ParaView is trying to set the on/off state of the arrays before I am done populating the available arrays…


I hope someone can give me a quick answer… again the question boils down to this: where, and at what point, should I be populating my available array list so that it will be initialized already when ParaView attempts to change the status during a state restore?

Thanks,
Josh


_______________________________________________
Paraview-developers mailing list
Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
http://public.kitware.com/mailman/listinfo/paraview-developers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130220/c744ea72/attachment.htm>


More information about the Paraview-developers mailing list