[Paraview] Dynamic colouring of the geometry in the animation, of warped eigenmodes

2017-08-08 Thread Juha Kortelainen

Hello all,

Thank you, Cory and Ken, for your answers. The trick with the Calculator 
and WarpByVector filters was what I was originally looking for as a 
quick solution, but when I tried some examples with the Programmable 
filter, I found it a very useful way to implement filters for relatively 
simple and light data processing. Though, I still need to study more 
about the details to make my Programmable filter to really work for my case.


- Juha -



Juha,

As Cory said you can create a plugin to replicate this behavior, but I believe 
you can also get similar behavior through a collection of filters. Although 
this is a bit cumbersome, you can try the following steps:

1. Before applying the WarpByVector filter, add the Calculator filter to your data. Set the "Result 
Array Name" to "OriginalCoords" and the expression to simply "coords". This will 
capture the point coordinates before warping.
2. Apply WarpByVector to this calculator filter as you did before to the FEM 
data.
3. Apply another Calculator filter to the output of WarpByVector. This time, set the "Result Array 
Name" to "ActualDisplacement" and the expression to "coords-OriginalCoords". This 
will capture the actual displacement applied after the scale factor is used.
4. Color your data by the "ActualDispalcement" field.
5. Set up your animation of the "ScaleFactor" for the WarpByVector filter as 
you did before.

You should now see "dynamic" colors based on the magnitude of the actual 
displacement.

-Ken

-Original Message-
From: ParaView [mailto:paraview-bounces at paraview.org 
] On Behalf Of Cory Quammen

Sent: Monday, August 7, 2017 7:27 AM
To: Juha Kortelainen >
Cc: ParaView >

Subject: [EXTERNAL] Re: [Paraview] Dynamic colouring of the geometry in the 
animation of warped eigenmodes

On Sun, Aug 6, 2017 at 1:30 PM, Juha Kortelainen > wrote:
/Hi all, />//>/I’m using the warp filter to visualise the computed eigenmodes of a />/structure (computed using a FEM code). Animating the eigenmodes works />/fine with the WarpByVector filter using the ScalarFactor as the />/animation variable. In addition to animating the deformation of the />/structure, I would like to apply colouring of the deformation vector />/field on the geometry so that the colour would change dynamically />/according to the magnitude of deformation during the animation. This />/can be done with the Salome platform’s ParaViS modile (a modified />/version of ParaView), which has an additional ScaleVector filter to do />/the colouring trick. Can this dynamic colouring be done with standard 

ParaView and if so, how is it done? /
Yes, with some work. Take a look at this blog post for the general
idea:https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/

Basically, you can create XML plugins based on the Programmable Filter that 
feature some properties, such as a scale factor. The scale factor property 
should be exposed in the animation controls. Within your Programmable Filter 
script, you can perform the scaling of the vector with that scale factor 
property value. There are many examples of Python scripts for the Programmable 
Filter in Section 13.3 the ParaView Guide to get you started.

HTH,
Cory


//>/___ />/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 />/J />/Search the list archives at: 
http://markmail.org/search/?q=ParaView />//>/Follow this link to subscribe/unsubscribe: 
/>/http://public.kitware.com/mailman/listinfo/paraview />//

--
Cory Quammen
Staff R Engineer
Kitware, Inc.
___
Powered bywww.kitware.com

Visit other Kitware open-source projects 
athttp://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:
http://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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Dynamic colouring of the geometry in the animation of warped eigenmodes

2017-08-07 Thread Moreland, Kenneth
Juha,

As Cory said you can create a plugin to replicate this behavior, but I believe 
you can also get similar behavior through a collection of filters. Although 
this is a bit cumbersome, you can try the following steps:

1. Before applying the WarpByVector filter, add the Calculator filter to your 
data. Set the "Result Array Name" to "OriginalCoords" and the expression to 
simply "coords". This will capture the point coordinates before warping.
2. Apply WarpByVector to this calculator filter as you did before to the FEM 
data.
3. Apply another Calculator filter to the output of WarpByVector. This time, 
set the "Result Array Name" to "ActualDisplacement" and the expression to 
"coords-OriginalCoords". This will capture the actual displacement applied 
after the scale factor is used.
4. Color your data by the "ActualDispalcement" field.
5. Set up your animation of the "ScaleFactor" for the WarpByVector filter as 
you did before.

