[vtkusers] what about a vtkStringArray format ?

David Duke D.Duke at bath.ac.uk
Mon Feb 24 13:28:14 EST 2003


Sebastien MARAUX wrote:
> if you use it again, take care as the constructor use it to allocate tuple,
> leading to triple size memory use. (but if it is only used as a temporary
> element, this won't make a big difference between 1 or 3 floats)

It should be made clearer, but it is only used for the temporary.

> I cross my fingers, but I m affraid that using deepcopy on polydata
> indirectly call
> copytuple then. And I got a whole bunch of polydatatopolydata filters in use
> with temporary results ...

Yes that will be a problem.  Do you need to deepcopy the strings?

> I didn't understood well what is in stake with vtkObjectArray use ?
> is it to standardize management of non scientific standard types

I have data that doesn't neatly map onto the dataset structures 
supported in VTK, for example, graphs (a set of nodes, plus a set of 
edges between nodes).  If the graph is directed, each node, for example, 
will have a set of "in" edges and a set of "out"-edges.  I'm using 
vtkObjectArray so that I can have an array, indexed by node-id, of 
vectors containing the ids of the in- and out- edges.  Similar issues 
arise with clusters of nodes.  Etc.

> as data arrays ? does vtkObjectArray inherit from vtkDataArray ?

Yes, its a subclass of vtkVoidArray which is a subclass of vtkDataArray.

> and do you want to create this class to avoid additional modifications
> to vtkDataSetAttributes when adding such non scientific types
> as vtkDataArray subclass ? (all this subclasses would derive from
> vtkobjectArray ?)

Its a simpler approach to the problem, and one that I think could also 
be used to support strings (and other object types) in data arrays.

David



-- 
Dr. David Duke                        Email: D.Duke at bath.ac.uk
Department of Computer Science        Web:   www.bath.ac.uk/~masdad/
University of Bath                    Tel:   +44 1225 323 407
Bath, BA2 7AY U.K.                    Fax:   +44 1225 323 493




More information about the vtkusers mailing list