Re: [Paraview] Control over camera movement for animations

2018-04-18 Thread Utkarsh Ayachit
Rupert,

Let me preface this by saying that the camera animation components are
indeed due a update. They haven't been revisited in a long time and I
am sure they could use a major cleanup. It's good to try to accumulate
issues/ feature requests before we take the plunge so we can come up
with a good solution. Thus, when possible and where it makes sense
please feel free to report issues or feature requests on the issue
tracker. I've started putting together this "master" issue. Feel free
to update or add more.

https://gitlab.kitware.com/paraview/paraview/issues/18125

In general, everything you state are indeed limitations of the current
implementation and not something you missed.

We'd certainly love to see the results you generate when you're done.
It sounds quite cool.

Utkarsh

> When I use the "follow path" option it does not seem to be possible to
> adjust the "up direction" within a path.  I can have a different "up
> direction" in subsequent paths within one animation, but the jump between up
> directions is abrupt.  Are there any plans to allow up direction to change
> as a path is followed?  Is there a way to smooth the jump between subsequent
> paths with a different up direction?
> With the "follow path" option there doesn't seem to be any way of using the
> current camera view like in the "Interpolate camera locations" option.  Is
> this possible?  Is it likely to be implemented in the future?  Even if the
> "up direction" information for the current camera view is lost I would still
> find such a functionality useful.
> If I want a new path to start or finish at the same place as a previous path
> then I have to open the window for the previous path, copy one of the
> coords, close the window, open the window for the new path, paste the coord,
> then repeat for all other coords.  This is a lot of point-and-clicking.  Is
> there a way to short cut this?  For example having 2 path windows open
> concurrently would be a help, or being able to create a new path as a copy
> of a previous path would be even better.
>
> When I use "Interpolate camera locations" there seems to be quite a long
> slow overshoot.  I guess Paraview is doing some kind of spline
> interpolation.  Is there a way to stop it doing this?  Simple linear
> interpolation between locations would be just fine for my purposes.  My
> current approach to minimise this overshoot is to copy my target location
> several times in close temporal proximity.  e.g. if I want to move from
> position A at the start to position B after 10 seconds, then stay at
> position B, my current approach is to repeat position B at 10, 10.5 and 11
> seconds.  This isn't perfect but it is a manageable workaround.
>
> I REALLY like the ability to use the current camera view when setting up
> camera locations for interpolation.
>
> BTW I am making animations for a public lecture on Antarctic ice sheet
> modelling.  If you want to see what I come up with let me know, I'll be
> happy to share.
>
> Regards,
> Rupert
>
> ---
> Rupert Gladstone, PhD
> Antarctic Ice Sheet researcher, University of Lapland
> https://groups.google.com/d/forum/fisoc
> https://lacris.ulapland.fi/en/persons/rupert-gladstone(21a10f7f-3ea9-4c06-b9a4-320eb4ca8e29).html
> https://scholar.google.com.au/citations?user=FNgAsPkJ
> http://www.researcherid.com/rid/C-1086-2013
> ---
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] [ParaView] Problem with saving data from python

2018-04-18 Thread Gena Bug via ParaView

Yep, that helped! Thank you!

On 18.04.2018 23:07, Utkarsh Ayachit wrote:

Ah, the box! The box API needs to cleaned up, I am afriad. Until then,
the following is the way to go.

from paraview.simple import *

w = Wavelet()
UpdatePipeline()
bds = w.GetDataInformation().GetBounds()
c = Clip()
c.ClipType="Box"
c.ClipType.Bounds = bds  #<- NOTE THIS
c.ClipType.Scale = [0.5, 0.5, 1.0]
SaveData("/tmp/foo.vtu")

Utkarsh


On Wed, Apr 18, 2018 at 3:06 PM, Gena Bug via ParaView
 wrote:

Nope, it doesn't help. Seems to me it somehow connected to the fact that
type of the clip is 'Box'. It it, for example, 'Plane', than saving works.



