[vtkusers] Filter to change vtkDataArray name?
Cory Quammen
cquammen at cs.unc.edu
Thu Oct 21 10:33:54 EDT 2010
On Thu, Oct 21, 2010 at 10:29 AM, David Doria <daviddoria at gmail.com> wrote:
> 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
David,
Thanks for your response.
If I do as you suggest, won't the name get clobbered if there are
upstream changes in the pipeline? I'll be changing the upstream
filters frequently.
Thanks,
Cory
--
Cory Quammen
Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
More information about the vtkusers
mailing list