Re: [Paraview] programmable access to vector components (via Python)

2012-05-25 Thread Fabian Wein

It appears to me you have found a limitation (or bug?) in the
Calculator filter. My comments are inserted below.


I just submitted a bug report: http://paraview.org/Bug/view.php?id=13204


files, however, I have never used it. I graduated from VTK
XML-structured ASCII-text results files to the EnSight
binary-formatted specification in order to get compact, manageable
file-sets for my modestly large explicit transient dynamic simulations.


We are happy with HDF5 but this requires a own reader plugin for
our format which we wrote some years ago. With HDF5 we have also access
via Matlab, with is a plus for us.


If the error message reflects a limitation in the Calculator, then
the Calculator only processes scalars and vectors (1st-order tensors),
and that in itself is no small accomplishment.


My mechTensor is just a vector with 6 components, so the limitation is
with the size of the vector.

This answers two of my questions:


* am I right with the assumption, that the calculator does not like double 
characters after the underline?
* Is this XX, YY, ... coming from Paraview?


Anyone who can help me with the following two?


* How do I access the vector components via python?
* Where can I find more information about the python interface?


Thanks a lot,

Fabian
___
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


[Paraview] Custom Interaction Style Without Mouse

2012-05-25 Thread David Zemon
Hello,

My team and I are working on creating a new method to interact with
ParaView. Our library currently has a skeleton framework with events of its
own to be called for zoom or pan or rotate (more will be added when we get
one of them working). We are having immense difficulty interacting with
ParaView, however. We found the vtkPVInteractorStyle class and have been
attempting to access it (our library was set as a friend) but most recently
ran into a problem when calling OnButtonUp. The exact error was related
to X - X Error: BadAccess (attempt to access private resource denied).
We've found that ParaView hangs for about 5 to 10 seconds on this line
this-InvokeEvent(vtkCommand::EndInteractionEvent); of this method void
vtkPVInteractorStyle::OnButtonUp(int button) in vtkPVInteractorStyle.cxx.

There must be some way to control the renderer using something other than a
mouse and keyboard. Are we going about this the correct way? Is there an
entirely different method we should be using? Any and all help is
appreciated.

Thanks,
David Zemon
___
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


Re: [Paraview] programmable access to vector components (via Python)

2012-05-25 Thread Berk Geveci
Which version of ParaView is this? This bug sounds very familiar to me and
I vaguely remember sitting down with Utkarsh to fix it. If it is an older
version, can you try 3.14?

As for the Python notation, take a look at:

http://paraview.org/Wiki/ParaView/Users_Guide/Python_Programmable_Filter
http://paraview.org/Wiki/ParaView/Users_Guide/Python_Calculator

You need to use something like: inputs[0].CellData['**mechTensor'][:, n]
where n is whichever component that you are accessing. This notation is
based on Numpy. You can learn more about it here:

Guide to NumPy -
Trelgolhttp://www.google.com/url?sa=trct=jq=numpy%20booksource=webcd=1ved=0CGAQFjAAurl=http%3A%2F%2Fwww.tramy.us%2Fnumpybook.pdfei=iee_T6LGNeK02gWuqqSwDQusg=AFQjCNEqRdLrjjyLB8CFsWb1wecnEuDfNg

Note that NumPy is much more powerful and efficient that the Array
Calculator so I'd recommend using the Python Calculator or the Python
Programmable Filter whenever possible.


-berk


On Fri, May 25, 2012 at 10:03 AM, Fabian Wein 
fabian.w...@am.uni-erlangen.de wrote:

 It appears to me you have found a limitation (or bug?) in the
 Calculator filter. My comments are inserted below.


 I just submitted a bug report: 
 http://paraview.org/Bug/view.**php?id=13204http://paraview.org/Bug/view.php?id=13204


  files, however, I have never used it. I graduated from VTK
 XML-structured ASCII-text results files to the EnSight
 binary-formatted specification in order to get compact, manageable
 file-sets for my modestly large explicit transient dynamic simulations.


 We are happy with HDF5 but this requires a own reader plugin for
 our format which we wrote some years ago. With HDF5 we have also access
 via Matlab, with is a plus for us.


  If the error message reflects a limitation in the Calculator, then
 the Calculator only processes scalars and vectors (1st-order tensors),
 and that in itself is no small accomplishment.


 My mechTensor is just a vector with 6 components, so the limitation is
 with the size of the vector.

 This answers two of my questions:


  * am I right with the assumption, that the calculator does not like
 double characters after the underline?
 * Is this XX, YY, ... coming from Paraview?


 Anyone who can help me with the following two?


  * How do I access the vector components via python?
 * Where can I find more information about the python interface?


 Thanks a lot,

 Fabian

 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the ParaView Wiki at:
 http://paraview.org/Wiki/**ParaView http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/**mailman/listinfo/paraviewhttp://www.paraview.org/mailman/listinfo/paraview

___
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


Re: [Paraview] programmable access to vector components (via Python)

2012-05-25 Thread Utkarsh Ayachit
I think this might be same as the bug: http://paraview.org/Bug/view.php?id=12951

Utkarsh

On Fri, May 25, 2012 at 4:13 PM, Berk Geveci berk.gev...@kitware.com wrote:
 Which version of ParaView is this? This bug sounds very familiar to me and I
 vaguely remember sitting down with Utkarsh to fix it. If it is an older
 version, can you try 3.14?

 As for the Python notation, take a look at:

 http://paraview.org/Wiki/ParaView/Users_Guide/Python_Programmable_Filter
 http://paraview.org/Wiki/ParaView/Users_Guide/Python_Calculator

 You need to use something like: inputs[0].CellData['mechTensor'][:, n]
 where n is whichever component that you are accessing. This notation is
 based on Numpy. You can learn more about it here:

 Guide to NumPy - Trelgol

 Note that NumPy is much more powerful and efficient that the Array
 Calculator so I'd recommend using the Python Calculator or the Python
 Programmable Filter whenever possible.


 -berk


 On Fri, May 25, 2012 at 10:03 AM, Fabian Wein
 fabian.w...@am.uni-erlangen.de wrote:

 It appears to me you have found a limitation (or bug?) in the
 Calculator filter. My comments are inserted below.


 I just submitted a bug report: http://paraview.org/Bug/view.php?id=13204


 files, however, I have never used it. I graduated from VTK
 XML-structured ASCII-text results files to the EnSight
 binary-formatted specification in order to get compact, manageable
 file-sets for my modestly large explicit transient dynamic simulations.


 We are happy with HDF5 but this requires a own reader plugin for
 our format which we wrote some years ago. With HDF5 we have also access
 via Matlab, with is a plus for us.


 If the error message reflects a limitation in the Calculator, then
 the Calculator only processes scalars and vectors (1st-order tensors),
 and that in itself is no small accomplishment.


 My mechTensor is just a vector with 6 components, so the limitation is
 with the size of the vector.

 This answers two of my questions:


 * am I right with the assumption, that the calculator does not like
 double characters after the underline?
 * Is this XX, YY, ... coming from Paraview?


 Anyone who can help me with the following two?


 * How do I access the vector components via python?
 * Where can I find more information about the python interface?


 Thanks a lot,

 Fabian

 ___
 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



 ___
 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

___
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