On 18.04.2018 20:46, Utkarsh Ayachit wrote:


Try inserting a `UpdatePipeline()` after creating the Wavelet but
before the clip. Without that, the clip gets initialized with
incorrect bounds and the box scale factor doesn't get applied
correctly.

Utkarsh

On Wed, Apr 18, 2018 at 12:06 PM, Gena Bug via ParaView
 wrote:


Hi!

I've spent couple of hours but couldn't understand what I do wrong. When
running following script from console ($ pvpython script.py):

from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

wavelet1 = Wavelet()

clip1 = Clip(Input=wavelet1)
clip1.ClipType = 'Box'
clip1.ClipType.Scale = [0.5, 0.5, 1.0]

SaveData('fuu.vtu', proxy=clip1, CompressorType='ZLib')

UpdatePipeline()

I see the file fuu.vtu but it doesn't contain any data nor mesh. However
if
I do these steps from the GUI then I get correct file.

PV 5.5 for linux64, downloaded from the site. Run on debian testing.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] [ParaView] Problem with saving data from python

2018-04-18 Thread Utkarsh Ayachit
Ah, the box! The box API needs to cleaned up, I am afriad. Until then,
the following is the way to go.

from paraview.simple import *

w = Wavelet()
UpdatePipeline()
bds = w.GetDataInformation().GetBounds()
c = Clip()
c.ClipType="Box"
c.ClipType.Bounds = bds  #<- NOTE THIS
c.ClipType.Scale = [0.5, 0.5, 1.0]
SaveData("/tmp/foo.vtu")

Utkarsh


On Wed, Apr 18, 2018 at 3:06 PM, Gena Bug via ParaView
 wrote:
> Nope, it doesn't help. Seems to me it somehow connected to the fact that
> type of the clip is 'Box'. It it, for example, 'Plane', than saving works.
>
>
>
> On 18.04.2018 20:46, Utkarsh Ayachit wrote:
>>
>> Try inserting a `UpdatePipeline()` after creating the Wavelet but
>> before the clip. Without that, the clip gets initialized with
>> incorrect bounds and the box scale factor doesn't get applied
>> correctly.
>>
>> Utkarsh
>>
>> On Wed, Apr 18, 2018 at 12:06 PM, Gena Bug via ParaView
>>  wrote:
>>>
>>> Hi!
>>>
>>> I've spent couple of hours but couldn't understand what I do wrong. When
>>> running following script from console ($ pvpython script.py):
>>>
>>> from paraview.simple import *
>>> paraview.simple._DisableFirstRenderCameraReset()
>>>
>>> wavelet1 = Wavelet()
>>>
>>> clip1 = Clip(Input=wavelet1)
>>> clip1.ClipType = 'Box'
>>> clip1.ClipType.Scale = [0.5, 0.5, 1.0]
>>>
>>> SaveData('fuu.vtu', proxy=clip1, CompressorType='ZLib')
>>>
>>> UpdatePipeline()
>>>
>>> I see the file fuu.vtu but it doesn't contain any data nor mesh. However
>>> if
>>> I do these steps from the GUI then I get correct file.
>>>
>>> PV 5.5 for linux64, downloaded from the site. Run on debian testing.
>>> ___
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> https://public.kitware.com/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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Problem with numpy array

2018-04-18 Thread Caffagni, Andrea
Dear Cory,
This is the complete message that I have obtained like output:

Traceback (most recent call last):
File "", line 22, in 
File "", line 14, in RequestData
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 1095, in eig
_assertRankAtLeast2(a)
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 202, in _assertRankAtLeast2
'at least two-dimensional' % len(a.shape))
numpy.linalg.linalg.LinAlgError: 0-dimensional array given. Array must be at 
least two-dimensional
number of points 1
tensors[0:3] [VTKArray([[[ 8.34616375, -23.89611435, 2.00894117],
[ 0.67995167, -23.11237526, 289.07113647],
[ 27.26550674, -231.06710815, 16.90883636]]], dtype=float32)]


