[vtkusers] Re: writing several scalars in one file (py and C)...

Dominik Szczerba domi at vision.ee.ethz.ch
Thu Apr 5 13:59:19 EDT 2007


You can construct vtkArray from a buffer I think, SetData(*buf) or something. 
Just make sure you check the flag not to delete[] it if you manage the buffer 
yourself.
Dominik

On Thursday 05 April 2007 19:56, fred wrote:
> David C Thompson a écrit :
> > If you use Allocate (or SetNumberOfTuples), then you should use SetValue
> > or SetTuple instead of InsertNextValue or InsertNextTuple. The routines
> > that begin with InsertNext perform bounds checks on each insert which
> > can slow things down.
>
> Ok, I use SetNumberOfTuples and SetTuple{1,3}.
> Works fine.
>
> But in this case, I do still use for loops.
> There is no way to write something like
>
> vtkdata.SetSomeFunction(data)
>
> where data is a full scipy array for instance ?
>
> I'm looking for performance in writing big data files (~ n * 100 Mb).
>
> Cheers,

-- 
Dominik Szczerba, PhD
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list