[vtkusers] About vtkScalars, vtkVectors, vtkNormals, etc

Mathieu Malaterre mmalat at imaging.robarts.ca
Tue Jul 16 18:06:06 EDT 2002


Hi Yuan,

   You can have a look to :
http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.007.htp
and:
http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.009.htp

You'll find that :
vtkScalars *scalars = vtkScalars::New();
scalars->SetNumberOfScalars(N_POINTS);

is replaced, for example, by:
vtkFloatArray *scalars = vtkFloatArray::New();
scalars->SetNumberOfComponents(1);
scalars->SetNumberOfTuples(N_POINTS);

Otherwise you can use any of the classes derived from vtkDataArray:
http://public.kitware.com/VTK/doc/nightly/html/classvtkDataArray.html)

HTH
mathieu

Yuan Jin wrote:

> Hi all,
>
> before I used vtk3.2 in which I can create instance of vtkScalars like
> below:
>
> vtkScalars *scalar = vtkScalars:New();
>
> anybody knows what I should do in vtk4.0?
>
> vtkDataArray *da = vtkDataArray::New()
> doesn't work since vtkDataArray is a abstract class.
>
> thanks
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

--
Malaterre, Mathieu
The John P. Robarts Research Institute
Imaging Research Laboratories
http://www.imaging.robarts.ca/~mmalat






More information about the vtkusers mailing list