From this, I have thought about the vtk array.

Best regards,
Andrea

From: Cory Quammen [mailto:cory.quam...@kitware.com]
Sent: Wednesday, April 18, 2018 15:11
To: Caffagni, Andrea
Cc: paraview@public.kitware.com
Subject: Re: [Paraview] Problem with numpy array

Hi Andrea,

Besides the error message, what does your script print?

Thanks,
Cory


On Wed, Apr 18, 2018 at 2:14 AM, Caffagni, Andrea 
> wrote:
Dear Users,
I need to solve an eigenproblem in a point of a CFD field.
Using the GradientOfUnstructuredDataSet I calculate the velocity gradient of my 
velocity field, than I isolate may point of interest and I have written the 
following ProgrammableFilter:

import numpy as np
from numpy import linalg as LA
from paraview import numpy_support
input = inputs[0]

numPoints = input.GetNumberOfPoints()
print "number of points",numPoints
tensors = input.PointData['Gradients']
print "tensors[0:3]",tensors[0:3]
eigenvalues,eigenvectors = LA.eig(tensors)
print 'eigenvalues', eigenvalues[0]
print 'eigenvectors',eigenvectors[0]
output.PointData.append(eigenvalues,'eigenvalues')
output.PointData.append(eigenvectors,'eigenvectors')

I have obtained the following error message:

Traceback (most recent call last):
File "", line 22, in 
File "", line 14, in RequestData
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 1095, in eig
_assertRankAtLeast2(a)
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 202, in _assertRankAtLeast2
'at least two-dimensional' % len(a.shape))
numpy.linalg.linalg.LinAlgError: 0-dimensional array given. Array must be at 
least two-dimensional


I imagine that the problem is linked to the vtk array, I need to convert my 
‘Gradients’ matrix in a nparray?
Someone have the same problem?

Best Regards,
Andrea



_



Questo messaggio è da intendersi esclusivamente ad uso del destinatario e può 
contenere informazioni che sono di natura privilegiata, confidenziale o non 
divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non 
è il destinatario designato, o il dipendente/agente responsabile per la 
consegna del messaggio al destinatario designato, si informa che ogni 
disseminazione, distribuzione o copiatura di questa comunicazione è vietata 
anche ai sensi della normativa vigente in materia di protezione dei dati 
personali. Se avete ricevuto questo messaggio per errore, vi preghiamo di 
notificarcelo immediatamente a mezzo e-mail di risposta e successivamente di 
procedere alla cancellazione di questa e-mail e relativi allegati dal vostro 
sistema.

_



This message is intended only for the use of the addressee and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If the reader of this message is not the intended recipient, or 
the employee or agent responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is prohibited under the applicable data 
protection law. If you have received this e-mail by mistake, please notify us 
immediately by return e-mail and delete this e-mail and all attachments from 
your system.



_

___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview



--
Cory Quammen
Staff R 

Re: [Paraview] swap x and y axes in LineChartView from PlotOverLine

2018-04-18 Thread Sean McGovern

Hi Mathieu,

Perhaps - I believe so.

In the simplest sense, I would like to have my set of vectors displayed 
such that it would be as if the vectors shown in the "orginal..." 
screenshot were reflected across the line y=x. (or in other words to 
have the "axes swapped")


I'm not too sure what the "index" really is, I just mention that I have, 
through trial and error, managed to display *only 1* vector in my 
desired way. That was through manipulating the "use index for XAxis" 
toggle.


Thanks for your reply and I hope that my clarification is helpful.

I'm still pretty limited to using the GUI (I have traced for nice/simple 
macros), and I suspect that this would be a reasonable thing to do maybe 
through the python interface.


I appreciate your advice.

Best,

Sean


On 4/18/18 8:51 AM, Mathieu Westphal wrote:

Hi Sean,

Just to be sure I understand well, you would like to have the "index" 
as an Y Axis ?


Best,

Mathieu Westphal

