Coyote's Guide to IDL Programming

Reading Image Pixel Location and Value

QUESTION: The RDPIX command I've used forever doesn't seem to work in the new IDL version I just updated to. Do you have a program that does the same thing, but works in this version?

ANSWER: The RDPIX program goes all the way back to almost the first version of IDL! It was written way before widgets were invented.

In any case, here is a Read_Pixel program that does the same thing. You call it like this, passing it a 2D image.

   IDL> Read_Pixel, image

[Return to IDL Programming Tips]