[vtkusers] Using vtk for array storage. Is it significantly slower?

Dominik Szczerba domi at vision.ee.ethz.ch
Wed May 3 10:11:34 EDT 2006


You can attach a raw data array to vtkArrays while chosing if you want
it deleted on calling the destructor or not. See SetArray method
implemented for each particular array type. This is very nice and very
fast and doesnt force you to do any copying/converting.
cheers
Dominik

Mark Gooding wrote:
> Hello,
> 
> All my data processing and visualisation is done using C++. Until now
> I have been storing data as arrays of unsigned chars and working using
> these in my data processing. For visualisation I have then copied
> these to a vtkUnsignedCharArray and used that within my pipeline.
> However, this approach means that I end up storing two copies of my
> data and often spend a little time copying changes across.
> 
> I have been thinking about changing what I do so that only the
> vtkUnsignedCharArray is used for storage and then accessing the data
> using GetValue/SetValue. Is this a sensible approach or will it be
> significantly slower? Are there any other factors I should consider?
> 
> Cheers,
> 
> Mark
> 
> p.s.I'm still having a problem with displaying image planes using
> vtkImageMapToColors. Help on that would also be appreciated. See
> http://www.robots.ox.ac.uk/~gooding/vtkbizarre.html for more details
> of that problem.
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkuser
> s

-- 
Dominik Szczerba, Dr.
ETZ C110 CO-ME/BIWI CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list