On Tue, Apr 17, 2018 at 7:49 PM, Sean McGovern > wrote:


Hi all,

I am plotting a line over the middle of my domain. There are a
handful of vectors associated of interest, and I would like to see
in my LineChartView, the x and y axes swapped. I attach a
screenshot of how I see it now("original..")

("one_vector_displayed_as_desired")In "X axis parameters" in the
Properties of my PlotOverLine1, I have used the X Array Name to be
one of the vectors of interest and Points_Y as the only "Series
Parameter". This is the orientation that I would like, but this
way only works for one vector. I need to see the handful as I can
when the default "use index for XAxis" is on.

I would appreciate your help on getting the x and y axes swapped.

With many thanks,
Sean

___
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 

Search the list archives at:
http://markmail.org/search/?q=ParaView


Follow this link to subscribe/unsubscribe:
https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Failed to determine the LookupTable being used

2018-04-18 Thread Cory Quammen
Thomas,

Have a look at the wiki page on Python Scripting in ParaView:
https://www.paraview.org/Wiki/ParaView/Python_Scripting

Search for GetDataInformation if you want to jump right to interrogating
the data set, but the rest of the page is likely of interest as well.

For comprehensive documentation of Python functions, please see
https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/index.html.

Cheers,
Cory

On Wed, Apr 18, 2018 at 8:05 AM, Sgouros, Thomas 
wrote:

> Hi Cory:
>
> Thanks for the note. I tried putting in and removing the Hide, but it
> seems to have nothing to do with the issue. What does seem relevant is that
> I get this error when I ask for a contour that isn't feasible, though I'm
> not sure why the error comes where it does. Where can I find functions to
> use to interrogate the data set -- data types, variables, and ranges?
>
> Thank you,
>
>  -Tom
>
> On Tue, Apr 17, 2018 at 9:17 AM, Cory Quammen 
> wrote:
>
>> On Tue, Apr 17, 2018 at 8:52 AM, Sgouros, Thomas <
>> thomas_sgou...@brown.edu> wrote:
>>
>>> Hello all:
>>>
>>> I have a trace from a simple contour that I drew on a data set, and
>>> there are parts of it that I don't understand. Here it is, with some
>>> question numbers:
>>>
>>> from paraview.simple import *
>>>
>>> data = EnSightReader(CaseFileName='/my/data/file.case')
>>>
>>> renderView1 = GetActiveViewOrCreate('RenderView')
>>> dataDisplay = Show(data, renderView1)## 1
>>>
>>> dataDisplay.Representation = 'Surface'
>>> renderView1.ResetCamera()
>>> dataDisplay.SetScalarBarVisibility(renderView1, True)
>>> renderView1.Update()
>>>
>>> pressureLUT = GetColorTransferFunction('pressure')  ## 2
>>> contour1 = Contour(Input=data)
>>>
>>> contour1.ContourBy = ['POINTS', 'uds_0_scalar']
>>> contour1.Isosurfaces = [500.0]
>>>
>>> contour1Display = Show(contour1, renderView1)
>>> contour1Display.Representation = 'Surface'
>>> Hide(data, renderView1)
>>>
>>> contour1Display.SetScalarBarVisibility(renderView1, True) ## 3
>>> renderView1.Update()
>>>
>>>
>>> My questions:
>>>
>>>  1. Why do I have to "Show" the raw data right after it's read? I almost
>>> never actually want to do that. I just want to show the contour. Showing
>>> and Hiding the raw data seems like a waste of cycles, but when I remove
>>> references to dataDisplay, I get an error: "Failed to determine the
>>> LookupTable being used." which seems oddly unrelated to what I did.
>>>
>>
>> Show() sets up the representation for the data you have loaded. I suspect
>> you are getting the LookupTable error message if you retain the "Hide(data,
>> renderView1)" call because it is expecting to find representation state for
>> "data" that you have not set up with "Show()" and it cannot find it. Try
>> removing the "Hide()" and see if you still see the error.
>>
>>
>>>  2. Where does this value get used? It doesn't seem to me that it is
>>> being used, but it seems related to the last and the next question:
>>>
>>
>> I assume you mean the "dataDisplay" variable. It is not used in your
>> script directly, but you could set representation properties later on,
>> which is why the tracing function defines it. Tracing is pretty awesome,
>> but it doesn't do anything as fancy as analyzing the resulting trace to
>> remove unused variables, for instance.
>>
>>
>>>  3. When I choose different scalar values to contour, I often see the
>>> same "Failed to determine the LookupTable being used." here. There seem to
>>> be some limitations on what scalars I can use, but what are they and where
>>> can I read more about these missing lookup tables?
>>>
>>
>> See if my answer to 1 solves the problem. If not, do you see this when
>> you are coloring by the same array as the array for the lookup table? If
>> so, you should call "contour1.ComputeScalars = 1". This will tell the
>> contour filter to produce a scalar array corresponding to the array by
>> which you contoured. It will contain only the isovalues, which is why it is
>> off by default.
>>
>> Thanks
>> Cory
>>
>>
>>>
>>> Thank you,
>>>
>>>  -Tom
>>>
>>>
>>>
>>>
>>> ___
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> https://public.kitware.com/mailman/listinfo/paraview
>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> Staff R Engineer
>> Kitware, Inc.
>>
>
>


