comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Cannot understand a part of the IDL routine!! pls help!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Cannot understand a part of the IDL routine!! pls help!! [message #71063 is a reply to message #70925] Sun, 23 May 2010 09:07 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bala murugan writes:

> The following is a part of the IDL routine for region grow. The
> following three lines of code is used to define the pixels that is the
> ROI pixels.
> x = FINDGEN(16*16) MOD 16 + 276
> y = LINDGEN(16*16) / 16 + 254
> roiPixels = x + y * imgDims[0]
>
> The question is how does it define the ROI pixels?
> I dont see how it does........ Somebody please help me by giving a
> simple and clear description.

What is happening here is the IDL is turning one-dimensional
image indices into two-dimensional image indices. Before
the advent of the function Array_Indices, we always had
to do this by hand. This code was obviously written in
those long-ago dark days.

Here is an article that explains this process in some
detail:

http://www.dfanning.com/tips/where_to_2d.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Matching data in different time resolution
Next Topic: running an IDL .pro from outside IDL e.g. from a .bat file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:42 PDT 2025

Total time taken to generate the page: 0.00351 seconds