[Paraview] Assign scalars/vectors to mesh points in vtkRectilinearGrid, C++
Andy Bauer
andy.bauer at kitware.com
Tue Apr 2 21:03:08 EDT 2013
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 Tue, Apr 2, 2013 at 4:20 PM, Paw Møller <pawsen at gmail.com> wrote:
> 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 data range = [3.5 1333.5], which is
> correct. And if I manually set the color range to this, everything is good.
> Pressing the automatic color scale(rescale to data), the used interval is
> set back to [0 1].
> Why is that?
>
> I use to code suggested by Joe,
> vtkFloatArray* temperature = vtkFloatArray::New();
> temperature->SetName("Temperature");
> temperature->SetNumberOfComponents(1);
> temperature->SetNumberOfValues(mesh.nn);
> for(int i=0;i<mesh.nn;i++){
> temperature->SetValue(i,3.5);
> }
> rgrid->GetPointData()->AddArray(temperature);
>
> And is it possible to update the plot if I overwrite the .vtr file,
> without closing and reopening the file?
>
> Paw
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130402/7b36a909/attachment.htm>
More information about the ParaView
mailing list