-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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: 

Re: [Paraview] Custom Filter with Input to pipe to Programmable Filter

2018-04-18 Thread Cory Quammen
On Wed, Apr 18, 2018 at 8:21 AM, David E DeMarle 
wrote:

> good news:
> programmable source/filter has a property called Parameters that lets you
> pass in arbitrary values.
> See an example of its use in the standard benchmark here:
> https://gitlab.kitware.com/paraview/paraview/blob/master/Wra
> pping/Python/paraview/benchmark/manyspheres.py#L168
>
> bad news:
> To my knowledge we have never exposed that property to the end user in the
> Qt parts of the GUI. If someone can provide a good example of a qt plugin
> or otherwise that exposes parameters to the end user, please advise on this
> thread.
>

You can do what is described in this blog post to package your programmable
source nicely with modifiable attributes. See https://blog.kitware.com/e
asy-customization-of-the-paraview-python-programmable-filter-property-panel/
for details (it is 5 years old, but still applicable to ParaView 5.5).

You may also be interested in this project by Shuhao Wu on GitHub:
https://github.com/shuhaowu/pvpyfilter. I haven't used it yet, but it looks
handy.

Thanks,
Cory


>
> David E DeMarle
> Kitware, Inc.
> Principal Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
> On Wed, Apr 18, 2018 at 4:41 AM, Arno Mayrhofer <
> arno.mayrho...@dcs-computing.com> wrote:
>
>> Hi all,
>>
>> I have made a small Programmable Filter that converts my input data. Now
>> I have one parameter (resolution) that I would like to be modifiable by the
>> user. My script currently looks as follows:
>>
>> resolution = 20
>> val = {'resolution': resolution, 'self': self}
>>
>> execfile('/path/to/filter.py', val)
>>
>>
>> Ideally I want my users to not have to replace the 20 by whatever value
>> they desire, but instead make a Custom Filter with either a text input
>> field or a slider that will pipe its value to the Programmable Filter. Is
>> something like this possible at all?
>>
>> Thanks in advance for your help,
>> Arno
>>
>>
>> ___
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
>


-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Problem with numpy array

2018-04-18 Thread Cory Quammen
Hi Andrea,

Besides the error message, what does your script print?

Thanks,
Cory


On Wed, Apr 18, 2018 at 2:14 AM, Caffagni, Andrea <
andrea.caffa...@ferrari.com> wrote:

