[vtkusers] Filter to change vtkDataArray name?

David Doria daviddoria at gmail.com
Thu Oct 21 10:29:27 EDT 2010


On Thu, Oct 21, 2010 at 10:24 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:

> Is there a filter that will change the name of a particular data array
> in a vtkDataSet?
>
> I'll explain my need. I am using vtkImplicitModeller to compute
> distances of points from a surface. I'd like to use these distance
> scalars in vtkArrayCalculator, but the vtkDataSet produced by
> vtkImplicitModeller does not have a name. So far I haven't been able
> to figure out how to access these scalars in vtkArrayCalculator. If I
> modify vtkImplicitModeller.cxx to set the name of the output scalars,
> I can use it in the calculator with no problem.
>
> Thanks in advance for the help,
> Cory
>

If ImplicitModeller sets that array as the active scalars, you should be
able to do

modeller->GetOutput()->GetScalars()->SetName("YourArray");

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101021/7c40d180/attachment.htm>


More information about the vtkusers mailing list