You should now see "dynamic" colors based on the magnitude of the actual 
displacement.

-Ken

-Original Message-
From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of Cory Quammen
Sent: Monday, August 7, 2017 7:27 AM
To: Juha Kortelainen 
Cc: ParaView 
Subject: [EXTERNAL] Re: [Paraview] Dynamic colouring of the geometry in the 
animation of warped eigenmodes

On Sun, Aug 6, 2017 at 1:30 PM, Juha Kortelainen  
wrote:
> Hi all,
>
> I’m using the warp filter to visualise the computed eigenmodes of a 
> structure (computed using a FEM code). Animating the eigenmodes works 
> fine with the WarpByVector filter using the ScalarFactor as the 
> animation variable. In addition to animating the deformation of the 
> structure, I would like to apply colouring of the deformation vector 
> field on the geometry so that the colour would change dynamically 
> according to the magnitude of deformation during the animation. This 
> can be done with the Salome platform’s ParaViS modile (a modified 
> version of ParaView), which has an additional ScaleVector filter to do 
> the colouring trick. Can this dynamic colouring be done with standard 
> ParaView and if so, how is it done?

Yes, with some work. Take a look at this blog post for the general
idea: 
https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/

Basically, you can create XML plugins based on the Programmable Filter that 
feature some properties, such as a scale factor. The scale factor property 
should be exposed in the animation controls. Within your Programmable Filter 
script, you can perform the scaling of the vector with that scale factor 
property value. There are many examples of Python scripts for the Programmable 
Filter in Section 13.3 the ParaView Guide to get you started.

HTH,
Cory

>
> ___
> 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
>J
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://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:
http://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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Dynamic colouring of the geometry in the animation of warped eigenmodes

2017-08-07 Thread Cory Quammen
On Sun, Aug 6, 2017 at 1:30 PM, Juha Kortelainen
 wrote:
> Hi all,
>
> I’m using the warp filter to visualise the computed eigenmodes of a
> structure (computed using a FEM code). Animating the eigenmodes works fine
> with the WarpByVector filter using the ScalarFactor as the animation
> variable. In addition to animating the deformation of the structure, I would
> like to apply colouring of the deformation vector field on the geometry so
> that the colour would change dynamically according to the magnitude of
> deformation during the animation. This can be done with the Salome
> platform’s ParaViS modile (a modified version of ParaView), which has an
> additional ScaleVector filter to do the colouring trick. Can this dynamic
> colouring be done with standard ParaView and if so, how is it done?

Yes, with some work. Take a look at this blog post for the general
idea: 
https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/

Basically, you can create XML plugins based on the Programmable Filter
that feature some properties, such as a scale factor. The scale factor
property should be exposed in the animation controls. Within your
Programmable Filter script, you can perform the scaling of the vector
with that scale factor property value. There are many examples of
Python scripts for the Programmable Filter in Section 13.3 the
ParaView Guide to get you started.

HTH,
Cory

>
> ___
> 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:
> http://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:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Dynamic colouring of the geometry in the animation of warped eigenmodes

2017-08-06 Thread Juha Kortelainen

Hi all,

I’m using the warp filter to visualise the computed eigenmodes of a 
structure (computed using a FEM code). Animating the eigenmodes works 
fine with the WarpByVector filter using the ScalarFactor as the 
animation variable. In addition to animating the deformation of the 
structure, I would like to apply colouring of the deformation vector 
field on the geometry so that the colour would change dynamically 
according to the magnitude of deformation during the animation. This can 
be done with the Salome platform’s ParaViS modile (a modified version of 
ParaView), which has an additional ScaleVector filter to do the 
colouring trick. Can this dynamic colouring be done with standard 
ParaView and if so, how is it done?


- Juha -

___
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:
http://public.kitware.com/mailman/listinfo/paraview