> Dear Users,
>
> I need to solve an eigenproblem in a point of a CFD field.
>
> Using the GradientOfUnstructuredDataSet I calculate the velocity gradient
> of my velocity field, than I isolate may point of interest and I have
> written the following ProgrammableFilter:
>
>
>
> *import* *numpy* *as* *np*
>
> *from* *numpy* *import* linalg *as* LA
>
> *from* *paraview* *import* numpy_support
>
> input = inputs[0]
>
>
>
> numPoints = input.GetNumberOfPoints()
>
> *print* "number of points",numPoints
>
> tensors = input.PointData['Gradients']
>
> *print* "tensors[0:3]",tensors[0:3]
>
> eigenvalues,eigenvectors = LA.eig(tensors)
>
> *print* 'eigenvalues', eigenvalues[0]
>
> *print* 'eigenvectors',eigenvectors[0]
>
> output.PointData.append(eigenvalues,'eigenvalues')
>
> output.PointData.append(eigenvectors,'eigenvectors')
>
>
>
> I have obtained the following error message:
>
>
>
> Traceback (most recent call last):
>
> File "", line 22, in 
>
> File "", line 14, in RequestData
>
> File "C:\Program Files\ParaView 5.3.0-Qt5-OpenGL2-Windows-
> 64bit\bin\lib\site-packages\numpy\linalg\linalg.py", line 1095, in eig
>
> _assertRankAtLeast2(a)
>
> File "C:\Program Files\ParaView 5.3.0-Qt5-OpenGL2-Windows-
> 64bit\bin\lib\site-packages\numpy\linalg\linalg.py", line 202, in
> _assertRankAtLeast2
>
> 'at least two-dimensional' % len(a.shape))
>
> numpy.linalg.linalg.LinAlgError: 0-dimensional array given. Array must be
> at least two-dimensional
>
>
>
>
>
> I imagine that the problem is linked to the vtk array, I need to convert
> my ‘Gradients’ matrix in a nparray?
>
> Someone have the same problem?
>
>
>
> Best Regards,
>
> Andrea
>
>
>
>
>
> 
> _
>
>
>
> Questo messaggio è da intendersi esclusivamente ad uso del destinatario e
> può contenere informazioni che sono di natura privilegiata, confidenziale o
> non divulgabile secondo le leggi vigenti. Se il lettore del presente
> messaggio non è il destinatario designato, o il dipendente/agente
> responsabile per la consegna del messaggio al destinatario designato, si
> informa che ogni disseminazione, distribuzione o copiatura di questa
> comunicazione è vietata anche ai sensi della normativa vigente in materia
> di protezione dei dati personali. Se avete ricevuto questo messaggio per
> errore, vi preghiamo di notificarcelo immediatamente a mezzo e-mail di
> risposta e successivamente di procedere alla cancellazione di questa e-mail
> e relativi allegati dal vostro sistema.
>
> 
> _
>
>
>
> This message is intended only for the use of the addressee and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law. If the reader of this message is not the intended
> recipient, or the employee or agent responsible for delivering the message
> to the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is prohibited under the
> applicable data protection law. If you have received this e-mail by
> mistake, please notify us immediately by return e-mail and delete this
> e-mail and all attachments from your system.
>
>
>
> 
> _
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
>


-- 
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Custom Filter with Input to pipe to Programmable Filter

2018-04-18 Thread David E DeMarle
good news:
programmable source/filter has a property called Parameters that lets you
pass in arbitrary values.
See an example of its use in the standard benchmark here:
https://gitlab.kitware.com/paraview/paraview/blob/master/
Wrapping/Python/paraview/benchmark/manyspheres.py#L168

bad news:
To my knowledge we have never exposed that property to the end user in the
Qt parts of the GUI. If someone can provide a good example of a qt plugin
or otherwise that exposes parameters to the end user, please advise on this
thread.

David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Wed, Apr 18, 2018 at 4:41 AM, Arno Mayrhofer <
arno.mayrho...@dcs-computing.com> wrote:

