<div dir="ltr">This example may help:<br><a href="http://vtk.org/Wiki/VTK/Examples/Cxx/ImageData/CellIdFromGridCoordinates">http://vtk.org/Wiki/VTK/Examples/Cxx/ImageData/CellIdFromGridCoordinates</a><br><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Aug 22, 2013 at 12:49 PM, Manuel Corrales <span dir="ltr">&lt;<a href="mailto:manuelcorrales@gmail.com" target="_blank">manuelcorrales@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello, <div><br></div><div>does VTK provides a way of mapping a vtkImageData 3d coordinate to an vtkArray 1d coordinate and back? I.e: can I get the relation between the 3 indices that I have to pass to GetScalarPointer and the 1 index I have to pass to GetTuple()?</div>

<div><br></div><div><span style="color:rgb(128,0,128)">vtkImageData</span><span style>-&gt;</span><span style="font-style:italic">GetScalarPointer</span><span style>(</span><span style>indices</span><span style>[</span><span style="color:rgb(0,0,128)">0</span><span style>],</span><span style="color:rgb(192,192,192)"> </span><span style>indices</span><span style>[</span><span style="color:rgb(0,0,128)">1</span><span style>],</span><span style="color:rgb(192,192,192)"> </span><span style>indices</span><span style>[</span><span style="color:rgb(0,0,128)">2</span><span style>])</span><br>

</div><div><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128);font-family:arial">vtkImageData</span><span style>-&gt;</span><span style>GetPointData</span><span style>()-&gt;</span><span style>GetScalars</span><span style>()-&gt;GetTuple(0);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style><br></span></pre></pre><pre style="margin-top:0px;margin-bottom:0px"><div style="font-family:arial;white-space:normal">Thanks in advance.</div><div style="font-family:arial;white-space:normal">

Regards,</div><div style="font-family:arial;white-space:normal">Manuel</div></pre></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/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" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>