[Insight-developers] SimpleITK - Image::GetPixel methods

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Apr 22 16:25:03 EDT 2011


Gaetan,

You have provided valuable feedback with several other python related issues and was looking for comments on the current.

Despite it sounding easy, implementing the sitk::Image::GetPixel method is rather challenging due to the numerous types of images underneath. I have a branch in my SimpleITK github, which will add this much needed feature. 

The sitk::Image class will be customized for each language to provide a natural interface. This is what I have done for python:

https://github.com/blowekamp/SimpleITK/commit/b821617f013ee18c7cc2ae727eec3d20ad2b5875

I realize now it needs some comments....

It is not clear to me if the index argument should be multiple arguments or an array, or both. As arguments are not strongly typed, I am not certain of how to do methods overloading, based on the arguments. In another methods I used isinstance(), but some frown about that. Do you have a suggestion on how I should overload methods in python? What do you think of this current interface?

Brad

========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110422/c3dd81ac/attachment.htm>


More information about the Insight-developers mailing list