LB | 18 Dec 14:44 2014
Picon

How to get the name of a block in a programmable filter

Hi,
 
I would like to define a custom programmable filter to work with MultiBlockDatasets. In that filter, I need to access to the name of each block being processed. By "name", I mean the information given in the "Information>Data Hierarchy" tree.
 
Could you explain me how to access to that information in a programmable filter?
 
Fort information, here is a code example of what I would like to do:
 
[code]
from    paraview.vtk import dataset_adapter as DA

input   = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)

def process_block(input_block, output_block) :
   
    data = input_block.PointData['data']
    if data is None :
        print 'data is None'
   
    else :
        # <<<< get the name of input_block >>>>
        print 'do something with data'
   
 
iter = DA.MultiCompositeDataIterator([input, output])
for input_block, output_block in iter:
    process_block(input_block, output_block)
 
[/code]
 
 
B. L.
<div>
<div>Hi,</div>
<div>&nbsp;</div>
<div>I would like to&nbsp;define&nbsp;a custom programmable filter to work with MultiBlockDatasets. In that filter, I need to access to the name of each block being processed. By "name", I mean the information given in the "Information&gt;Data Hierarchy" tree.</div>
<div>&nbsp;</div>
<div>Could you explain me how to access to that information in a programmable filter?</div>
<div>&nbsp;</div>
<div>Fort information, here is a code example of what I would like to do:</div>
<div>&nbsp;</div>
<div>[code]</div>
<div>from&nbsp;&nbsp;&nbsp; paraview.vtk import dataset_adapter as DA<br><br>input&nbsp;&nbsp; = self.GetInputDataObject(0, 0)</div>
<div>output = self.GetOutputDataObject(0)</div>
<div>
<br>def process_block(input_block, output_block) :<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; data = input_block.PointData['data']</div>
<div>&nbsp;&nbsp;&nbsp; if data is None :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 'data is None'<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; else :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # &lt;&lt;&lt;&lt; get the name of input_block &gt;&gt;&gt;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 'do something with data'<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;<br>iter = DA.MultiCompositeDataIterator([input, output])</div>
<div>for input_block, output_block in iter:<br>&nbsp;&nbsp;&nbsp; process_block(input_block, output_block)</div>
<div>&nbsp;</div>
<div>[/code]</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>B. L.</div>
</div>
Stephen Wornom | 17 Dec 14:03 2014
Picon
Picon

PV-4.1 plot over line, how to use symbols

How does one use symbols rather than solid line?
Thanks,
Stephen
Attachment (stephen_wornom.vcf): text/x-vcard, 109 bytes
<div>
    How does one use symbols rather than solid line?<br>
    Thanks,<br>
    Stephen<br><div class="moz-signature">-- <br><li>
        <a href="http://www-sop.inria.fr/members/Stephen.Wornom/animate_tandem_cylinders_sound_waves.html">Tandem
          cylinders pressure waves</a>
</li>
      <li>
        <a href="http://www-sop.inria.fr/members/Stephen.Wornom/animate_tandem_cylinders_pressure-wave_explosion_when_vortex_shedding_starts.html">pressure
          wave explosion when vortex shedding begins (be patient,
          startup is slow)</a>
</li>
      <li>
        <a href="http://www-sop.inria.fr/members/Stephen.Wornom/animate_square_cylinder_vorticity_dynamic_vs_non-dynamic.html">Square
          cylinder Re= 22400: dynamic vs non-dynamic (patience)</a>
</li>
    </div>
  </div>
Eugenio Trumpy | 17 Dec 10:14 2014
Picon

paraview calculation

Hello everybody,

I would like to know if is it possible to perform a this special computation by using paraview:

Actually I'm using paraviewgeo, I loaded a .vo file. I would like to count the vertical cell and
write the result in ascii file (x, y, value) (2D).
Is it possible?

Kind regards

Eugenio
<div><div dir="ltr">Hello everybody,<br><br>I would like to know if is it possible to perform a this special computation by using paraview:<br><br>Actually I'm using paraviewgeo, I loaded a .vo file. I would like to count the vertical cell and <br>write the result in ascii file (x, y, value) (2D).<br>Is it possible?<br><br>Kind regards<br><br>Eugenio<br>
</div></div>
Omid Mahabadi | 16 Dec 23:13 2014

ParaView 4.2 not showing Cell & Point IDs correctly

Hi,
I recently switched from Paraview 4.1.0 to 4.2.0, both 64-bit under
ubuntu. I noticed that when I select Cells and/or Points and view their
IDs, they are assigned arbitrary numbers. You can visualize the attached
file (cube.zip, zipped to save space) and select the giant tetrahedron
on the top (along Y) to see the problem. I'm also attaching such
screenshots from both versions.

Am I missing something? Or should I modify my VTP/VTU files for PV4.2?

Thanks,
Omid

Attachment (cube.zip): application/zip, 68 KiB
Hi,
I recently switched from Paraview 4.1.0 to 4.2.0, both 64-bit under
ubuntu. I noticed that when I select Cells and/or Points and view their
IDs, they are assigned arbitrary numbers. You can visualize the attached
file (cube.zip, zipped to save space) and select the giant tetrahedron
on the top (along Y) to see the problem. I'm also attaching such
screenshots from both versions.

Am I missing something? Or should I modify my VTP/VTU files for PV4.2?

Thanks,
Omid

Omid Mahabadi | 16 Dec 23:12 2014

Programmable filter, looping over time steps and reimporting inputs

Hi,
I'm writing a python script for the Programmable Filter of ParaView to do some analysis on my simulation results. The simulations results are transient and hence the analysis has to be done over time steps (perhaps similar to integrate over time filter). All bits of my script are working fine. However, after spending a considerable amount of time on fiddling with the script, googling, reading mailing lists and the VTK documentation, I haven't found a way to "loop over time steps AND update the input" from within the script. I can loop over time steps using:
from vtk import vtkStreamingDemandDrivenPipeline
for time in outInfo.Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS()):
    #Perform some analysis, for instance subtracting value_v for this time from value_v at time zero...
However, the input data is still from the time step where I first applied the script. Of course, when I animate the results, the inputs will be updated, but I will need to achieve the same results from within my script in the Programmable Filter dialogue.

How can I update the inputs from within my for loop or how can I modify the for loop or my script to achieve that? Can Programmable Filter handle my situation? If not, what is the alternative?

Many thanks,
Omid
<div>
    Hi,<br>
    I'm writing a python script for the Programmable Filter of ParaView
    to do some analysis on my simulation results. The simulations
    results are transient and hence the analysis has to be done over
    time steps (perhaps similar to integrate over time filter). All bits
    of my script are working fine. However, after spending a
    considerable amount of time on fiddling with the script, googling,
    reading mailing lists and the VTK documentation, I haven't found a
    way to "loop over time steps AND update the input" from within the
    script. I can loop over time steps using:<br><blockquote>from vtk import vtkStreamingDemandDrivenPipeline<br>
      for time in
      outInfo.Get(vtkStreamingDemandDrivenPipeline.TIME_STEPS()):<br>
      &nbsp;&nbsp;&nbsp; #Perform some analysis, for instance subtracting value_v for
      this time from value_v at time zero... <br>
</blockquote>
    However, the input data is still from the time step where I first
    applied the script. Of course, when I animate the results, the
    inputs will be updated, but I will need to achieve the same results
    from within my script in the Programmable Filter dialogue.<br><br>
    How can I update the inputs from within my for loop or how can I
    modify the for loop or my script to achieve that? Can Programmable
    Filter handle my situation? If not, what is the alternative? <br><br>
    Many thanks,<br>
    Omid
  </div>
Bob Flandard | 16 Dec 20:09 2014
Picon

Multi-block Inspector - unexpected result

Greetings,

When using the Multi-block Inspector I see behavior that I don't expect. After setting colors and opacity for individual blocks, if the model is then colored by a nodal scalar variable the solid colors persist. This isn't what happens if I add an extract block filter for each block. It gives weird effects if opacity is less than 1 in a block, where other blocks (not transparent) viewed through the transparent block are rendered by the scalar variable, but if viewed directly are rendered in the prescribed solid color.

Is this a expected?

I'm using the latest stable 4.2 on Windows 7 x64, with an EnSight Gold format reader.

Thanks, Bob
<div><div dir="ltr">
<div>
<div>Greetings,<br><br>
</div>When using the Multi-block Inspector I
 see behavior that I don't expect. After setting colors and opacity for 
individual blocks, if the model is then colored by a nodal scalar variable the solid colors persist. This isn't what happens if I add an 
extract block filter for each block. It gives weird effects if opacity is less than 1 in a block, where other blocks (not transparent) viewed through the transparent block are rendered by the scalar variable, but if viewed directly are rendered in the prescribed solid color.<br><br>
</div>
<div>Is this a expected?<br><br>
</div>
<div>I'm using the latest stable 4.2 on Windows 7 x64, with an EnSight Gold format reader.<br>
</div>
<div><br></div>Thanks, Bob</div></div>
Pedro Ceccon Thurler | 15 Dec 15:35 2014
Picon

Problem with "Find Data"

Good morning,
I'm a new user of software ParaView and I have some problem.
Everytime I try to create a selection using the option "Find Data" the software returns this error message:

"Traceback (most recent call last):
  File "<string>", line 8, in <module>
  File "<string>", line 5, in vtkPythonExtractSelection_RequestData
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\paraview\extract_selection.py", line 111, in execute
    output.FieldData.append(nonzero_indices, "vtkSelectedIds");
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\paraview\vtk\numpy_interface\dataset_adapter.py", line 596, in append
    ds.GetAttributes(self.Association).append(array, name)
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\paraview\vtk\numpy_interface\dataset_adapter.py", line 535, in append
    arr = numpyTovtkDataArray(copy, name)
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\paraview\vtk\numpy_interface\dataset_adapter.py", line 119, in numpyTovtkDataArray
    vtkarray = numpy_support.numpy_to_vtk(array)
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\vtk\util\numpy_support.py", line 141, in numpy_to_vtk
    result_array = create_vtk_array(vtk_typecode)
  File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-packages\vtk\util\numpy_support.py", line 97, in create_vtk_array
    return vtk.vtkDataArray.CreateDataArray(vtk_arr_type)
TypeError: CreateDataArray argument 1: an integer is required"

I'm trying to locate the residual stress in the cells in a mesh of a welded plate.

I would like to know how to solve this problem.

Thanks for your attention,

--
Pedro Ceccon Thurler
Departamento de Engenharia Naval e Oceânica - UFRJ
ceccon <at> poli.ufrj.br
<div><div dir="ltr">
<span>Good morning,</span><br><span>I'm a new user of software ParaView and I have some problem.</span><br><span>Everytime I try to create a selection using the option "Find Data" the software returns this error message:</span><br><br><span>"Traceback (most recent call last):</span><br><span>&nbsp; File "&lt;string&gt;", line 8, in &lt;module&gt;</span><br><span>&nbsp; File "&lt;string&gt;", line 5, in vtkPythonExtractSelection_</span><span>RequestData</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\paraview\extract_</span><span>selection.py", line 111, in execute</span><br><span>&nbsp; &nbsp; output.FieldData.append(</span><span>nonzero_indices, "vtkSelectedIds");</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\paraview\vtk\numpy_</span><span>interface\dataset_adapter.py", line 596, in append</span><br><span>&nbsp; &nbsp; ds.GetAttributes(self.</span><span>Association).append(array, name)</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\paraview\vtk\numpy_</span><span>interface\dataset_adapter.py", line 535, in append</span><br><span>&nbsp; &nbsp; arr = numpyTovtkDataArray(copy, name)</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\paraview\vtk\numpy_</span><span>interface\dataset_adapter.py", line 119, in numpyTovtkDataArray</span><br><span>&nbsp; &nbsp; vtkarray = numpy_support.numpy_to_vtk(</span><span>array)</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\vtk\util\numpy_</span><span>support.py", line 141, in numpy_to_vtk</span><br><span>&nbsp; &nbsp; result_array = create_vtk_array(vtk_typecode)</span><br><span>&nbsp; File "C:\Program Files (x86)\ParaView 4.2.0\lib\paraview-4.2\site-</span><span>packages\vtk\util\numpy_</span><span>support.py", line 97, in create_vtk_array</span><br><span>&nbsp; &nbsp; return vtk.vtkDataArray.</span><span>CreateDataArray(vtk_arr_type)</span><br><span>TypeError: CreateDataArray argument 1: an integer is required"</span><br><br><span>I'm trying to locate the residual stress in the cells in a mesh of a welded plate.</span><br><br><span>I would like to know how to solve this problem.</span><br><br><span>Thanks for your attention,</span><br><br>--<br clear="all"><div><div class="gmail_signature"><div dir="ltr">Pedro Ceccon Thurler<br>Departamento de Engenharia Naval e Oce&acirc;nica - UFRJ<br><a href="mailto:ceccon <at> poli.ufrj.br" target="_blank">ceccon <at> poli.ufrj.br</a><br>
</div></div></div>
</div></div>
李叶萌 | 15 Dec 03:29 2014
Picon

ask for help: could not run paraview

Hello,

I meet a problem when running paraview and hope to get some help from you.

After I write paraview in the terminal, paraview could not open. And the 
terminal shows:

*** glibc detected *** /usr/lib/paraview/paraview: munmap_chunk(): 
invalid pointer: 0x00000000029de900 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f70789a3b96]
/usr/lib/paraview/libvtkRendering.so.pv3.14(_ZN21vtkOpenGLRenderWindow12GetPixelDataEiiiiiPh+0xd4)[0x7f70754f4ab4]
/usr/lib/paraview/libvtkRendering.so.pv3.14(_ZN21vtkOpenGLRenderWindow12GetPixelDataEiiiiiP20vtkUnsignedCharArray+0xe0)[0x7f70754f4c90]
/usr/lib/paraview/libQVTK.so.pv3.14(_ZN10QVTKWidget16saveImageToCacheEv+0xe3)[0x7f7075c15c53]

...

Have you meet the same problem before? Hope to get some response. Thank 
you for reading.

Yemeng
Nicholas Yue | 15 Dec 02:22 2014
Picon

OS X Yosemite complains that Paraview is not signed

Hi,

     I downloaded the Paraview 4.2 DMG and installed it on OS X Yosemite.

     I renamed the *.app directory to include a version in the directory 
to allow concurrent installation of future versions.

     When I attempt to launch it, it says that the app is not signed via 
the Mac App store.

Cheers

--

-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools

Payman Tohidifar | 13 Dec 21:51 2014
Picon

Cannot read point data array "Velocity" from PointData in piece 0.

Hi,

I'm trying to write my particles positions and their velocities in vtu format. However, when I load my data in paraview, it gives me the following error:

ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/IO/XML/vtkXMLDataReader.cxx, line 434

vtkXMLUnstructuredGridReader (0x7ff4adfbcbc0): Cannot read point data array "Velocity" from PointData in piece 0. The data array in the element may be too short.


I read in another post that changing Float32 to Float64 might help, but it did not. Any help will be appreciated. Also, I can send my cpp code.


Thanks,

Payman


<div><div dir="ltr">
<div><span><span>Hi,<br><br></span></span></div>
<span><span>I'm trying to write my particles positions and their velocities in vtu format. However, when I load my data in paraview, it gives me the following error:<br><br></span></span>

<p><span><span>ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/paraview/src/paraview/VTK/IO/XML/vtkXMLDataReader.cxx, line 434</span></span></p>
<p><span><span>vtkXMLUnstructuredGridReader (0x7ff4adfbcbc0): Cannot read point data array "Velocity" from PointData in piece 0.  The data array in the element may be too short.</span></span></p>
<p><span><span><br></span></span></p>
<p><span><span>I read in another post that changing Float32 to Float64 might help, but it did not. Any help will be appreciated. Also, I can send my cpp code.</span></span></p>
<p><span><span><br></span></span></p>
<p><span><span>Thanks,</span></span></p>
<p><span><span>Payman<br></span></span></p>
<span><span><br></span></span>
</div></div>
Scott, W Alan | 12 Dec 21:54 2014
Picon

Plot over intersection curves

What does the plot over intersection curves plot do?  Plot the boundary around the slice where a plane intersects a dataset?  OK, Next, what does the Sphere slice type do?
 
An example is Sources/ Wavelet, Apply.  Plot over intersection curves.  Slice type Sphere.  Radius 12.  Apply.  What does this represent?
 
Thanks,
 
Alan
 
 
 
<div>
<span>
<div>What does the plot over intersection curves plot do?&nbsp; Plot the boundary around the slice where a plane intersects a dataset?&nbsp; OK, Next, what does the Sphere slice type do?</div>
<div>&nbsp;</div>
<div>An example is Sources/ Wavelet, Apply.&nbsp; Plot over intersection curves.&nbsp; Slice type Sphere.&nbsp; Radius 12.&nbsp; Apply.&nbsp; What does this represent?</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>&nbsp;</div>
<div>Alan</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span>
</div>

Gmane