[vtkusers] how to initialize a vtkDataArray

Berk Geveci berk.geveci at kitware.com
Thu Feb 21 13:14:59 EST 2002


You need to create a concrete sub-class of vtkDataArray, such
as vtkFloatArray. Look at
http://public.kitware.com/VTK/doc/nightly/html/classvtkDataArray.html
for a list of sub-classes.

-Berk

On Thu, 2002-02-21 at 13:06, Song Li wrote:
> Hi,
>   Just wondering how to create a vtkDataArray, seems the code like :
> "vtkDataArray *xyz = vtkDataArray::New();" is not allowed by compiler,
> and if I don't do that, compiler will pass it but the program will crash
> at "xyz->SetNumberOfTuples(x);" , so is there any way to create it.
>   Just want to use vtkDataArray in V4.0 instead of vtkScalars in
> V3.2....
>   Thanks!
> 
> --
> Song Li
> VRAC(Virtual Reality Application Center),Iowa State University
> Email: lisong at vrac.iastate.edu
> Homepage: http://www.vrac.iastate.edu/~lisong
> 
> 





More information about the vtkusers mailing list