[vtkusers] Re: vtkSelectVisiblePoints

Will Schroeder will.schroeder at kitware.com
Wed Apr 4 09:46:11 EDT 2001


Hi Simon-

>ERROR: In D:\vtk-daily\vtk\imaging\vtkLabeledDataMapper.cxx, line 240
>vtkLabeledDataMapper (01684DB0): Need input data to render labels
> 
>Now I would of thought that line
>    filter->GetOutput()->GetPointData()->SetScalars(scalars);
>has set the scalar values. Am I wrong??? is there some funny referencing going on here???
> 

When a filter executes it initializes its output. You are setting scalars on an output, then the pipeline executes and throws it away. You can either a) do a manual Update() on the filter prior to setting the scalars, or b) do it the "correct" way and use a filter to insert the scalars into the data. For example, use vtkProgrammableAttributeDataFilter, or create a dummy dataset (with the scalars inside) and use vtkMergeFilter, or roll your own filter.

Will


Dr. William J. Schroeder
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 (Phone & Fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010404/d23c0821/attachment.htm>


More information about the vtkusers mailing list