<div dir="ltr">HI!<div>Check out this example:</div><div><a href="https://lorensen.github.io/VTKExamples/site/Cxx/ImageData/ImageIteratorDemo/">https://lorensen.github.io/VTKExamples/site/Cxx/ImageData/ImageIteratorDemo/</a><br></div><div><br></div><div>it shows how to iterate through image data and modify it's value. You can assign values from your float array.</div><div>HTH,</div><div>Aron</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 1, 2018 at 4:20 AM, Gib Bogle <span dir="ltr"><<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is probably a better way, but one way is to create an ITK image then convert it to a VTK image:<br>
<br>
<a href="https://itk.org/ITKExamples/src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Documentation.html" rel="noreferrer" target="_blank">https://itk.org/ITKExamples/<wbr>src/Bridge/VtkGlue/<wbr>ConvertAnitkImageTovtkImageDat<wbr>a/Documentation.html</a><br>
<br>
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.<br>
______________________________<wbr>__________<br>
From: vtkusers <<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>> on behalf of VTKJunky <<a href="mailto:hadas.judah@gmail.com">hadas.judah@gmail.com</a>><br>
Sent: Monday, 1 January 2018 9:24 p.m.<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Subject: [vtkusers] Setting vtkImageData from regular float array<br>
<div class="HOEnZb"><div class="h5"><br>
I have float array which represents a 2-D image. I'd like to set it into<br>
vtkImageData, but can't work out how to do this. The problem is, all the<br>
examples use a vtkReader to read in the data, I already have the data.<br>
<br>
<br>
Any help would be greatly appreciated,<br>
Thanks!<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-Users-f1224199.html</a><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>