[Insight-users] Efficiency in arbitrarily accessing pixel values in ITK image

Mengda Wu wumengda at gmail.com
Thu Oct 21 15:21:59 EDT 2010


Hi all,

   I am trying to compare the efficiency of different options to access
pixel values in ITK image. I understand if it is
a serial access (from begin to end), the iterator is the best choice. But
what if I would like to access one arbitrary
pixel at a time. What would be more efficient?

   (1) Use iterator->SetIndex(ind) and then iterator->Get() or
iterator->Set();
   (2) Use image->GetPixel(ind) or image->SetPixel(ind);
   (3) or something else

Thanks,
Mengda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101021/14a6fa02/attachment.htm>


More information about the Insight-users mailing list