[vtkusers] How do I get around no vtkscalars in 4.0?

Randy Heiland heiland at ncsa.uiuc.edu
Thu Oct 31 04:44:59 EST 2002

On Oct 30,  4:37pm, Alex Lear wrote:
> Subject: [vtkusers] How do I get around no vtkscalars in 4.0?
> Hello,
> I have an 3d array of values that I want to apply to a structured points set.
> In VTK 3.2 I would create vtkScalars with that data and then use:
> MyStructuredPoints->GetPointData()->SetScalars(MyScalars);
> I have upgraded to VTK 4.0 but my program obviously has errors due to the
> fact there is no more vtkScalars supported.  How can I apply my scalar data
> to those structured points?
> Thanks,
> Alex Lear

This is a frequent topic and just as a friendly suggestion, if you didn't
already, try using the VTK mail archive search engine at:

But to answer your question, instead of using vtkScalars now, just use
vtkFloatArray.  Your other line, ...SetScalars(floatarray), should work fine.


More information about the vtkusers mailing list