<div class="gmail_quote">On Thu, Oct 21, 2010 at 10:24 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is there a filter that will change the name of a particular data array<br>
in a vtkDataSet?<br>
<br>
I'll explain my need. I am using vtkImplicitModeller to compute<br>
distances of points from a surface. I'd like to use these distance<br>
scalars in vtkArrayCalculator, but the vtkDataSet produced by<br>
vtkImplicitModeller does not have a name. So far I haven't been able<br>
to figure out how to access these scalars in vtkArrayCalculator. If I<br>
modify vtkImplicitModeller.cxx to set the name of the output scalars,<br>
I can use it in the calculator with no problem.<br>
<br>
Thanks in advance for the help,<br>
Cory<br></blockquote><div><br></div><div>If ImplicitModeller sets that array as the active scalars, you should be able to do</div><div><br></div><div>modeller->GetOutput()->GetScalars()->SetName("YourArray");</div>
<br><div>David </div></div>