[Paraview-developers] load State slow by remembering the states checked/ unchecked
Cory Quammen
cory.quammen at kitware.com
Tue Oct 6 09:14:52 EDT 2015
Hi Orlando,
Thanks for reporting back that you solved your problem. Indeed, that should
be a much faster way to set elements in a large vector property.
Cory
On Tue, Oct 6, 2015 at 6:46 AM, RIVERA ROLDAN, Jorge Orlando <
Orlando.RIVERA at mtu.de> wrote:
> Hi
>
> Maybe someone may be interested, I solve the problem using
>
>
>
> A->SetElements(vectorWithStates)
>
>
>
> Instead of :
>
> for (int i=0;i< A->GetNumberOfElements;i++)
>
> A->SetElement(I, [0|1] ) ;
>
>
>
>
>
> Regards
>
>
>
>
>
> *Von:* RIVERA ROLDAN, Jorge Orlando
> *Gesendet:* Tuesday, 29. September 2015 13:01
> *An:* paraview-developers at paraview.org
> *Betreff:* load State slow by remembering the states checked/ unchecked
>
>
>
> Dear Forum members
>
>
>
> I hope you can help me with something I am dealing with .
>
>
>
> I have a reader base on a vtkMultiBlock , the data layout of the
> multiblock will be represented by a qtree on the client/GUI , so the
> Data layout will be one to one to the qtree widget
>
> like this:
>
> - vtkMB (0)
>
> - - vtkMB (1)
>
> - - - vtkMB (2)
>
> - - - - grid (3)
>
> - - - - grid (4)
>
> - - - vtkMB (5)
>
> - - - - grid (6
>
> - - - - grid (7) …
>
>
>
> There is a vtkSMIntVectorProperty (A) that connects the Qtree(GUI) with
> the Server . The corresponding intArray (B) on the server side follows
> simply the indexes on the MB tree {0,1,2,3,4,5,6,7…} so at server and GUI
> both arrays (A)-(B) mirror each other.
>
>
>
> So when I select an element on the qtree widget , lets say (3)
> (A[3]=1) . Then at the server B[3]=1 and the grid 3 will be read and
> loaded . When I select in the qtree (2) , then A[2]=1 , that means
> also, A[3]=1 and A[4]=1 , ( 3 and 4 being children of 2) are to be read
> and loaded i.e. B[2]=1, B[3]=1 and B[4]=1.
>
>
>
> In normal operation all woks like a charm. However, when I save the state
> following behavior can be observer . In the state-xml file the pipeline
> is saved normally , so the state of intArray is saved (vector B) , the
> data is read and loaded in requesData and I have my representation as
> supposed to be.
>
>
>
> The Data Layout will be them transferred to the GUI with a
> vtkSMStringVectorProperty and the state of checked and unchecked with the
> vtkSMIntVectorProperty vector (A) , so far so good. Now , when I check
> and /or uncheck other elements on the Qtree/GUI the response time is
> quite lame. With the debugger I could see that the time is used in
> A->SetValue(index, 1) (1 for checked and 0 for unchecked ) . Since a
> have a couple or thousand of elements in my tree (Qtree), this takes
> several minutes, but **ONLY when LOAD STATE is used ** .
>
>
>
> The function in the GUI that contains A->SetValue(index,
> CHECKED/UNCHECKED ) works really fast when I load my example normally
> (open File , apply plugins and filters ). The same Function is very slow
> ( A->SetValue(index, CHECKED/UNCHECKED ) ) when loaded from a SAVE and
> LOAD state.
>
>
>
> What could be the cause ? do you have any Idea or have observed similar
> behavior?
>
>
>
> Thanks in Advance
>
>
>
>
>
> Orlando Rivera
>
>
>
>
>
>
>
>
>
>
> --
> *MTU Aero Engines AG*
> Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer
> Martens, Michael Schreyoegg
> Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus
> Eberhardt
> Sitz der Gesellschaft/Registered Office: Muenchen
> Handelsregister/Commercial Register: Muenchen HRB 157206
>
> Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder
> rechtlich geschuetzte Informationen.
> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
> den Absender und loeschen Sie diese
> E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder
> Weiterleiten ist nicht gestattet.
>
> This e-mail and any attached documents are proprietary to MTU,
> confidential or protected by law.
> If you are not the intended recipient, please advise the sender and delete
> this message and its attachments.
> Any unauthorised storing, copying or distribution is prohibited.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151006/c335b217/attachment-0001.html>
More information about the Paraview-developers
mailing list