This can be done using python. Attached is a example python script
that you can import in the "Python Shell". It adds an observer to
listen to even "tick" event from the animation and then does the
necessary updates. There was a bug in the CVS (and 3.6 etc) that is
now fixed. Attached is a patch for that change as well, without which
the script won't work.

Utkarsh

On Mon, Feb 22, 2010 at 1:10 PM, Gowri Somanath <[email protected]> wrote:
> Hi
> I have time series data. I want to isosurface the data with different value
> for each time step - but not those in the animation which linearly
> interpolates the isosurface value over time.
> I want to isosurface based on max-min of the data at each time step.
> How would i do it?
> thanks
> Gowri
> _______________________________________________
> 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
>
>
from paraview.simple import *

def GetTimeTrack():
  proxy_map = servermanager.ProxyManager().GetProxiesInGroup("animation")
  for proxy in proxy_map.values():
    if isinstance(proxy, servermanager.animation.TimeAnimationCue):
      return proxy
  return None

def AnimationCallback(vtkobject, event):
  contour = FindSource("Contour1")
  if not contour:
    print "Failed to locate contour filter"
    return
  pInfo = contour.Input.GetPointDataInformation()

  # get the arrayname from the contour filter.
  arrayName = contour.ContourBy.GetData()[1]
  arrayInfo = pInfo.GetArray(arrayName)
  data_range = arrayInfo.GetRange()
  contour.Isosurfaces = [(data_range[0] + data_range[1])/2.0]

  
track = GetTimeTrack()
track.AddObserver("AnimationCueTickEvent",
      AnimationCallback)





Index: Servers/ServerManager/vtkSMTimeAnimationCueProxy.cxx
===================================================================
RCS file: /cvsroot/ParaView3/ParaView3/Servers/ServerManager/vtkSMTimeAnimationCueProxy.cxx,v
retrieving revision 1.1
diff -u -3 -p -r1.1 vtkSMTimeAnimationCueProxy.cxx
--- Servers/ServerManager/vtkSMTimeAnimationCueProxy.cxx	13 Aug 2007 19:09:24 -0000	1.1
+++ Servers/ServerManager/vtkSMTimeAnimationCueProxy.cxx	25 Feb 2010 14:38:30 -0000
@@ -51,6 +51,7 @@ void vtkSMTimeAnimationCueProxy::TickInt
       {
       proxy->UpdateVTKObjects();
       }
+    this->InvokeEvent(vtkCommand::AnimationCueTickEvent, info);
     }
   else
     {
_______________________________________________
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

Reply via email to