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

Home » Public Forums » archive » Re: Error: Array has a corrupted descriptor
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: Error: Array has a corrupted descriptor [message #51561 is a reply to message #51556] Tue, 28 November 2006 08:06 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gongqin Shen writes:

> Thank you for paying attention to my question. Bascially, "do
> something here" is just some basic array manipulation like:
> arr = arr3D[1:2, *]
> arrInd[0, *] -= a
> arrInd[1, *] -= b
> arr[arrInd] = 1B
> aLabeled = Label_Region(arr)
>
> FOR j = 1, MAX(aLabeled) DO BEGIN
> ithIdx = (WHERE(aLabeled EQ j))[0]
> outputList = [outputList, ithIdx]
> ENDFOR
>
> I hope your eagle eye can find out where the glitch comes from. :-).

I think the likely suspect is this line:

outputList = [outputList, ithIdx]

At the *very* least, I would write this line like this:

outputList = [Temporary(outputList), ithIdx]

But I think you might be better off making output list as big
as you need it (or bigger) and then filling it. I suspect
the constant recreating of this array is fragmenting memory
like crazy and resulting in your problems.

void = Where(aLabeled GT 0, count)
outputList = Lindgen(count)

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
Read Message
Previous Topic: Error: Array has a corrupted descriptor
Next Topic: natural neighbor interpolation

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

Current Time: Fri Oct 10 08:21:48 PDT 2025

Total time taken to generate the page: 0.16233 seconds