[Paraview] Assistance/Suggestion With Animating Relatively Small Datasets Over Many Timesteps

John.CTR.Mick at faa.gov John.CTR.Mick at faa.gov
Thu Mar 22 16:01:10 EDT 2012


Samuel,
     Ah yes - I was hoping that another file format could make this 
process much easier.  I started looking a little at the file you provided 
me - though I don't have much time at the moment to dig too deeply into 
this - I wanted to send a quick thank-you for your response.  The storage 
schema presented by EnSight seems like it will dramatically reduce the 
number of files, and storage requirements. 

     In your reply you mentioned attaching a "copy of the EnSight format 
document".  I did not see this in the e-mail, though I did find this:
          
http://www-vis.lbl.gov/NERSC/Software/ensight/doc/OnlineHelp/UM-C11.pdf 
Is this the correct format document I should be referring to?  If so - do 
you recommend a particular casefile format to examine?  This document 
appears to cover several: EnSight Gold, EnSight6, and EnSight5. 

     My next step will be to decipher this format enough to create a 
dataset that represents an unstructured grid of coordinate X,Y,Z points 
with each point having a distinct velocity vector over my time span.  If 
you happen to have a concise example of one of referenced 'VARIABLE' files 
- such as 'fmaego.data.nvel' - I believe that would help me greatly in 
decoding the format quicker.  Otherwise no worries, I already feel like 
this is a much more tangible approach and appreciate the help you have 
already offered! 

Thank You Again,
     John





From:
Samuel Key <samuelkey at bresnan.net>

To:
John CTR Mick/ACT/CNTR/FAA at FAA
Cc:
paraview at paraview.org
Date:
03/22/2012 02:06 PM
Subject:
Re: [Paraview] Assistance/Suggestion With Animating Relatively Small 
Datasets Over Many Timesteps



John,

You might try the EnSight reader in ParaView. (I have used this format for 
many multiple-part models with a common time history.) It takes a little 
time to decipher the EnSight format but once you get it to work, it is 
very easy after that. The primary concept to keep in mind is that each 
part is an independently displayable graphics object. Each datum item 
(scalar or vector values assigned to cells and points) is kept in a 
separate file that contains all time steps. This storage scheme really 
cuts down on the number of files.

Using the EnSight-format's part construct, you can use the Extract Block 
filter to create a pipeline for each object, that is, do different 
graphics operations on each part independently. 

I have attached a typical EnSight 'case' file and a copy of the EnSight 
format document. Using EnSight-formatted input gives in my opinion, easy 
access to a wide selection of very useful filters.

Enjoy

On 3/22/2012 11:02 AM, John.CTR.Mick at faa.gov wrote: 

First, thank you for the quick response I appreciate the input. 

I took at look at the state file you provided, and my first thoughts are 
suggesting that the Transform Filter may not provide exactly what I need.  


In your example you are using the Animation Control to interpolate 
parameters of the Transform Filter over time.  However I don't believe 
that any of the functions exposed 
by the Transform filter will help me actually remove Points along with the 
data in their associated Data Arrays.   

In terms of viewing the "Information" tab in the Object Inspector - I have 
a Dataset which has 2 Points, Several Arrays of Length 2 - and I would 
like to create multiple filters; each 
which would contain only 1 Point with Data Arrays of size 1.   

Would it be helpful if I provided a state file with my test datasets? 


From: 
"Deij, Menno" <M.Deij at marin.nl> 
To: 
John CTR Mick/ACT/CNTR/FAA at FAA, "paraview at paraview.org" 
<paraview at paraview.org> 
Date: 
03/22/2012 12:39 PM 
Subject: 
RE: [Paraview] Assistance/Suggestion With Animating Relatively Small 
Datasets Over Many Timesteps




 
How about using a Transform Filter, possibly using scripting? Not sure if 
that works with timesteps, but I suppose it can be done. 
  
I made the following example for someone on the list recently, that shows 
animation of a transformfilter: 
  
http://markmail.org/download.xqy?id=wjep757breylvtao&number=1 (downloads a 
state file) 
  
  


dr. ir. Menno A. Deij 
Software Engineer 

Maritime Simulation Group 


 
MARIN 
 

2, Haagsteeg 

E M.Deij at marin.nl 
P.O. Box 28 
T +31 317 49 39 11 

6700 AA Wageningen 

T  +31 317 49 35 06 
The Netherlands 
I  www.marin.nl

 
MARIN news: Exploratory study on the working principles of Energy Saving 
Devices 
This e-mail may be confidential, privileged and/or protected by copyright. 
If you are not the intended recipient, you should return it to the sender 
immediately and delete your copy from your system. 
 
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] 
On Behalf Of John.CTR.Mick at faa.gov
Sent: Thursday, March 22, 2012 5:13 PM
To: paraview at paraview.org
Subject: [Paraview] Assistance/Suggestion With Animating Relatively Small 
Datasets Over Many Timesteps 
 

    This is my first experience posting to the ParaView Mailing List; as 
