Hello Yang,<div><br></div><div>Reply to both, or at least to the mailing list address so all the users can participate in the thread.</div><div><br></div><div>Best, safest and fastest way to access pixels in ITK are Image iterators: have a look at the chapter 11 from the ITK software guide for more info and examples:</div>
<div><a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a></div><div><br></div><div>with the iterator you can traverse the image reading a voxel each time, that you can copy to your matrix</div>
<div><br></div><div>Also, what do you mean when you ask for "testing codes in ITK"?</div><div><a href="http://www.itk.org/ItkSoftwareGuide.pdf"></a><br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 12:03 PM, Guang Yang <span dir="ltr"><<a href="mailto:samggyy@gmail.com">samggyy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Hi Sergio,</div>
<div> </div>
<div>Thanks for your reply. I am not sure if I can send you the email directly or I need to send it to <span><a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>. I am a starter :-)</span></div>
<div><span></span> </div>
<div><span>Do you know if there is an example or testing codes in ITK? Or somewhere on the interenet. Do we need something like a image->GetBufferePointer() to get the pixel or voxel?</span></div>
<div><span></span> </div>
<div><span>Thanks a lot.</span></div>
<div><span></span> </div>
<div><span></span> </div>
<div><span>Best regards,</span></div>
<div><span>Yang</span></div><div><div></div><div class="h5">
<div><br><br> </div>
<div><span class="gmail_quote">On 8/6/10, <b class="gmail_sendername">Sergio Vera</b> <<a href="mailto:sergio.vera@alma3d.com" target="_blank">sergio.vera@alma3d.com</a>> wrote:</span>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
<div>Hi Guan Yang</div>
<div><br> </div>Use a Iterator to read the voxels from your image and then,copy them into a standard matrix
<div><br> </div>
<div>you can find the specific details in the chapter of the insight guide devoted to iterators.</div>
<div><br> </div>
<div>Sergio<br><br>
<div class="gmail_quote">
<div><span>On Fri, Aug 6, 2010 at 2:13 AM, Guang Yang <span dir="ltr"><<a href="mailto:samggyy@gmail.com" target="_blank">samggyy@gmail.com</a>></span> wrote:<br>
</span></div>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
<div><span>
<div>Hi there, </div>
<div> </div>
<div>May I ask how to transfer ITK image to matrix or vector?</div>
<div> </div>
<div>I need to put ITK image pixels into a matrix form or put them in a vector. The image might be 3D images, then how to put all the voxels in a vector?</div>
<div> </div>
<div>Thanks.</div><br></span></div>_____________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com/" target="_blank">www.alma3d.com</a><br>
</div></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>