[vtk-developers] vtkFieldData::AddArray() is very painful with lots of arrays
pat marion
pat.marion at kitware.com
Fri Nov 6 15:40:59 EST 2009
If you're open to different approaches, there is code in vtk edge to
serialize certain types of vtkDataArray to xml (no support for
binary). It works for int, idType, and double arrays. It would be
easy to add support for other array types. Of course, I haven't given
the serializer a good stress test of 90,000 arrays, it's possible
there is some n^2 behavior hidden in it somewhere but I haven't
noticed any problems yet. It also serializes vtkInformation objects
quite well.
https://www.kitware.com/cgi-bin/viewcvs.cgi/trunk/VTKEdge/IO/Testing/Cxx/TestSerializeInformation.cxx?rev=870&root=KWPublic&view=auto
The above link is to some example code. It doesn't serialize
vtkDataArray but it gives you the idea.
Pat
On Fri, Nov 6, 2009 at 3:19 PM, Wilson, Andrew T <atwilso at sandia.gov> wrote:
> On 11/6/09 2:08 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>> Is it possible to use an stl container?
>
> I'm confused -- use an STL container for what? For the hashtable?
> Certainly, as long as it's wrapped in a PIMPL implementation. For my state
> arrays? Sure -- that's how I store them internally in my application where
> fast access is paramount and then convert them to/from VTK arrays for
> storage. I'd rather not have to write my own reader/writer if I can help
> it.
>
> Am I missing the point of your suggestion?
>
> -- Andy
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
More information about the vtk-developers
mailing list