[vtkusers] vtkDenseArray and std::vector
David E DeMarle
dave.demarle at kitware.com
Thu Jun 14 14:42:42 EDT 2012
Use vtkUnsignedIntArray::SetArray(unsigned int *, vtkIdType size, int save)
See: http://www.vtk.org/doc/nightly/html/classvtkUnsignedIntArray.html#a007f4f28c0c6e3d1d91c748e03f8f841
All of the vtk data array types have something similar and they will
not be deprecated.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Thu, Jun 14, 2012 at 9:16 AM, GloW <mathieu.westphal at gmail.com> wrote:
> 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
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkDenseArray-and-std-vector-tp5713883.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list