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

Home » Public Forums » archive » Re: Getting ROI data from an image
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: Getting ROI data from an image [message #77853] Mon, 03 October 2011 06:15 Go to previous message
Rebecca is currently offline  Rebecca
Messages: 4
Registered: October 2011
Junior Member
OK, thanks for the help on understanding IDL's subscripting!


On Sep 30, 5:32 pm, David Fanning <n...@dfanning.com> wrote:
> Rebecca writes:
>> That's great, and it makes so much sense, but it doesn't seem like IDL
>> obeys those laws of indexing. Using
>> temp = img[x,y,*]
>> produces an out of memory error. It's not hard to figure out why-
>> temp = img[x,y,0]
>> Produces a [npix, npix] array, where npix is the number of pixels
>> referenced in 'indices'. What I was expecting to happen was a [npix]
>> vector! IDL is playing by different rules here.
>
>> npix = N_ELEMENTS(indices)
>> z = INTARR(npix)
>> temp = img[x,y,z]
>
>> That produces the magical vector array I want. So, is there any way to
>> play by these rules and grab 300 bands worth of data at once so I have
>> a [npix, bands] array? Or should I give up the chase and just FOR loop
>> it?
>
> Actually, you are doing this correctly by making
> your own index vector. See the latter half of
> this article:
>
>   http://www.idlcoyote.com/misc_tips/submemory.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.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
Previous Topic: Multi-Threading in ENVI
Next Topic: finding confidence interval in spectral analysis ( something similar to chi2conf.m in matlab)

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

Current Time: Fri Oct 10 04:59:08 PDT 2025

Total time taken to generate the page: 1.12189 seconds