<div dir="ltr"><div><div>Hi developers,<br><br></div>I want to use pvbatch and python scripting to visualize a specific region of data (similar to slice filter).<br><br></div><div>When I consider using slice filter as follows for the selected region, the saved animation shows the slice values only for the first timestep. Is it related to "getanimationtrack()"? If yes, please let me know how to define it to get the slice data animation of all timesteps.<br></div><div><br><div style="margin-left:40px">data.MeshRegions=['internalMesh']<br>data.CellArrays=['T']<br></div><div style="margin-left:40px">#considering bounds of data as selection region<br></div><div style="margin-left:40px">(xmin,xmax,ymin,ymax,zmin,zmax)=di.GetBounds()<br>selectionRegion=[(xmax-abs(xmin))/2,(ymax-abs(ymin))/2,(zmax-abs(zmin))/2]<br># create a new 'Slice'<br>slice1 = paraview.simple.Slice(Input=data)<br>slice1.SliceType = 'Plane'<br><br># init the 'Plane' selected for 'SliceType'<br>slice1.SliceType.Origin =selectionRegion<br>slice1.SliceType.Normal = [1.0, 0.0, 0.0]<br><br>slice1Display = Show(slice1, renderView1)<br>slice1Display.ColorArrayName = ['CELLS', 'T']<br><br>SetActiveSource(slice1)<br>Hide(data, renderView1)<br>renderView1.ResetCamera()<br><br>animationScene1 = GetAnimationScene()<br><br>animationScene1.UpdateAnimationUsingDataTimeSteps()<br><br>animationScene1.Play()<br><br>WriteAnimation('/OpenData/test.tiff', Magnification=1, FrameRate=5.0, Compression=True)<br></div><br></div><div>Also I like to know if there is a more general approach to select and visualize the specific cells (cell data array like "T") inside the selection region (to get the animation of cell data similar to slice output). <br></div><div>I look for a way to extract cells inside the selection region  based on possible application of bounds of each cell and finding their relation to the bounds of selection region. Is there any specific method for defining this type of selection or should be implemented?<br><br><div style="margin-left:40px">dataBlock=paraview.simple.MergeBlocks(data)<br>dataFetch = paraview.servermanager.Fetch(dataBlock)<br>for i in range(dataFetch.GetCellData().GetArray("T").GetSize()):<br></div><div style="margin-left:40px"><div style="margin-left:40px">print str(dataFetch.GetCell(i).GetBounds())<br></div></div><br></div><div>Final question is that how can I find python wrapper source of openfoamreader? (couldn't check out the definition of data descriptors such as "Meshregions" in "vtkOpenFOAMReader.cxx")<br><br></div><div>Best,<br></div><div>Sanaz<br></div></div>