Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-03 Thread Andy Bauer
It's not meant to be edited. I just delete it when I figure out that's the problem but that is very rare. Andy On Wed, Apr 3, 2013 at 2:41 PM, Paw Møller wrote: > > try running with the -dr option > That did the trick. Thank you. > > Deleted the registry file from ~/.config/Paraview, but I was

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-03 Thread Paw Møller
> try running with the -dr option That did the trick. Thank you. Deleted the registry file from ~/.config/Paraview, but I was not able to find any entry saying something like 'Temperature=foo'. So how do I edit the file from within Paraview?. Searching the wiki didn't reveal anything. Paw __

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-03 Thread Andy Bauer
I'm not able to reproduce this issue. It might be that your registry is causing problems. Can you try running with the -dr option which disables the registry (i.e. "forgets" any previous settings you may have saved in ParaView)? Andy On Wed, Apr 3, 2013 at 3:52 AM, Paw Møller wrote: > Forgot t

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-03 Thread Paw Møller
Forgot the file itself. As attachment. sem_0001.vtr Description: Binary data ___ 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 Para

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-03 Thread Paw Møller
Of course Temperature= [0:1:1330]; . I'm using Paraview 3.14.1 64-bit. ___ Powered by www.kitware.com Visit other Kitware open-so

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread Andy Bauer
Could you share your generated file? I'm not sure why the rescale to data range is scaling it to the range [0,1]. Also, what version of ParaView are you using? Modifying the file won't cause ParaView to reread it as the reader will not notice that the time stamp on the file has changed. Andy On

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread Paw Møller
Superb, That was it. Thanks, both of you. But I have another question. The automatic scaling of the vector field works as expected. The scaling of the temperature however does not(array of floats). It set the range to [0 1], regardless of the actual values. Paraview(under information) gives the d

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread Andy Bauer
You're missing the vtkPointData header file so you just need to add: #include "vtkPointData.h" Andy On Tue, Apr 2, 2013 at 3:33 PM, Paw Møller wrote: > Thanks for the answer Joe, > > but I still get a compilation error for > > rgrid->GetPointData()->AddArray(temperature); > > The error: > inval

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread joseph insley
Hi, Paw, I believe the problem is that you are mixing calls for scalars and vectors… For scalars you want to use SetNumberOfValues()/SetValue(): vtkIntArray* temperature = vtkIntArray::New(); temperature->SetName("Temperature"); temperature->SetNumberOfComponents(1); temperature-

Re: [Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread Paw Møller
Thanks for the answer Joe, but I still get a compilation error for rgrid->GetPointData()->AddArray(temperature); The error: invalid use of incomplete type ‘class vtkPointData’ In file included from /usr/include/vtk-5.8/vtkPointSet.h:29:0, from /usr/include/vtk-5.8/vtkStructuredG

[Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++

2013-04-02 Thread Paw Møller
Hi, Using the C++ VTK library for writing an .vtr file, I'm able to create the mesh, but not assign any skalars/vectors to the grid points. This is more or less given in the example file RGrid.cxx. But how do I assign values at the mesh-points? Write the mesh: #include #include #include #inc