[Paraview] Improving vtkDataArraySelection ... and a question of the general philosophy

Olesen, Mark Mark.Olesen at emcontechnologies.com
Tue Nov 10 08:41:44 EST 2009


It seems that this might apply more to ParaView than I originally suspected.

I've modified my usage of vtkDataArraySelection to use vtkDataArraySelection::SetArraysWithDefault(const char *const * ...), which is a fairly roundabout means of adding new items to a list without this->Modified() being called. I've double checked and indeed the MTime() remains unchanged.

However, to get the reader GUI updated in paraview, I need to call UpdateInformationProperty(...) with the corresponding property. When this happens, the GUI view of the vtkDataArraySelection gets adjusted appropriately, but unfortunately the reader panel also gets touched as modified (ie, the 'Apply' button lights up green). As far as I can see, the GUI changes are spurious since nothing has changed in the underlying selection except that the list of available part selections is now a bit longer than before.
Using the 'Reset' button to undo the GUI changes seems to confirm my suspicions - the list properly retains its new length and GUI selections are unchanged.

Why is the panel getting marked as modified and is there a reasonable workaround?

Thanks,

/mark

> -----Original Message-----
> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] 
> Sent: Monday, November 09, 2009 1:25 PM
> To: Olesen, Mark
> Cc: ParaView; vtk-developers at vtk.org
> Subject: Re: [Paraview] Improving vtkDataArraySelection ... 
> and a question of the general philosophy
> 
> Forwarding this to the vtk-developer's list.
> 
> Utkarsh
> 
> ---------- Forwarded message ----------
> From: Mark Olesen <Mark.Olesen at emcontechnologies.com>
> Date: Wed, Nov 4, 2009 at 10:21 AM
> Subject: [Paraview] Improving vtkDataArraySelection ... and a question
> of the general philosophy
> To: ParaView <paraview at paraview.org>
> 
> 
> I was looking at making some minor tweaks to vtkDataArraySelection and
> started wondering why some things are being done the way they are.
> 
> First off I'll explain what I wanted.
> I'd like an additional method
> 
>    int AddArray(const char* name, int defaultStatus);
> 
> The behaviour is as per AddArray(const char*), but with the ability to
> specify which default status should be used when it is created.
> [
>  I really cannot figure out a workaround for adding an array
>  entry with an unselected state that doesn't automatically
>  trigger this->Modified();
> ]
> 
> 
> Then the questions begin:
> The method probably doesn't exist in that form since nobody 
> thought they
> needed it. However, it could also be that having multiple 
> signatures is
> frowned upon in VTK. Or are there problems with binding to other
> languages?
> Having said that, the methods are surrounded by a BTX/ETX pair so
> wrapping may not be the problem, but I'm not sure.
> 
> After taking a slightly closer look, I also noticed that the internals
> use a vtkstd::vector<vtkstd::string> and a vtkstd::vector<int> for the
> storage.
> 
> If there is a std::string under the hood, is there any other reason
> (beyond language wrapping) that we have everything with (const char*)
> parameters instead of (const vtkstd::string&)?
> 
> Is it only historical that a vtkstd::vector<int> is used for storing a
> bool state? Or is there a desire to avoid the std::vector<bool>
> specialization?
> 
> 
> Thanks,
> 
> /mark
> 
> 
> This e-mail message and any attachments may contain legally
> privileged, confidential or proprietary Information, or information
> otherwise protected by law of EMCON Technologies, its affiliates, or
> third parties. This notice serves as marking of its "Confidential"
> status as defined in any confidentiality agreements concerning the
> sender and recipient. If you are not the intended recipient(s), or the
> employee or agent responsible for delivery of this message to the
> intended recipient(s), you are hereby notified that any dissemination,
> distribution or copying of this e-mail message is strictly prohibited.
> If you have received this message in error, please immediately notify
> the sender and delete this e-mail message from your computer.
> 
> _______________________________________________
> 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 e-mail message and any attachments may contain legally privileged, confidential or proprietary Information, or information otherwise protected by law of EMCON Technologies, its affiliates, or third parties. This notice serves as marking of its "Confidential" status as defined in any confidentiality agreements concerning the sender and recipient. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this e-mail message is strictly prohibited. 
If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer.



More information about the ParaView mailing list