> Hi all,
>
> I have made a small Programmable Filter that converts my input data. Now I
> have one parameter (resolution) that I would like to be modifiable by the
> user. My script currently looks as follows:
>
> resolution = 20
> val = {'resolution': resolution, 'self': self}
>
> execfile('/path/to/filter.py', val)
>
>
> Ideally I want my users to not have to replace the 20 by whatever value
> they desire, but instead make a Custom Filter with either a text input
> field or a slider that will pipe its value to the Programmable Filter. Is
> something like this possible at all?
>
> Thanks in advance for your help,
> Arno
>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] swap x and y axes in LineChartView from PlotOverLine

2018-04-18 Thread Mathieu Westphal
Hi Sean,

Just to be sure I understand well, you would like to have the "index" as an
Y Axis ?

Best,

Mathieu Westphal

On Tue, Apr 17, 2018 at 7:49 PM, Sean McGovern  wrote:

> Hi all,
>
> I am plotting a line over the middle of my domain. There are a handful of
> vectors associated of interest, and I would like to see in my
> LineChartView, the x and y axes swapped. I attach a screenshot of how I see
> it now("original..")
>
> ("one_vector_displayed_as_desired")In "X axis parameters" in the
> Properties of my PlotOverLine1, I have used the X Array Name to be one of
> the vectors of interest and Points_Y as the only "Series Parameter". This
> is the orientation that I would like, but this way only works for one
> vector. I need to see the handful as I can when the default "use index for
> XAxis" is on.
>
> I would appreciate your help on getting the x and y axes swapped.
>
> With many thanks,
> Sean
>
> ___
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] Problem with numpy array

2018-04-18 Thread Caffagni, Andrea
Dear Users,
I need to solve an eigenproblem in a point of a CFD field.
Using the GradientOfUnstructuredDataSet I calculate the velocity gradient of my 
velocity field, than I isolate may point of interest and I have written the 
following ProgrammableFilter:

import numpy as np
from numpy import linalg as LA
from paraview import numpy_support
input = inputs[0]

numPoints = input.GetNumberOfPoints()
print "number of points",numPoints
tensors = input.PointData['Gradients']
print "tensors[0:3]",tensors[0:3]
eigenvalues,eigenvectors = LA.eig(tensors)
print 'eigenvalues', eigenvalues[0]
print 'eigenvectors',eigenvectors[0]
output.PointData.append(eigenvalues,'eigenvalues')
output.PointData.append(eigenvectors,'eigenvectors')

I have obtained the following error message:

Traceback (most recent call last):
File "", line 22, in 
File "", line 14, in RequestData
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 1095, in eig
_assertRankAtLeast2(a)
File "C:\Program Files\ParaView 
5.3.0-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\numpy\linalg\linalg.py", 
line 202, in _assertRankAtLeast2
'at least two-dimensional' % len(a.shape))
numpy.linalg.linalg.LinAlgError: 0-dimensional array given. Array must be at 
least two-dimensional


I imagine that the problem is linked to the vtk array, I need to convert my 
‘Gradients’ matrix in a nparray?
Someone have the same problem?

Best Regards,
Andrea



_



Questo messaggio è da intendersi esclusivamente ad uso del destinatario e può 
contenere informazioni che sono di natura privilegiata, confidenziale o non 
divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non 
è il destinatario designato, o il dipendente/agente responsabile per la 
consegna del messaggio al destinatario designato, si informa che ogni 
disseminazione, distribuzione o copiatura di questa comunicazione è vietata 
anche ai sensi della normativa vigente in materia di protezione dei dati 
personali. Se avete ricevuto questo messaggio per errore, vi preghiamo di 
notificarcelo immediatamente a mezzo e-mail di risposta e successivamente di 
procedere alla cancellazione di questa e-mail e relativi allegati dal vostro 
sistema.

_



This message is intended only for the use of the addressee and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If the reader of this message is not the intended recipient, or 
the employee or agent responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is prohibited under the applicable data 
protection law. If you have received this e-mail by mistake, please notify us 
immediately by return e-mail and delete this e-mail and all attachments from 
your system.



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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview