Stephen Wornom | 3 Sep 18:22 2015
Picon
Picon

PV 4.1 animating plot over line using global max/min

Is there an option so that animating plot over line will use the global max/min values instead of the localo max/min values for each time step?
animating contours uses the global max/min values and I would like to do this with plot over line.
Hope my question is clear.
Stephen
<div><div>
<div>Is there an option so that animating plot over line will use the global max/min values instead of the localo max/min values for each time step?<br>
</div>
<div>animating contours uses the global max/min values and I would like to do this with plot over line.<br>
</div>
<div>Hope my question is clear.<br>
</div>
<div>Stephen<br>
</div>
</div></div>
Dorier, Matthieu | 2 Sep 20:38 2015

Isosurface and slicing with Catalyst in C++

Hi,

I'm diving into Catalyst and try to build a pipeline in C++ for an simple example code. My use case is the following:
I have a uniform 3D grid (converted into vtkImageData) on which I map a field of double values (wrapped into a vtkDoubleArray).
By looking at the examples I managed to make the adaptor that creates the grid and maps the field on it. Now I would like to build pipelines for 2 scenarios:
- slicing the grid horizontally at a given level, apply a color map, and output the result in a PNG file;
- building an isosurface from the 3d grid (with configurable isovalue) and print the result in a PNG file.
In both cases I don't know which classes to look at in the Doxygen of VTK. Besides, I suppose for the second case there should be some concept of camera position and parameters...

Any hint or examples would be appreciated.
Thanks,

Matthieu Dorier
<div>
<div>Hi,<br><br>
I'm diving into Catalyst and try to build a pipeline in C++ for an simple example code. My use case is the following:<br>
I have a uniform 3D grid (converted into vtkImageData) on which I map a field of double values (wrapped into a vtkDoubleArray).<br>
By looking at the examples I managed to make the adaptor that creates the grid and maps the field on it. Now I would like to build pipelines for 2 scenarios:<br>
- slicing the grid horizontally at a given level, apply a color map, and output the result in a PNG file;<br>
- building an isosurface from the 3d grid (with configurable isovalue) and print the result in a PNG file.<br>
In both cases I don't know which classes to look at in the Doxygen of VTK. Besides, I suppose for the second case there should be some concept of camera position and parameters...<br><br>
Any hint or examples would be appreciated.<br>
Thanks,<br><br>
Matthieu Dorier<br>
</div>
</div>
Ishan Tembhekar | 2 Sep 00:01 2015
Picon

using python or pvpython with Paraview

Hello everyone, 

I have been using Paraview for a while with python scripts but every time I used a script, I used to open paraview, then do tools, python shell and then run the script. 

I want to be able to run the script without opening paraview. I looked at various forums that told me to update my PYTHONPATH or LD_LIBRARY_PATH with the directory where I built paraview. But I was not able to get anything working. I mostly could not find any location where the vtkPythonWrap directory is located (thats the one the forums kept telling me to look for) 

I use MacOS and I just downloaded it and dragged it to the applications folder. So, I had a couple of questions (both for Paraview version 4.3.1) 

1. For MacOS, I have paraview installed in /Applications/paraview2.app/. How would I proceed to use my python script without opening paraview?
2. In the future, I would like to use it in Linux as well. Would the procedure be similar to the MacOS case or different? 

Any kind of help will be greatly appreciated. 

Thank you! 

-Ishan
<div><div dir="ltr">Hello everyone,&nbsp;<br><br>I have been using Paraview for a while with python scripts but every time I used a script, I used to open paraview, then do tools, python shell and then run the script.&nbsp;<div><br></div>
<div>I want to be able to run the script without opening paraview. I looked at various forums that told me to update my PYTHONPATH or LD_LIBRARY_PATH with the directory where I built paraview. But I was not able to get anything working. I mostly could not find any location where the vtkPythonWrap directory is located (thats the one the forums kept telling me to look for)&nbsp;</div>
<div><br></div>
<div>I use MacOS and I just downloaded it and dragged it to the applications folder. So, I had a couple of questions (both for Paraview version 4.3.1)&nbsp;</div>
<div><br></div>
<div>1. For MacOS, I have paraview installed in /Applications/paraview2.app/. How would I proceed to use my python script without opening paraview?</div>
<div>2. In the future, I would like to use it in Linux as well. Would the procedure be similar to the MacOS case or different?&nbsp;</div>
<div><br></div>
<div>Any kind of help will be greatly appreciated.&nbsp;</div>
<div><br></div>
<div>Thank you!&nbsp;</div>
<div><br></div>
<div>-Ishan</div>
</div></div>
Martín Huarte E | 1 Sep 19:55 2015
Picon

Add texture to obj files

Dear Paraview enthusiasts: Good day. I’m trying to work an obj file along with a jpg one, produced by a 3D scanner. I can load the obj file and plot its mesh, etc., however, I cannot map the jpg texture (colors) into it. i.e. want to take the jpg stuff and map it onto the mesh from the obj file. Any suggestion on how to achieve this would be greatly appreciated. 

Thank you.

My best, Martín
                                                                                             
Martín Huarte-Espinosa, Ph.D.
Computational Physicist  -  Expert Numerical Modeler and Code Developer - High Performance Computing Research Specialist
<div><div dir="ltr">

<p class=""><span class="">Dear Paraview enthusiasts: Good day. I&rsquo;m trying to work an obj file along with a jpg one, produced by a 3D scanner. I can load the obj file and plot its mesh, etc., however, I cannot map the jpg texture (colors) into it. i.e.&nbsp;</span>want to take the jpg stuff and map it onto the mesh from the obj file. Any suggestion on how to achieve this would be greatly appreciated.&nbsp;</p>

<p class="">Thank you.</p>
<div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">
<div>My best, Mart&iacute;n</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>Mart&iacute;n Huarte-Espinosa, Ph.D.</div>
<div>
<span>Computational Physicist &nbsp;- &nbsp;Expert Numerical Modeler and Code Developer - High Performance Computing Research Specialist</span><br>
</div>
<div><a href="http://linkedin.com/pub/martin-huarte-espinosa/59/6b7/13a" target="_blank">linkedin.com/pub/martin-huarte-espinosa/59/6b7/13a</a></div>
</div></div></div></div></div></div></div></div></div></div>
</div></div>
Marcus D. Hanwell | 31 Aug 23:37 2015

Tomviz 0.6.1 released - custom ParaView application tomography/volume rendering

Hi,

I wanted to let ParaView users know that we have released tomviz
0.6.1. It is a ParaView based application with a focus on
visualization and analysis of volumetric data, with a particular focus
on materials tomography. It features a simplified interface, and an
extended Python environment offering SciPy, NumPy, and pretty soon the
Python-wrapped ITK library.

http://tomviz.org/ is the main project web site, and you can download
binaries for Windows and Mac OS X from there. We would love to hear
feedback, and we will extend out the functionality over the next few
years.

It features the new OpenGL2 rendering backend, and so this is a chance
to try out some of the new rendering before ParaView begins packaging
it.

Thanks,

Marcus
Sergi Mateo Bellido | 31 Aug 09:27 2015
Picon

Re: [BUG] segfault playing a simulation

Hi Cory,

I'm stuck with this issue :(

1. Changing just the pvti file is not enough: I got a segfault using the raw binary files.
2. I tried also adding a dummy slice at the end of all pieces to fix the problem that I reported in one of my previous emails. So, instead of changing the PVTI files I tried changing the VTI files.
    2.1. First of all, I had to increase the number of tuples of the VtkArray because I was adding  the dummy slice. Since I didn't change the whole extent and the piece extent of each VTI file, I got this warning message:
    Warning: In /opt/VTK-6.2.0/Common/DataModel/vtkDataSet.cxx, line 421
    vtkImageData (0x3450390): Point array Var with 1 components, has 4080501 tuples but there are only 4040100 points
    This didn't work either.
    2.2. Afterwards, I tried modifying also the whole extent and the piece extent. This seemed to work :)

Despite 2.2 seemed to work, I'm not sure if this is a valid solution or just a workaround: If I open a VTI file directly (because I want to see the data produced by a MPI process) the dummy slice is visualized.

From my point of view, I think that we're trying to address an issue of the PVTI format modifying something that works fine (VTI files).

Best regards,

Sergi

On 08/12/2015 02:46 PM, Sergi Mateo Bellido wrote:
Cory,

I did not change the VTI files in the first experiment but it crashed anyway.

Thanks!
Sergi

On 08/12/2015 01:55 PM, Cory Quammen wrote:
Sergi,

Note that I did *not* change the whole extents of the VTI files after I changed the listed extents in the PVTI files.

Cory

On Wed, Aug 12, 2015 at 1:47 AM, Sergi Mateo Bellido <sergi.mateo.bellido <at> gmail.com> wrote:
Cory,

The ascii version is the more stable version and it usually doesn't crash (even the original version, I reported that in one of my first emails). I tried to different things without regenerating the *.vti *.pvti (using the zipped raw version):

1. Changing the piece extent in all the *.pvti files to what you proposed in your last email -> segfault
2. Changes describe in 1. + changing the whole extension of the VTI files that contain the second piece -> Paraview warns me because the size of the second piece doesn't correspond with the data.

vtkXMLImageDataReader (0x419ef70): Cannot read point data array "var" from PointData in piece 0.  The data array in the element may be too short.

Following your advice, I will try to generate an extra dummy slice in the first piece. I will let you know the results :)

Best,
Sergi



On 08/11/2015 11:57 PM, Cory Quammen wrote:
Actually, you could try one other thing first:

Change the extents of the pieces in the .pvti files to the following:

    <Piece Extent="0 200 0 200 0 100" Source="ascii_2_0.vti"/>
    <Piece Extent="0 200 0 200 100 200" Source="ascii_2_1.vti"/>

I'm able to load the files and move between time steps fine doing this.

Cory

On Tue, Aug 11, 2015 at 5:10 PM, Cory Quammen <cory.quammen <at> kitware.com> wrote:
Ideally both pieces would contain a copy of the slice, but I think for the first piece you could just write some dummy values into this extra slice. When you load it, the valid values from the first piece will overwrite the dummy values.

I'm frankly surprised this extra slice would be needed because the ghost level is set to 0. But I'll admit I don't fully understand this format yet.

Cory

On Tue, Aug 11, 2015 at 3:37 PM, Sergi Mateo Bellido <sergi.mateo.bellido <at> gmail.com> wrote:

Hi Cory,

This extra slice is the first slice of the second piece. Should both pieces contain this slice?

In my case, each MPI process computes something and writes its portion of the mesh. All these portions are completely disjoint among them.

Thanks!
Sergi




--
Cory Quammen
R&D Engineer
Kitware, Inc.



--
Cory Quammen
R&D Engineer
Kitware, Inc.




--
Cory Quammen
R&D Engineer
Kitware, Inc.


Attachment (tests.tar.gz): application/gzip, 21 KiB
<div>
    <div class="moz-cite-prefix">Hi Cory,<br><br>
      I'm stuck with this issue :(<br><br>
      1. Changing just the pvti file is not enough: I got a segfault
      using the raw binary files.<br>
      2. I tried also adding a dummy slice at the end of all pieces to
      fix the problem that I reported in one of my previous emails. So,
      instead of changing the PVTI files I tried changing the VTI files.<br>
      &nbsp;&nbsp;&nbsp; 2.1. First of all, I had to increase the number of tuples of
      the VtkArray because I was adding&nbsp; the dummy slice. Since I didn't
      change the whole extent and the piece extent of each VTI file, I
      got this warning message:<br>
        &nbsp;&nbsp;&nbsp; Warning: In /opt/VTK-6.2.0/Common/DataModel/vtkDataSet.cxx,
        line 421<br>
        &nbsp;&nbsp;&nbsp; vtkImageData (0x3450390): Point array Var with 1 components,
        has 4080501 tuples but there are only 4040100 points<br>
      &nbsp;&nbsp;&nbsp; This didn't work either.<br>
      &nbsp;&nbsp;&nbsp; 2.2. Afterwards, I tried modifying also the whole extent and
      the piece extent. This seemed to work :)<br><br>
      Despite 2.2 seemed to work, I'm not sure if this is a valid
      solution or just a workaround: If I open a VTI file directly
      (because I want to see the data produced by a MPI process) the
      dummy slice is visualized.<br><br>
      From my point of view, I think that we're trying to address an
      issue of the PVTI format modifying something that works fine (VTI
      files).<br><br>
      Best regards,<br><br>
      Sergi<br><br>
      On 08/12/2015 02:46 PM, Sergi Mateo Bellido wrote:<br>
</div>
    <blockquote cite="mid:55CB402B.10300 <at> gmail.com" type="cite">
      <div class="moz-cite-prefix">Cory,<br><br>
        I did not change the VTI files in the first experiment but it
        crashed anyway.<br><br>
        Thanks!<br>
        Sergi<br><br>
        On 08/12/2015 01:55 PM, Cory Quammen wrote:<br>
</div>
      <blockquote cite="mid:CAB5Fpx4Z-ZJAigMWtUcE_QnD5AXsO93K07KbFOeAPUk7Hysv5g <at> mail.gmail.com" type="cite">
        <div dir="ltr">Sergi,
          <div><br></div>
          <div>Note that I did *not* change the whole extents of the VTI
            files after I changed the listed extents in the PVTI files.</div>
          <div><br></div>
          <div>Cory</div>
        </div>
        <div class="gmail_extra">
<br><div class="gmail_quote">On Wed, Aug 12, 2015 at 1:47 AM,
            Sergi Mateo Bellido <span dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:sergi.mateo.bellido <at> gmail.com" target="_blank">sergi.mateo.bellido <at> gmail.com</a>&gt;</span>
            wrote:<br><blockquote class="gmail_quote">
              <div>
                <div>Cory,<br><br>
                  The ascii version is the more stable version and it
                  usually doesn't crash (even the original version, I
                  reported that in one of my first emails). I tried to
                  different things without regenerating the *.vti *.pvti
                  (using the zipped raw version):<br><br>
                  1. Changing the piece extent in all the *.pvti files
                  to what you proposed in your last email -&gt; segfault<br>
                  2. Changes describe in 1. + changing the whole
                  extension of the VTI files that contain the second
                  piece -&gt; Paraview warns me because the size of the
                  second piece doesn't correspond with the data.<br><br>
                  vtkXMLImageDataReader (0x419ef70): Cannot read point
                  data array "var" from PointData in piece 0.&nbsp; The data
                  array in the element may be too short.<br><br>
                  Following your advice, I will try to generate an extra
                  dummy slice in the first piece. I will let you know
                  the results :)<br><br>
                  Best,<br>
                  Sergi
                  <div>
                    <div class="h5">
<br><p><br></p>
                      <br>
                      On 08/11/2015 11:57 PM, Cory Quammen wrote:<br>
</div>
                  </div>
                </div>
                <div>
                  <div class="h5">
                    <blockquote type="cite">
                      <div dir="ltr">Actually, you could try one other
                        thing first:
                        <div><br></div>
                        <div>Change the extents of the pieces in the
                          .pvti files to the following:</div>
                        <div><br></div>
                        <div>
                          <div>&nbsp; &nbsp; &lt;Piece Extent="0 200 0 200 0 100"
                            Source="ascii_2_0.vti"/&gt;</div>
                          <div>&nbsp; &nbsp; &lt;Piece Extent="0 200 0 200 100
                            200" Source="ascii_2_1.vti"/&gt;</div>
                        </div>
                        <div><br></div>
                        <div>I'm able to load the files and move between
                          time steps fine doing this.</div>
                        <div><br></div>
                        <div>Cory</div>
                      </div>
                      <div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Aug 11, 2015 at
                          5:10 PM, Cory Quammen <span dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:cory.quammen <at> kitware.com" target="_blank">cory.quammen <at> kitware.com</a>&gt;</span>
                          wrote:<br><blockquote class="gmail_quote">
                            <div dir="ltr">Ideally both pieces would
                              contain a copy of the slice, but I think
                              for the first piece you could just write
                              some dummy values into this extra slice.
                              When you load it, the valid values from
                              the first piece will overwrite the dummy
                              values.
                              <div><br></div>
                              <div>I'm frankly surprised this extra
                                slice would be needed because the ghost
                                level is set to 0. But I'll admit I
                                don't fully understand this format yet.</div>
                              <span>
                                <div><br></div>
                                <div>Cory</div>
                              </span>
</div>
                            <div class="gmail_extra">
                              <div>
                                <div>
<br><div class="gmail_quote">On Tue, Aug
                                    11, 2015 at 3:37 PM, Sergi Mateo
                                    Bellido <span dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:sergi.mateo.bellido <at> gmail.com" target="_blank">sergi.mateo.bellido <at> gmail.com</a>&gt;</span>
                                    wrote:<br><blockquote class="gmail_quote">
                                      <p dir="ltr">Hi Cory,</p>
                                      <p dir="ltr">This extra slice is
                                        the first slice of the second
                                        piece. Should both pieces
                                        contain this slice?</p>
                                      <p dir="ltr">In my case, each MPI
                                        process computes something and
                                        writes its portion of the mesh.
                                        All these portions are
                                        completely disjoint among them.</p>
                                      <p dir="ltr">Thanks!<span><br>
                                          Sergi</span></p>
                                    </blockquote>
                                  </div>
                                  <br><br><div><br></div>
                                </div>
                              </div>
                              <span>-- <br><div>Cory Quammen<br>
                                  R&amp;D Engineer<br>
                                  Kitware, Inc.</div>
                              </span>
</div>
                          </blockquote>
                        </div>
                        <br><br><div><br></div>
                        -- <br><div>Cory Quammen<br>
                          R&amp;D Engineer<br>
                          Kitware, Inc.</div>
                      </div>
                    </blockquote>
                    <br>
</div>
                </div>
              </div>
            </blockquote>
          </div>
          <br><br><div><br></div>
          -- <br><div class="gmail_signature">Cory Quammen<br>
            R&amp;D Engineer<br>
            Kitware, Inc.</div>
        </div>
      </blockquote>
      <br>
</blockquote>
    <br>
</div>
Stephen Wornom | 29 Aug 09:39 2015
Picon
Picon

PV 4.1.0 how to plot over line for two different time step on same figure

Plot ove line creates a figure. Is it possible to impose two different time steps on the same figure?
Hope my question is clear.
Thanks,
Stephen
<div><div>
<div>Plot ove line creates a figure. Is it possible to impose two different time steps on the same figure?<br>
</div>
<div>Hope my question is clear.<br>
</div>
<div>Thanks,<br>
</div>
<div>Stephen<br>
</div>
</div></div>
Dennis Conklin | 28 Aug 22:13 2015

Exodus Block Names

All,

 

Once again, I need help.  We are starting to assign names to our Exodus blocks (outside of Paraview).   This is very useful for ease and clarity of post processing and allows convenient reference to actual components.   The good news is that Paraview seems perfectly happy to read in the Block Names and use them in the Properties Panel and the Multi-block Inspector and the Find Data screen if they exist (no action or programming required for this).  So, for instance, instead of Paraview generating the non-useful name of “Unnamed block ID: 13 Type: hex” when the blockname is empty, it will automagically use the more useful Blockname of “Tread”  if that is in the Exodus file.  

 

However, there has been an unintended consequence of this change.   If I select some elements and examine them in Spreadsheet View, I see Block Number 14( the +1 offset from Block_ID and Block Number is NOT the problem!).   And now I can no longer associate the element (Block Number 14) with it’s block in the Properties Panel or the Multi-block Inspector or the Find Data panel – where the same block is called “Tread”.

 

So, to remedy this situation I would like to add an element variable of BlockName, which would contain “Tread” for all the elements in BlockID 13, etc., etc. for all the blocks.

 

My only problem is I can’t seem to find the list of Block Names.   I’m pretty weak at vtk, so it must be available but I surrender – I can’t seem to find it.   If someone can help me find the list of Block Names from inside the Programmable Filter, I’ll be happy to add the element variable myself.

 

Thanks for any help, again!

 

Dennis

<div>
<div class="WordSection1">
<p class="MsoNormal">All,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Once again, I need help.&nbsp; We are starting to assign names to our Exodus blocks (outside of Paraview).&nbsp;&nbsp; This is very useful for ease and clarity of post processing and allows convenient reference to actual components.&nbsp;&nbsp; The good news is
 that Paraview seems perfectly happy to read in the Block Names and use them in the Properties Panel and the Multi-block Inspector and the Find Data screen if they exist (no action or programming required for this).&nbsp; So, for instance, instead of Paraview generating
 the non-useful name of &ldquo;Unnamed block ID: 13 Type: hex&rdquo; when the blockname is empty, it will automagically use the more useful Blockname of &ldquo;Tread&rdquo; &nbsp;if that is in the Exodus file.&nbsp;&nbsp;
<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">However, there has been an unintended consequence of this change.&nbsp;&nbsp; If I select some elements and examine them in Spreadsheet View, I see Block Number 14( the +1 offset from Block_ID and Block Number is NOT the problem!).&nbsp;&nbsp; And now I can
 no longer associate the element (Block Number 14) with it&rsquo;s block in the Properties Panel or the Multi-block Inspector or the Find Data panel &ndash; where the same block is called &ldquo;Tread&rdquo;.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">So, to remedy this situation I would like to add an element variable of BlockName, which would contain &ldquo;Tread&rdquo; for all the elements in BlockID 13, etc., etc. for all the blocks.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">My only problem is I can&rsquo;t seem to find the list of Block Names.&nbsp;&nbsp; I&rsquo;m pretty weak at vtk, so it must be available but I surrender &ndash; I can&rsquo;t seem to find it.&nbsp;&nbsp; If someone can help me find the list of Block Names from inside the Programmable
 Filter, I&rsquo;ll be happy to add the element variable myself.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks for any help, again!<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Dennis<p></p></p>
</div>
</div>
Berk Geveci | 27 Aug 18:40 2015

VTK and ParaView for HPCWire awards!

VTK and ParaView have witnessed significant growth thanks to all of the
members of the community. To recognize VTK and ParaView’s development, please
nominate them for 2015 HPCwire Readers’ and Editors’ Choice Awards.

Please nominate VTK and ParaView for “Best HPC Visualization Product or Technology.”

Nominations can be made at http://www.hpcwire.com/2015-hpcwire-readers-choice-awards/.

Thank you for your support!
-berk
<div><div dir="ltr">VTK and ParaView have witnessed significant growth thanks to all of the<br>members of the community. To recognize VTK and ParaView&rsquo;s development, please<br>nominate them for 2015 HPCwire Readers&rsquo; and Editors&rsquo; Choice Awards.<br><br>Please nominate VTK and ParaView for &ldquo;Best HPC Visualization Product or Technology.&rdquo;<br><br>Nominations can be made at <a href="http://www.hpcwire.com/2015-hpcwire-readers-choice-awards/">http://www.hpcwire.com/2015-hpcwire-readers-choice-awards/</a>.<br><br>Thank you for your support!<br>-berk<br>
</div></div>
Dennis Conklin | 26 Aug 18:52 2015

How to Tell if Apply Displacements checked and Displacement Magnitude for Exodus multi-block dataset from Programmable filter

All,

 

Let’s say I load an Exodus file with a multi-block dataset.   At that time I either Apply Displacements or not and I can change the default Displacement Magnitude of 1.

 

Then I want to run a Programmable filter.  In that filter, I want to take different actions depending on Apply Displacements and Displacement Magnitude.   I sort of have 2 questions:

 

1.       Is it possible to determine the state of Apply Displacements and Displacement Magnitude if I run the programmable filter directly on the exodus file, immediately after loading it?

2.      If I am further down the Pipeline Browser and I run it on a descendent of the exodus file, possibly with several filters between the original Exodus file and my programmable filter, is there still a way to determine the state of those 2?

 

Thanks for any help.

 

Dennis

<div>
<div class="WordSection1">
<p class="MsoNormal">All,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Let&rsquo;s say I load an Exodus file with a multi-block dataset.&nbsp;&nbsp; At that time I either Apply Displacements or not and I can change the default Displacement Magnitude of 1.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Then I want to run a Programmable filter.&nbsp; In that filter, I want to take different actions depending on Apply Displacements and Displacement Magnitude.&nbsp;&nbsp; I sort of have 2 questions:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoListParagraph"><span>1.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>&nbsp;Is it possible to determine the state of Apply Displacements and Displacement Magnitude if I run the programmable filter directly on the exodus file, immediately after loading it?<p></p></p>
<p class="MsoListParagraph"><span>2.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>If I am further down the Pipeline Browser and I run it on a descendent of the exodus file, possibly with several filters between the original Exodus file and my programmable filter, is there still a way to determine the state of those
 2?<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks for any help.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Dennis<p></p></p>
</div>
</div>
Dan Lipsa | 25 Aug 16:39 2015

Re: Writing a Paraview Reader - Only part of the data available

Hi James,
I was used to the old style and it kind of made sense with the problem you are seeing, but you are right, setDimensions does not seem to be the problem.

Is it any way I can get the code and a sample data so that I can run it through a debugger. I cannot see anything else in the code.

Dan


On Tue, Aug 25, 2015 at 9:20 AM, James Furness <pcxjf1 <at> nottingham.ac.uk> wrote:
Thanks for your advice, however it hasn’t quite solved my problem. 

You are missing image->SetDimensions() - that may be a reason why your scalar does not have all values.

The documentation marks vtkImageData::SetDimensions( ... ) as  depreciated, and instead vtkImageData::SetExtent( ... ) should be used. It remarks that SetDimension is equivalent to SetExtent(0, i-1, 0, j-1, 0, k-1).


Regardless, I tried using SetDimensions in this way, and resulted in some nasty set-fault crashes. Whilst now 64 elements were found correctly, all passed the first 8 were memory junk. When I use SetExtent( … ) the information print on the image object happily reports dimensions of 4, 4, 4 as expected. So it seems this is set by SetExtent( … ).

vtkRectilinear grid is like an image data with variable extents and warped grid.

I’ll look into this class. It’s possible that I am mangling this reader by trying to shoehorn my problem into an inappropriate class at the moment. Thanks for pointing this out.

Many thanks,
James

On 24 Aug 2015, at 15:31, Dan Lipsa <dan.lipsa <at> kitware.com> wrote:

James,
You are missing image->SetDimensions() - that may be a reason why your scalar does not have all values.

vtkRectilinear grid is like an image data with variable extents and warped grid.


On Fri, Aug 21, 2015 at 6:55 AM, James Furness <pcxjf1 <at> nottingham.ac.uk> wrote:
Hello,

I have a program that will produce an output either in csv, or a binary format (which I have written and can alter).

The data points are constructed by taking 3 vectors, and stepping at set intervals along these vectors to construct a 3D set of data. Ultimately there shouldn’t be a restriction on the three vectors, so the data may not be in a rectilinear array. But I’m leaving this for now and assuming the data is constructed from 3 orthogonal Axis aligned vectors to create a rectilinear structured grid. When I have a better grasp of preview readers I’ll update the reader to account for this. I guess it would require an unstructured data type to handle non-orthogonal grids?

Also, the user is free to select what data they save from the program. This could be many fields, both vector and scalar quantities. What has been selected is stored in a header to the file, and known on reading. For my toy example I save only one scalar quantity.

I’ve been trying to write a reader for paraview to import the binary files output. The csv format works ok, but the files can become large and it is a pain to have to construct the vector quantities from 3 scalars in each case, I want to avoid the user having to do this work. Another reason for writing a custom reader is to include additional information into the binary file for visualisation (e.g. the position of atoms, not a field quantity).

With that background and reasoning I have managed to follow the documentation enough to read a basic test file, get the origin and point spacing, and read a single scalar quantity into a vtkDataArray owned by a vtkImageData object. Paraview picks this up seemingly correctly, with one flaw:

It only takes 2 elements from each dimension, 0 and 1 displaying 8 elements in total. I am confident it has read the other values correctly as the Information tab reports “X extent 0 to 3” “X range: -1 to 1” (as expected) and similar for the other dimensions. If I view the data in spreadsheet layout the 8 values it has seem correct, but the others are missing.

The code I am using in the reader’s RequestData(  ) function is added below.

Does anyone know why this may be happening and how to fix it? Also, any advice on how I should structure the reader to handle the non-orthogonal data?

Thanks for your time, and thank you for such a stellar program. The results paraview produces for this data is brilliant, hence my want to make it convenient for our users!

Regards,
James Furness


CODE for RequestData( ) Method:
———————————————————————

int LondonReader::RequestData(
        vtkInformation*,
        vtkInformationVector**,
        vtkInformationVector *outputVector)
{
    vtkWarningMacro("Requesting the data!");


    ifstream finp;
    finp.open(this->FileName, ios::in | ios::binary);

    if (finp.is_open()) {
        cerr << "File is open without problem!" << endl;
    }   else    {
        cerr << "File failed to open :(" << endl;
        return 0;
    }

    // size of real numbers may not be 8. Check for this from file header
    int realSize;
    finp.read((char*)&realSize, sizeof(int));
    if(realSize != 8)   {
        cerr << "Not implimented yet!" << endl;
        return 0;
    }

    // number of data fields
    int nFields;
    finp.read((char*)&nFields, sizeof(int));

    vtkImageData* image = vtkImageData::GetData(outputVector);

    // Read the dimensions of the grid and set the extent accordingly
    int gridDim[3];
    finp.read((char*)&gridDim, 3*sizeof(int));
    int extent[6] = {0, gridDim[0]-1, 0, gridDim[1]-1, 0, gridDim[2]-1};
    image->SetExtent(extent);


    // Read the field names from the file
    std::vector<std::string> fields;
    std::string strBuf;
    for (int i = 0; i < nFields; i++)   {
        std::getline( finp, strBuf, '\0');
        fields.push_back(strBuf);
        cerr << "Printing Fields (" << i << "): " << fields[i] << endl;
    }

    // setup image for only one field for test case
    image->AllocateScalars(VTK_FLOAT, 1);
    vtkDataArray* scalars = image->GetPointData()->GetScalars();

    // currently there is only one field 'rho'
    scalars->SetName(fields[3].c_str());

    double x, y, z, rho;
    double oX, oY, oZ;      //origin coordinates
    double sX, sY, sZ;      //spacing of points

    for (vtkIdType itx = 0; itx < gridDim[0]; itx++)    {
        for (vtkIdType ity = 0; ity < gridDim[1]; ity++)    {
            for (vtkIdType itz = 0; itz < gridDim[2]; itz++)    {
                finp.read((char*)&x, realSize);
                finp.read((char*)&y, realSize);
                finp.read((char*)&z, realSize);
                finp.read((char*)&rho, realSize);

                // Find and set the origin and spacing
                if (itx == 0 && ity == 0 && itz == 0)   {
                    image->SetOrigin(x, y, z);
                    oX = x; oY = y; oZ = z;
                }   else if (itx == 1 && ity == 0 && itz == 0)  {
                    sX = x - oX;
                }   else if (itx == 0 && ity == 1 && itz == 0)  {
                    sY = y - oY;
                }   else if (itx == 0 && ity == 0 && itz == 1)  {
                    sZ = z - oZ;
                }
                //check correct read.
                cerr << x << "," << y << "," << z << "," << rho << ", at " << itx*(gridDim[1]*gridDim[2]) + ity*gridDim[2] + itz << endl;

                //add value
                scalars->SetTuple1(itx*gridDim[1]*gridDim[2] + ity*gridDim[2] + itz,
                        rho);
            }
        }
    }

    image->SetSpacing(sX, sY, sZ);

    image->Print(cerr);

    return 1;
}





This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

_______________________________________________
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


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

<div><div dir="ltr">Hi James,<div>I was used to the old style and it kind of made sense with the problem you are seeing, but you are right, setDimensions does not seem to be the problem.</div>
<div><br></div>
<div>Is it any way I can get the code and a sample data so that I can run it through a debugger. I cannot see anything else in the code.</div>
<div><br></div>
<div>Dan</div>
<div>
<br><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Aug 25, 2015 at 9:20 AM, James Furness <span dir="ltr">&lt;<a href="mailto:pcxjf1 <at> nottingham.ac.uk" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=pcxjf1 <at> nottingham.ac.uk&amp;cc=&amp;bcc=&amp;su=&amp;body=','_blank');return false;">pcxjf1 <at> nottingham.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">

