[vtkusers] Setting vtkImageData from regular float array
Gib Bogle
g.bogle at auckland.ac.nz
Mon Jan 1 04:20:19 EST 2018
There is probably a better way, but one way is to create an ITK image then convert it to a VTK image:
https://itk.org/ITKExamples/src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Documentation.html
It is easy to create an ITK image, allocate the buffer then copy your data into the buffer. Of course this requires you to have ITK installed.
________________________________________
From: vtkusers <vtkusers-bounces at vtk.org> on behalf of VTKJunky <hadas.judah at gmail.com>
Sent: Monday, 1 January 2018 9:24 p.m.
To: vtkusers at vtk.org
Subject: [vtkusers] Setting vtkImageData from regular float array
I have float array which represents a 2-D image. I'd like to set it into
vtkImageData, but can't work out how to do this. The problem is, all the
examples use a vtkReader to read in the data, I already have the data.
Any help would be greatly appreciated,
Thanks!
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list