comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: I don't know why happened error
items: I don't know why happened error

Re: I don't know why happened error
type: item
description: Duck-Jin Park wrote: > > Hi All! > > I don't know why happened error on IDL4.0.. > follow function did not happened error on IDL5.1, but it exist error > IDL4.0 > what different two version? > Can you change follow source to IDL4.0? > > If i change array "[ ]" to "( )", it did not error.. > > That's correct: the [ ] syntax for elements of array variables did not exist in IDL4.0. It was introduced in IDL5.0 I believe. Dick French
creator: Richard G. French
date: 1999-07-07T07:00:00-00:00

I don't know why happened error
type: item
description: Hi All! I don't know why happened error on IDL4.0.. follow function did not happened error on IDL5.1, but it exist error IDL4.0 what different two version? Can you change follow source to IDL4.0? If i change array "[ ]" to "( )", it did not error.. ************************************************************ **** FUNCTION HR_LABEL_REGION,A ;Find the size of the array A. To do this we use the SIZE function. S=SIZE(A) & N=S[1] & M=S[2] ; The number of columns and rows in A Q=INTARR(N,M) ; Q will hold the results. It has the same size as A. L=0 ; L is the value of the current class. Start with L=0. EQU=INTARR(M*N*M) ; EQU is a place to record the class equivalencies in pass 1. th=16 ;Label the corner pixel. IF A[0,0] GT 0 THEN BEGIN L=L+1 & Q[0,0]=L EQU[L]=L ENDIF ;Label the pixels in the first row. FOR x=1,N-1 DO BEGIN IF A[x,0] GT 0 THEN BEGIN IF (A[x,0] GE (A[x-1,0]-th))AND (A[X,0] LE (A[X-1,0]+th)) THEN Q[x,0]=Q[x-1,0] ELSE BEGIN L=L+1 Q[x,0]=L EQU[L]=L ENDELSE ENDIF ENDFOR ; Label the remaining rows FOR y=1,M-1 DO BEGIN ; Label the first pixel in the row IF (A[0,y] GE (A[0,y-1]-th)) AND (A[0,Y] LE (A[0,Y-1]+th)) THEN Q[0,y]=Q[0,y-1] IF (A[0,y] GT 0) AND (A[0,y] LT (A[0,y-1]-th)) OR (A[0,Y] GT (A[0,Y-1]+th)) THEN BEGIN L=L+1 Q[0,y]=L EQU[L]=L ENDIF FOR x=1,N-1 DO BEGIN ; Label the rest of the elements in row y IF A[x,y] GT 0 THEN BEGIN IF (A[x,y] GE (A[x-1,y]-th)) AND (A[x,y] LE (A[x-1,y]+th)) AND (A[x,y] LT (A[x,y-1]-th)) OR $ (A[x,y] GT (A[x,y-1]+th)) THEN Q[x,y]=Q[x-1,y] IF (A[x,y] LT (A[x-1,y]-th)) OR (A[x,y] GT (A[x-1,y]+th)) AND (A[x,y] GE (A[x,y-1]-th)) AND $ (A[x,y] LE (A[x,y-1]+th)) THEN Q[x,y]=Q[x,y-1] IF (A[x,y] GE (A[x-1,y]-th)) AND (A[x,y] LE (A[x-1,y]+th)) AND (A[x,y] GE (A[x,y-1]-th)) AND $ (A[x,y] LE (A[x,y-1]+th)) THEN BEGIN IF ((Q[x-1,y]) GE (Q[x,y-1]-th)) AND ((Q[x-1,y]) LE (Q[x,y-1]+th)) OR ((Q[x-1,y]-TH) LE (Q[x,y-1])) AND $ ((Q[x-1,y]+TH) GE (Q[x,y-1]))THEN Q[x,y]=Q[x-1,y] ELSE BEGIN ; An equivalence of classes has been discovered. L1=Q[x-1,y]…
creator: Duck-Jin Park
date: 1999-07-08T07:00:00-00:00