<div>
Thanks for your advice, however it hasn&rsquo;t quite solved my problem.&nbsp;
<div><br></div>
<div>
<span>
<blockquote type="cite">
<div dir="ltr">
<div>You are missing image-&gt;SetDimensions() - that may be a reason why your scalar does not have all values.</div>
</div>
</blockquote>
<div><br></div>
</span><div>The documentation marks vtkImageData::SetDimensions( ... ) as &nbsp;depreciated, and instead vtkImageData::SetExtent( ... ) should be used. It remarks that SetDimension is equivalent to&nbsp;SetExtent(0, i-1, 0, j-1, 0, k-1).</div>
<div><br></div>
<div>(( doc page - &nbsp;<a href="http://www.vtk.org/doc/nightly/html/classvtkImageData.html#a42bc5faee908c50407e9d9ec97f74238" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkImageData.html#a42bc5faee908c50407e9d9ec97f74238</a>&nbsp;))</div>
<div><br></div>
<div>Regardless, I tried using SetDimensions in this way, and resulted in some nasty set-fault crashes. Whilst now 64 elements were found correctly, all passed the first 8 were memory junk. When I use SetExtent( &hellip; ) the information print on the image
 object happily reports dimensions of 4, 4, 4 as expected. So it seems this is set by SetExtent( &hellip; ).</div>
<span>
<div><br></div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div>vtkRectilinear grid is like an image data with variable extents and warped grid.</div>
</div>
</blockquote>
</div>
<div><br></div>
</span><div>I&rsquo;ll look into this class. It&rsquo;s possible that I am mangling this reader by trying to shoehorn my problem into an inappropriate class at the moment. Thanks for pointing this out.</div>
<div><br></div>
<div>Many thanks,</div>
<div>James</div>
<div><div>
<br><div>
<blockquote type="cite">
<div>On 24 Aug 2015, at 15:31, Dan Lipsa &lt;<a href="mailto:dan.lipsa <at> kitware.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=dan.lipsa <at> kitware.com&amp;cc=&amp;bcc=&amp;su=&amp;body=','_blank');return false;">dan.lipsa <at> kitware.com</a>&gt; wrote:</div>
<br><div>
<div dir="ltr">James,
<div>You are missing image-&gt;SetDimensions() - that may be a reason why your scalar does not have all values.</div>
<div><br></div>
<div>vtkRectilinear grid is like an image data with variable extents and warped grid.</div>
<div><br></div>
</div>
<div class="gmail_extra">
<br><div class="gmail_quote">On Fri, Aug 21, 2015 at 6:55 AM, James Furness <span dir="ltr">
&lt;<a href="mailto:pcxjf1 <at> nottingham.ac.uk" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=pcxjf1 <at> nottingham.ac.uk&amp;cc=&amp;bcc=&amp;su=&amp;body=','_blank');return false;">pcxjf1 <at> nottingham.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Hello,<br><br>
I have a program that will produce an output either in csv, or a binary format (which I have written and can alter).<br><br>
The data points are constructed by taking 3 vectors, and stepping at set intervals along these vectors to construct a 3D set of data. Ultimately there shouldn&rsquo;t be a restriction on the three vectors, so the data may not be in a rectilinear array. But I&rsquo;m leaving
 this for now and assuming the data is constructed from 3 orthogonal Axis aligned vectors to create a rectilinear structured grid. When I have a better grasp of preview readers I&rsquo;ll update the reader to account for this. I guess it would require an unstructured
 data type to handle non-orthogonal grids?<br><br>
Also, the user is free to select what data they save from the program. This could be many fields, both vector and scalar quantities. What has been selected is stored in a header to the file, and known on reading. For my toy example I save only one scalar quantity.<br><br>
I&rsquo;ve been trying to write a reader for paraview to import the binary files output. The csv format works ok, but the files can become large and it is a pain to have to construct the vector quantities from 3 scalars in each case, I want to avoid the user having
 to do this work. Another reason for writing a custom reader is to include additional information into the binary file for visualisation (e.g. the position of atoms, not a field quantity).<br><br>
With that background and reasoning I have managed to follow the documentation enough to read a basic test file, get the origin and point spacing, and read a single scalar quantity into a vtkDataArray owned by a vtkImageData object. Paraview picks this up seemingly
 correctly, with one flaw:<br><br>
It only takes 2 elements from each dimension, 0 and 1 displaying 8 elements in total. I am confident it has read the other values correctly as the Information tab reports &ldquo;X extent 0 to 3&rdquo; &ldquo;X range: -1 to 1&rdquo; (as expected) and similar for the other dimensions.
 If I view the data in spreadsheet layout the 8 values it has seem correct, but the others are missing.<br><br>
The code I am using in the reader&rsquo;s RequestData(&nbsp; ) function is added below.<br><br>
Does anyone know why this may be happening and how to fix it? Also, any advice on how I should structure the reader to handle the non-orthogonal data?<br><br>
Thanks for your time, and thank you for such a stellar program. The results paraview produces for this data is brilliant, hence my want to make it convenient for our users!<br><br>
Regards,<br>
James Furness<br><br><br>
CODE for RequestData( ) Method:<br>
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br><br>
int LondonReader::RequestData(<br>
&nbsp; &nbsp; &nbsp; &nbsp; vtkInformation*,<br>
&nbsp; &nbsp; &nbsp; &nbsp; vtkInformationVector**,<br>
&nbsp; &nbsp; &nbsp; &nbsp; vtkInformationVector *outputVector)<br>
{<br>
&nbsp; &nbsp; vtkWarningMacro("Requesting the data!");<br><br><br>
&nbsp; &nbsp; ifstream finp;<br>
&nbsp; &nbsp; finp.open(this-&gt;FileName, ios::in | ios::binary);<br><br>
&nbsp; &nbsp; if (<a href="http://finp.is" target="_blank">finp.is</a>_open()) {<br>
&nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; "File is open without problem!" &lt;&lt; endl;<br>
&nbsp; &nbsp; }&nbsp; &nbsp;else&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; "File failed to open :(" &lt;&lt; endl;<br>
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>
&nbsp; &nbsp; }<br><br>
&nbsp; &nbsp; // size of real numbers may not be 8. Check for this from file header<br>
&nbsp; &nbsp; int realSize;<br>
&nbsp; &nbsp; finp.read((char*)&amp;realSize, sizeof(int));<br>
&nbsp; &nbsp; if(realSize != 8)&nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; "Not implimented yet!" &lt;&lt; endl;<br>
&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>
&nbsp; &nbsp; }<br><br>
&nbsp; &nbsp; // number of data fields<br>
&nbsp; &nbsp; int nFields;<br>
&nbsp; &nbsp; finp.read((char*)&amp;nFields, sizeof(int));<br><br>
&nbsp; &nbsp; vtkImageData* image = vtkImageData::GetData(outputVector);<br><br>
&nbsp; &nbsp; // Read the dimensions of the grid and set the extent accordingly<br>
&nbsp; &nbsp; int gridDim[3];<br>
&nbsp; &nbsp; finp.read((char*)&amp;gridDim, 3*sizeof(int));<br>
&nbsp; &nbsp; int extent[6] = {0, gridDim[0]-1, 0, gridDim[1]-1, 0, gridDim[2]-1};<br>
&nbsp; &nbsp; image-&gt;SetExtent(extent);<br><br><br>
&nbsp; &nbsp; // Read the field names from the file<br>
&nbsp; &nbsp; std::vector&lt;std::string&gt; fields;<br>
&nbsp; &nbsp; std::string strBuf;<br>
&nbsp; &nbsp; for (int i = 0; i &lt; nFields; i++)&nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; std::getline( finp, strBuf, '\0');<br>
&nbsp; &nbsp; &nbsp; &nbsp; fields.push_back(strBuf);<br>
&nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; "Printing Fields (" &lt;&lt; i &lt;&lt; "): " &lt;&lt; fields[i] &lt;&lt; endl;<br>
&nbsp; &nbsp; }<br><br>
&nbsp; &nbsp; // setup image for only one field for test case<br>
&nbsp; &nbsp; image-&gt;AllocateScalars(VTK_FLOAT, 1);<br>
&nbsp; &nbsp; vtkDataArray* scalars = image-&gt;GetPointData()-&gt;GetScalars();<br><br>
&nbsp; &nbsp; // currently there is only one field 'rho'<br>
&nbsp; &nbsp; scalars-&gt;SetName(fields[3].c_str());<br><br>
&nbsp; &nbsp; double x, y, z, rho;<br>
&nbsp; &nbsp; double oX, oY, oZ;&nbsp; &nbsp; &nbsp; //origin coordinates<br>
&nbsp; &nbsp; double sX, sY, sZ;&nbsp; &nbsp; &nbsp; //spacing of points<br><br>
&nbsp; &nbsp; for (vtkIdType itx = 0; itx &lt; gridDim[0]; itx++)&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; for (vtkIdType ity = 0; ity &lt; gridDim[1]; ity++)&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (vtkIdType itz = 0; itz &lt; gridDim[2]; itz++)&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; finp.read((char*)&amp;x, realSize);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; finp.read((char*)&amp;y, realSize);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; finp.read((char*)&amp;z, realSize);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; finp.read((char*)&amp;rho, realSize);<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Find and set the origin and spacing<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (itx == 0 &amp;&amp; ity == 0 &amp;&amp; itz == 0)&nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; image-&gt;SetOrigin(x, y, z);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oX = x; oY = y; oZ = z;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;else if (itx == 1 &amp;&amp; ity == 0 &amp;&amp; itz == 0)&nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sX = x - oX;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;else if (itx == 0 &amp;&amp; ity == 1 &amp;&amp; itz == 0)&nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sY = y - oY;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;else if (itx == 0 &amp;&amp; ity == 0 &amp;&amp; itz == 1)&nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sZ = z - oZ;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //check correct read.<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cerr &lt;&lt; x &lt;&lt; "," &lt;&lt; y &lt;&lt; "," &lt;&lt; z &lt;&lt; "," &lt;&lt; rho &lt;&lt; ", at " &lt;&lt; itx*(gridDim[1]*gridDim[2]) + ity*gridDim[2] + itz &lt;&lt; endl;<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //add value<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scalars-&gt;SetTuple1(itx*gridDim[1]*gridDim[2] + ity*gridDim[2] + itz,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rho);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; }<br><br>
&nbsp; &nbsp; image-&gt;SetSpacing(sX, sY, sZ);<br><br>
&nbsp; &nbsp; image-&gt;Print(cerr);<br><br>
&nbsp; &nbsp; return 1;<br>
}<br><br><br><br><br><br>
This message and any attachment are intended solely for the addressee<br>
and may contain confidential information. If you have received this<br>
message in error, please send it back to me, and immediately delete it.<br><br>
Please do not use, copy or disclose the information contained in this<br>
message or in any attachment.&nbsp; Any views or opinions expressed by the<br>
author of this email do not necessarily reflect the views of the<br>
University of Nottingham.<br><br>
This message has been checked for viruses but the contents of an<br>
attachment may still contain software viruses which could damage your<br>
computer system, you are advised to perform your own checks. Email<br>
communications with the University of Nottingham may be monitored as<br>
permitted by UK legislation.<br><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank">
www.kitware.com</a><br><br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br><br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">
http://paraview.org/Wiki/ParaView</a><br><br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=ParaView</a><br><br>
Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div></div>
</div>
<div><div>
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
</div></div>
</div>

</blockquote>
</div>
<br>
</div>
</div>
</div></div>

Gmane