well as my first project I am exploring with ParaView.  I hope I am 
posting this question to the correct audience. 

    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 
a one day interval.  Initially I thought I would be able to work with CSV 
files to define a dataset which includes time, positional coordinates, and 
velocity vectors.  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.  So in effect you 
see all the positions a particular planet was at for the entire duration 
of the dataset. 

I created a video of this test and made it available online: 
    http://www.youtube.com/watch?v=XLPxx-2Zc9Q 

    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.  It seems like there is no way to define time 
sequenced data natively within the file format itself?  ParaView expects 
the user to break the timesteps into individual files - with a numeric 
indicator in the filename to define the sequence.  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.  I 
feel like there must be a better way to do this. 

    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: 
         (filename: timeseries_2455562.vtu) 

<?xml version="1.0"?> 
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" 
compressor="vtkZLibDataCompressor"> 
 <UnstructuredGrid> 
   <Piece NumberOfPoints="2" NumberOfCells="2"> 
     <PointData Vectors="Velocity" Scalars="Radius"> 
       <DataArray Name="Time" type="Float32" format="ascii">2455562 
2455562</DataArray> 
       <DataArray Name="Radius" type="Float32" format="ascii">6371 
696000</DataArray> 
       <DataArray Name="Velocity" type="Float32" NumberOfComponents="3" 
format="ascii"> 
         -2.982651603443954E+01 -5.304542013817379E+00 
-7.226846229160870E-04 
         0 0 0 
       </DataArray> 
     </PointData> 
     <Points> 
       <DataArray type="Float32" NumberOfComponents="3" format="ascii"> 
         -2.567030301930377E+07 1.448508985971261E+08 
-3.607762965630511E+03 
         0 0 0 
       </DataArray> 
     </Points> 
     <Cells> 
       <DataArray Name="connectivity" type="Int32" format="ascii">0 
1</DataArray> 
       <DataArray Name="offsets" type="Int32" format="ascii">1 
2</DataArray> 
       <DataArray Name="types" type="UInt8" format="ascii">1 1</DataArray> 

     </Cells> 
   </Piece> 
 </UnstructuredGrid> 
</VTKFile> 

The idea of this approach was to list all of the scalars and vectors for 
each corresponding body in a single file.  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.  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. 

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.  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. 

After experimenting with this for awhile I found myself trying to 
implement a Programmable Filter.  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.  I currently have a script that looks something 
like this: 

# CELLID 0 = EARTH 
cellId = 0 

# Obtain References To Input/Output Data 
gridI = self.GetUnstructuredGridInput() 
gridO = self.GetUnstructuredGridOutput() 
dataI = self.GetInput() 
dataO = self.GetOutput() 
scalarI = dataI.GetPointData().GetScalars() 
vectorI = dataI.GetPointData().GetVectors() 

# Initialize Local Storage Arrays 
newVector = vtk.vtkFloatArray() 
newVector.SetName(vectorI.GetName()) 
newVector.SetNumberOfComponents(3) 
newScalar = vtk.vtkFloatArray() 
newScalar.SetName(scalarI.GetName()) 
newPoint = vtk.vtkPoints() 
newPoint.SetNumberOfPoints(1) 
newCell = vtk.vtkCellArray() 

# Lookup CellId References 
idCell = gridI.GetCell(cellId) 
idCellType = gridI.GetCellType(cellId) 
idPoint = gridI.GetPoints().GetPoint(cellId) 
idScalar = scalarI.GetTuple(cellId) 
idVector = vectorI.GetTuple(cellId) 

# Populate New Local Cell Array with CellId Cell 
newCell.InsertNextCell(idCell) 

# Populate New Local Point Array With CellId Point 
newPoint.SetPoint(0, idPoint) 

# Populate New Local Scalars with CellId Scalar Tuples 
newScalar.InsertNextTuple(idScalar) 

# Populate New Local Vectors with CellID Vector Tuples 
newVector.InsertNextTuple(idVector) 

# Copy Local Cells, Scalars, Vectors, and Points Into Output Pipeline Data 

gridO.SetPoints(newPoint) 
gridO.SetCells(idCellType, newCell) 
dataO.GetPointData().SetScalars(newScalar) 
dataO.GetPointData().SetVectors(newVector) 

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. 

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. 

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?  Does this Programmable Filter seem like a reasonable 
approach?  Is there a native feature I am missing that does this already? 
Is there some other file format other than VTK I could use to have 
ParaView understand this format of data? 

Any thoughts, comments, or questions will be greatly appreciated.  :) 

Thanks, 
    John 


_______________________________________________
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
A MIME attachment of type <application/x-gzip> was removed here
 by a drop-attachments-by-filetype filter rule on the host 
<relay1.faa.gov>.
[attachment "fmaego.data.case" deleted by John CTR Mick/ACT/CNTR/FAA] This 
e-mail was cleaned by Network Operations.  No further action is required 
from you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120322/7e1bd8a6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1069 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120322/7e1bd8a6/attachment-0002.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1622 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120322/7e1bd8a6/attachment-0003.jpeg>


More information about the ParaView mailing list