Re: Problems with tying ROI's to image [message #66920 is a reply to message #66916] |
Wed, 17 June 2009 15:01  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lauren Hunkins writes:
> I'm currently trying to create a program that prints out statistics
> from ROI's created by a geologist. I keep having an error message
> come up.
>
> ************************************************************ *************
> class_stats_doit: An error has occurred during processing
>
> Error: "Array dimensions must be greater than 0." The result may be
> invalid.
> ************************************************************ *************
>
> I have read most of the posts that contain this error message and
> haven't been able to find anything that will help me solve my
> problem.
>
> My mentor and I came to the conclusion that the ROI was not being tied
> to the image. We tried using some sample code from ENVI help that
> simply created and defined an ROI, but when we opened the image the
> ROI was not present. It seemed like there were some discrepancies in
> the ENVI about exactly how the image and the ROI are tied together. I
> have included the code for the program I wrote, as well as the code
> from the book that didn't seem to do anything.
Oddly enough, I've spent more than a few hours myself this week
with the very same error message from ENVI. I don't know anything
at all about your problem, but I have developed a new rule of thumb
for ENVI which at least got me past the error. (Alas, my program
still doesn't run correctly for God only knows what reason. I was
just about to write a post about it.)
My rule of thumb is this. ENVI uses a *lot* of required keywords in
its code. This goes against everything I know and believe about
keywords, but there you are. You have to be *extremely* careful
to supply these keywords or you more often than not get exactly
this kind of error. Maybe that is a good place to start looking.
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.")
|
|
|