Re: [Paraview] XDMF file with multiple temporal collections

2018-01-24 Thread Nicolas Cedilnik

Hello

It's been a while but I'm back to trying to solve this issue. 
Unfortunately this doesn't solve the issue. Using paraview 5.4.1 from 
latest Fedora…


Anything else I should try ?

-- Nicolas


On 11/20/2017 10:46 PM, David E DeMarle wrote:
Try dropping your standalone external geometry and topology and just 
place them in the first timestep's grid. It might make the reader happier.

Like so...

http://www.w3.org/2001/XInclude; Version="3.3">
  
    Name="Collection">

      
        
        
          Precision="4">0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1

        
        
          Precision="8">9 0 1 3 2 4 5 7 6

        
        
          Precision="8">0 0 0 0 0 0 0 0

        
        ...
      
      
        
         
         

        
        ...


___
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:
https://paraview.org/mailman/listinfo/paraview


[Paraview] XDMF file with multiple temporal collections

2017-11-16 Thread Nicolas Cedilnik

Hello all,

I'm trying to generate a valid (at least, well-read by paraview) XDMF 
file. It represents a single topology/geometry, with multiple scalars, 
varying over time.


I've attached the file I'm trying to read with paraview. It behaves 
almost as I want, but oddly enough, only with scalars tagged as 
"partial" by paraview.


One of the scalars "animation", the first one in the XDMF file, is 
completely buggy, possibly with values from other scalars.


Is there something wrong with my XDMF file or is this a bug in paraview?

Thanks for your help,

-- Nicolas



http://www.w3.org/2001/XInclude; Version="3.0">
  

  
/tmp/test-calib/1_vt_1_endo_smooth/triangles.bin
  


  
/tmp/test-calib/1_vt_1_endo_smooth/points.bin
  


  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-fimh-style_0.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-fimh-style_1.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-fimh-style_2.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-fimh-style_3.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-fimh-style_4.bin
  

  


  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-cma-es_0.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-cma-es_1.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-cma-es_2.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-cma-es_3.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/eikonal-cma-es_4.bin
  

  


  




  
/tmp/test-calib/1_vt_1_endo_smooth/rhythmia_0.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/rhythmia_1.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/rhythmia_2.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/rhythmia_3.bin
  

  
  




  
/tmp/test-calib/1_vt_1_endo_smooth/rhythmia_4.bin
  

  

  

___
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] Add data to the pipeline browser via CLI

2017-10-16 Thread Nicolas Cedilnik

Hello,

I'm wondering if there is an option somewhere or a CLI argument to 
"open" a file (from the file manager or terminal) in the last opened 
paraview window. Right now it launches a new paraview instance for every 
file I open. My workaround is to use drag'n'drop but I'd be happy avoid 
using the mouse as much as possible.


Thanks,

-- Nicolas

___
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] Best format for constant structure, varying scalars over time?

2017-04-27 Thread Nicolas Cedilnik

Hello,

I come here for advice. I need to visualize scalars that change over 
time, on a constant mesh structure. The points don't move, the triangles 
don't move. What I'm doing right now is save the scalar values and mesh 
structure in a legacy VTK for each time step. It works but doesn't sound 
really clever, knowing that the mesh part never changes. I'm just 
wasting A LOT of HDD space.


There are probably a lot of solutions for this, but I'm a bit lost. My 
scalars values are first generated as numpy arrays, so right now I'm 
using the nice pyvtk python package.


What are my alternative options here? Which python library should I use?

Regards,

--

Nicolas Cedilnik

___
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] "Rotate" look up table

2017-02-03 Thread Nicolas Cedilnik

Hi all,

I'm replying to my own email because I worked out a solution and wanted 
to share but also because I believe what I'm doing is FAR from optimal 
and hope that someone
Would it be possible with python scripting to create an animation by 
"rotating" the look up table in a way that would look like this: 
https://www.youtube.com/watch?v=qA_vInXwdKM#t=3m25s ? It is a 
pseudo-animation created by changing the "range" of the LUT.
So I made this python script (see attachment) that generates different 
meshes with scalar values "rotated" (I don't find a better term to 
describe what I'm doing).
It works and make it easy to play the animation by opening the produced 
vtk files as a sequence in paraview.


However, every vtk file contains both the mesh geometry and the scalar 
values, but only the latter change. What would be the right way to 
animate only the scalar values and not the mesh geometry? What data 
format should I use? How could I import it into an animation in paraview?


Thanks for your guidance

--
Nicolas
#!/usr/bin/env python

from sys import argv

import numpy as np
import pyvtk

def open_binary(file_name):
reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName(file_name)
reader.Update()
unstr_grid = reader.GetOutput()

triangles = vtk_to_numpy(unstr_grid.GetCells().GetData())
triangles = triangles.reshape((int(len(triangles) / 4), 4))[:, 1:]

points = vtk_to_numpy(unstr_grid.GetPoints().GetData())

scalars = pyvtk.Scalars(
vtk_to_numpy(unstr_grid.GetPointData().GetArray(0)))

points_data = pyvtk.PointData(scalars)

grid = pyvtk.UnstructuredGrid(points, triangle=triangles)

mesh = pyvtk.VtkData(grid, points_data)
return mesh

file_name = argv[1]
output_prefix = argv[2]
n = int(argv[3])

try:
mesh = pyvtk.VtkData(file_name)
except NotImplementedError:
mesh = open_binary(file_name)

t0 = np.copy(mesh.point_data.data[0].scalars)
scalars_range = np.nanmax(t0) - np.nanmin(t0)
step = scalars_range / n

for i in range(1, n):
mesh.tofile(file_name, format='binary')
vals = t0 + i * step
above = np.nan
vals[vals > np.nanmax(t0)] = vals[vals > np.nanmax(t0)] - scalars_range
mesh.point_data.data[0].scalars = vals

file_name = "{}{:04d}.vtk".format(output_prefix, i)
print(file_name)
___
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] "Rotate" look up table

2017-02-01 Thread Nicolas Cedilnik

Hello,

Would it be possible with python scripting to create an animation by 
"rotating" the look up table in a way that would look like this: 
https://www.youtube.com/watch?v=qA_vInXwdKM#t=3m25s ? It is a 
pseudo-animation created by changing the "range" of the LUT.


Would paraview be the right tool to do that? I have a vtk file 
containing a triangular mesh with scalar values assigned to each point.
I'm already using paraview and I'm pretty satisfied with the static 
output. I was wondering how complicated it would be to "pseudo-animate" it.


Maybe someone can point me to some documentation or other tools that 
might do the job...


Thanks

--
Nicolas Cedilnik
___
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