[vtkusers] Pass data in reader without copying?

Elvis Stansvik elvis.stansvik at orexplore.com
Sun Jul 3 13:59:41 EDT 2016


2016-07-03 19:57 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:

> If I'm writing my own custom volume reader, and I have the read data in
> memory (say as a float*). If I know the data is in the right format/layout,
> can I somehow pass ownership of that data to the output of the algorithm
> without incurring a copy?
>
> I've been looking at some of the simpler readers that come with VTK, but
> all of them seems to copy the read data to the output (?).
>

Looking at vtkImageData, what I would like (I think) is some way of setting
the pointer that is returned by vtkImageData::GetScalarPointer.

Elvis


> Thanks,
> Elvis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160703/f2bb1e50/attachment.html>


More information about the vtkusers mailing list