[vtkusers] vtkDenseArray and std::vector

Mathieu Westphal mathieu.westphal at gmail.com
Thu Jun 14 09:26:16 EDT 2012


Hello

I'm interfacing now an HDF5reader with vtk.

this reader return me std::vector <unsigned int > , inside the vector, 
memory in contiguous, so i guess it is possible to give a to vtk a 
pointer to the data.

I think i should use vtkDenseArray in order to achieve that.

But i have not been able to find any method wich let me specify the 
pointer to the data, like in the deprecated 
vtkUnsignedIntArray::SetData(unsigned int * array, int size)

Howevet, i found vtkDenseArray <unsigned int>::ExternalStorage (const 
vtkArrayExtents &   extents,MemoryBlock *storage )

I can guess this MemoryBlock hold a pointer to the data, but i've not 
found anyway to specify where the memory block should point.

Please, i would appreciate any help here.

Thanks.

Mathieu



More information about the vtkusers mailing list