<br><font size=2 face="sans-serif">Ah yes,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; This is the sort of approach
I was initially hoping to get implemented. &nbsp;However I am still really
stuck on how to implement some of those details.</font>
<br>
<br><font size=2 face="sans-serif">A couple questions I am still trying
to hammer out specifically:</font>
<br><font size=2 face="sans-serif">&nbsp; - You say &quot;create a RequestData
function&quot;; by this do you mean the 'RequestInformation Script' field
inside of a ParaView ProgrammableFilter?</font>
<br><font size=2 face="sans-serif">&nbsp; - I have searched for longer
than probably is justified for this already....where does Python have access
to an UPDATE_TIME field?</font>
<br><font size=2 face="sans-serif">&nbsp; - How do I place the Python script
in a way that it is evaluated every single time the ParaView UI updates
it's own timestep - otherwise the filter won't update during an animation
tick</font>
<br>
<br><font size=2 face="sans-serif">I appreciate the response - if you have
any additional thoughts on this I'd love to hear about them in further
detail.</font>
<br>
<br><font size=2 face="sans-serif">Best wishes!</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp;-Another John</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">&quot;Biddiscombe, John A.&quot; &lt;biddisco@cscs.ch&gt;</font>
<br>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">John CTR Mick/ACT/CNTR/FAA@FAA, &quot;paraview@paraview.org&quot;
&lt;paraview@paraview.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">03/22/2012 04:57 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">RE: [Paraview] Assistance/Suggestion
With Animating Relatively Small Datasets Over Many Timesteps</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 color=#004080 face="Calibri">I would stick to the CSV
file if you&#8217;ve got all the information you need inside it</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">&#8230; but instead of using a
table to points filter, create your own custom filter which takes the CSV
table as input, and outputs just a small polydata object which has the
current positions (+scalars) encoded for the given time.</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">All you need to do is create
a RequestData function which looks at UPDATE_TIME, and fetches the corresponding
rows/columns for each planet/point for that time and adds them to the output.</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">For added fun, you can export
a multi-block dataset, and/or have a treeview which allows you to enable/disable
certain planets/points. This way you can</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">Reader -&gt; ExtractPlanetFilter1
-&gt;Render (use textureA)</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ExtractPlanetFilter2-&gt;Render
(use tectureB)</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">[Or other combinations with
ExtractBlockFilter if you use multiblock ].</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">The Reader would simply subclass
polydataalgorithm, but take a vtkTable as input. Couple of hours work is
all you&#8217;d need and you can leave the data in its current form.</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">$0.02</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">JB</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 color=#004080 face="Calibri">&nbsp;</font>
<br><font size=2 face="Tahoma"><b>From:</b> paraview-bounces@paraview.org
[</font><a href="mailto:paraview-bounces@paraview.org"><font size=2 face="Tahoma">mailto:paraview-bounces@paraview.org</font></a><font size=2 face="Tahoma">]
<b>On Behalf Of </b>John.CTR.Mick@faa.gov<b><br>
Sent:</b> 22 March 2012 17:13<b><br>
To:</b> paraview@paraview.org<b><br>
Subject:</b> [Paraview] Assistance/Suggestion With Animating Relatively
Small Datasets Over Many Timesteps</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 face="Arial"><br>
 &nbsp; &nbsp; This is my first experience posting to the ParaView Mailing
List; as well as my first project I am exploring with ParaView. &nbsp;I
hope I am posting this question to the correct audience.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
 &nbsp; &nbsp; I am attempting to create an animation of our Solar System
- at an extremely high update interval - perhaps plotting the position
and velocity of significant solar system bodies over 165 Earth years at</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
a one day interval. &nbsp;Initially I thought I would be able to work with
CSV files to define a dataset which includes time, positional coordinates,
and velocity vectors. &nbsp;While testing this approach I managed to use
the TableToPoints filter to create a visualization of a sample dataset;
but I was not able to sequence over the individual timesteps. &nbsp;So
in effect you see all the positions a particular planet was at for the
entire duration of the dataset.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
I created a video of this test and made it available online:</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
 &nbsp; &nbsp; </font><a href="http://www.youtube.com/watch?v=XLPxx-2Zc9Q"><font size=3 color=blue face="Times New Roman"><u>http://www.youtube.com/watch?v=XLPxx-2Zc9Q</u></font></a><font size=3 face="Times New Roman">
<br>
<br>
 &nbsp; &nbsp; Next I thought perhaps the CSV format was a little too general
for what I needed, so I read the VTK file format document and migrated
over to the XML VTK format. &nbsp;It seems like there is no way to define
time sequenced data natively within the file format itself? &nbsp;ParaView
expects the user to break the timesteps into individual files - with a
numeric indicator in the filename to define the sequence. &nbsp;If I were
to take this approach, I could be looking at creating nearly 500,000 individual
files to represent the entire duration of time I'm interested in plotting.
&nbsp;I feel like there must be a better way to do this. <br>
<br>
 &nbsp; &nbsp; As a small improvement I thought I could at least combine
