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

Home » Public Forums » archive » Re: divise image envi-idl
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: divise image envi-idl [message #70967 is a reply to message #70966] Tue, 18 May 2010 12:03 Go to previous messageGo to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
On 18/05/2010 1:50 PM, tonino wrote:
> Thank you very much Jean,
>
> I'm sure those advices will be useful for the next step. For now, the
> problem concerns the line :
>
> result = image[i:i+((NSimage/5)-1),j:j+((NLimage/2)-1),0:NBimage-1]
>
> the error message is :
>
> Subscript range values of the form low:high must be>= 0,< size, with
> low<= high: IMAGE.
> % Execution halted at: TUILAGE 18 C:\Documents and Settings
> \Administrateur\Mes documents\tuilage.pro

try to print these values... It it probably happening for your last i
and/or j in the loop. Are you sure than NS is a multiple of 5 and NL of
2? if not, you can prepare your index before doing the subscript:
subNS = (i+((NSimage/5)-1)) < (NSimage-1)
subNL = (j+((NLimage/2)-1)) < (NLimage-1)
result = image[i:subNS,j:subNL,0:NBimage-1]

be sure, when you save the result with envi_write_envi_file, to compute
the proper ns and nl!

Jean


>
> and it still comes if I change the data type or if I transform the
> variable 'result' into a float array...
>
> I think I don't write the terms of the loop properly
>
> ... if you have an idea.
>
> thanks again for your answer
> nestonino
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: x-y offsets
Next Topic: Why do I get the string in ytitle in vertical direction

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

Current Time: Sat Oct 11 18:01:50 PDT 2025

Total time taken to generate the page: 1.72244 seconds