all of the unique solar system bodies (Earth, Sun, etc.), into a single
timestep file such as this: <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(filename: timeseries_2455562.vtu) <br>
</font><font size=2 face="Lucida Console"><br>
&lt;?xml version=&quot;1.0&quot;?&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
&lt;VTKFile type=&quot;UnstructuredGrid&quot; version=&quot;0.1&quot; byte_order=&quot;LittleEndian&quot;
compressor=&quot;vtkZLibDataCompressor&quot;&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp;&lt;UnstructuredGrid&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp;&lt;Piece NumberOfPoints=&quot;2&quot; NumberOfCells=&quot;2&quot;&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;PointData Vectors=&quot;Velocity&quot; Scalars=&quot;Radius&quot;&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;Time&quot; type=&quot;Float32&quot;
format=&quot;ascii&quot;&gt;2455562 2455562&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;Radius&quot; type=&quot;Float32&quot;
format=&quot;ascii&quot;&gt;6371 696000&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;Velocity&quot; type=&quot;Float32&quot;
NumberOfComponents=&quot;3&quot; format=&quot;ascii&quot;&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-2.982651603443954E+01 -5.304542013817379E+00
-7.226846229160870E-04</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 0 0</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;/PointData&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;Points&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray type=&quot;Float32&quot; NumberOfComponents=&quot;3&quot;
format=&quot;ascii&quot;&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-2.567030301930377E+07 1.448508985971261E+08
-3.607762965630511E+03</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 0 0</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;/Points&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;Cells&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;connectivity&quot;
type=&quot;Int32&quot; format=&quot;ascii&quot;&gt;0 1&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;offsets&quot; type=&quot;Int32&quot;
format=&quot;ascii&quot;&gt;1 2&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataArray Name=&quot;types&quot; type=&quot;UInt8&quot;
format=&quot;ascii&quot;&gt;1 1&lt;/DataArray&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp; &nbsp;&lt;/Cells&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp; &nbsp;&lt;/Piece&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
 &nbsp;&lt;/UnstructuredGrid&gt;</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
&lt;/VTKFile&gt;</font><font size=3 face="Times New Roman"> <br>
<br>
The idea of this approach was to list all of the scalars and vectors for
each corresponding body in a single file. &nbsp;In this example the first
listed scalar, vector, or coordinate point, is the Earth while the second
set of values indicates the Sun's data. &nbsp;By combining the bodies into
a single file I could reduce the 500,000 files required down to some 60,000
files....still undesirable but better. <br>
<br>
However I would also like to segment the Points once inside the ParaView
environment; so I can create a distinct pipeline for each body in the dataset.
&nbsp;One application for this would be to allow different Glyph rendering
rules for the Sun and the Earth so I can make the Sun...have a Sun texture
- and the Earth an Earth texture. &nbsp; <br>
<br>
After experimenting with this for awhile I found myself trying to implement
a Programmable Filter. &nbsp;The filter would take the Unstructured Grid
for the given timestep, and given an index, extract the Point, Scalar,
and Vector data from its input - then set only those values to the Output
Unstructured Grid. &nbsp;I currently have a script that looks something
like this: <br>
</font><font size=2 face="Lucida Console"><br>
# CELLID 0 = EARTH</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
cellId = 0</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="Lucida Console"><br>
# Obtain References To Input/Output Data</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
gridI = self.GetUnstructuredGridInput()</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
gridO = self.GetUnstructuredGridOutput()</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
dataI = self.GetInput()</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
dataO = self.GetOutput()</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
scalarI = dataI.GetPointData().GetScalars()</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
vectorI = dataI.GetPointData().GetVectors()</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Initialize Local Storage Arrays</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newVector = vtk.vtkFloatArray()</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newVector.SetName(vectorI.GetName())</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newVector.SetNumberOfComponents(3)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newScalar = vtk.vtkFloatArray()</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newScalar.SetName(scalarI.GetName())</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newPoint = vtk.vtkPoints()</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
newPoint.SetNumberOfPoints(1)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newCell = vtk.vtkCellArray()</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Lookup CellId References</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
idCell = gridI.GetCell(cellId)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
idCellType = gridI.GetCellType(cellId)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
idPoint = gridI.GetPoints().GetPoint(cellId)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
idScalar = scalarI.GetTuple(cellId)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
idVector = vectorI.GetTuple(cellId)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Populate New Local Cell Array with CellId Cell</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newCell.InsertNextCell(idCell)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Populate New Local Point Array With CellId Point</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newPoint.SetPoint(0, idPoint)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Populate New Local Scalars with CellId Scalar Tuples</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newScalar.InsertNextTuple(idScalar)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Populate New Local Vectors with CellID Vector Tuples</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
newVector.InsertNextTuple(idVector)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Lucida Console"><br>
# Copy Local Cells, Scalars, Vectors, and Points Into Output Pipeline Data</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
gridO.SetPoints(newPoint)</font><font size=3 face="Times New Roman"> </font><font size=2 face="Lucida Console"><br>
gridO.SetCells(idCellType, newCell)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
dataO.GetPointData().SetScalars(newScalar)</font><font size=3 face="Times New Roman">
</font><font size=2 face="Lucida Console"><br>
dataO.GetPointData().SetVectors(newVector)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
The filter does achieve the desired effect for the cellID 0 - but when
I switch the value of cellID to 1 (which should refer to the Sun's index)
ParaView crashes hard - where I assume I am missing something, possibly
requesting something out of bounds in memory.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
I've been struggling with this problem for a little while now and thought
to share my progress here; hopefully there is somebody out there with a
little more insight that could help guide me towards either a conclusion
with this implementation or a suggestion for a better approach.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
Essentially - How can one give ParaView Point and Velocity vectors over
a vast sequence of time without creating potentially hundreds of thousands
of files on disc? &nbsp;Does this Programmable Filter seem like a reasonable
approach? &nbsp;Is there a native feature I am missing that does this already?
&nbsp;Is there some other file format other than VTK I could use to have
ParaView understand this format of data?</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
Any thoughts, comments, or questions will be greatly appreciated. &nbsp;:)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="Arial"><br>
Thanks,</font><font size=3 face="Times New Roman"> </font><font size=2 face="Arial"><br>
 &nbsp; &nbsp; John</font><font size=3 face="Times New Roman"> </font>
<br>
<br>