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

Home » Public Forums » archive » Re: New problem in loading image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: New problem in loading image [message #80474] Thu, 14 June 2012 04:32
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den torsdagen den 14:e juni 2012 kl. 11:44:05 UTC+2 skrev fada...@gmail.com:
> Dear All
> I have very serios problem in loading image in the all fill.pro. i have the expression of the command line and the problem like this.
> ; Array with noise
> IDL>
> IDL> array = HANNING(300,300) + 0.1*RANDOMN(s,300,300)
> IDL>
> IDL> ; Convert to bytes from [1, 255]
> IDL> array = BYTSCL( array, TOP=254 )
> IDL>
> IDL> ; Add some missing scanlines, plus a large region
> IDL> array[*, RANDOMU(s,40)*300] = 255
> IDL> array[*, 10:20] = 255
> IDL>
> IDL> ; Simple Gaussian kernel
> IDL> kernel = [$
> IDL> [ 1, 8, 15, 8, 1], $
> IDL> [ 8, 63,127, 63, 8], $
> IDL> [15,127,255,127,15], $
> IDL> [ 8, 63,127, 63, 8], $
> IDL> [ 1, 8, 15, 8, 1]]
> IDL>
> IDL> ; Values of 255 are flagged as invalid (missing)
> IDL> ; and replaced by 0 if there are no valid values
> IDL> ; within the kernel
> IDL> result = CONVOL( array, kernel, INVALID=255, MISSING=0, $
> IDL> /NORMALIZE, /EDGE_ZERO )
> IDL>
> IDL> IIMAGE, array, VIEW_GRID=[2,1], RGB_TABLE=39
> IDL> IIMAGE, result, /VIEW_NEXT, RGB_TABLE=39
> % RANDOMN: Expression must be a scalar or 1 element array in this context: S.
> % Error occurred at: $MAIN$
> % Execution halted at: $MAIN$
> % BYTSCL: Variable is undefined: ARRAY.
> % Error occurred at: $MAIN$
> % Execution halted at: $MAIN$
> % RANDOMU: Expression must be a scalar or 1 element array in this context: S.
> % Error occurred at: $MAIN$
> % Execution halted at: $MAIN$
> % Variable is undefined: ARRAY.
> % Error occurred at: $MAIN$
> % Execution halted at: $MAIN$
> % CONVOL: Expression must be an array in this context: ARRAY.
> % Error occurred at: $MAIN$
> % Execution halted at: $MAIN$
> % IIMAGE: First argument has invalid dimensions
> % Error occurred at: IIMAGE 24 C:\Program Files (x86)\ITT\IDL\IDL80\lib\itools\framework\idlit_itoolerror.pr o
> % $MAIN$
> % Execution halted at: $MAIN$
> Please help me about this problem. Thank you
> Fadaei

See the first error message: "RANDOMN: Expression must be a scalar or 1 element array in this context: S." What is S when you reach the call to RANDOMN? (Do "help,s" right before.) Have you defined it already before you execute the code you posted?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: New problem in loading image
Next Topic: shell code+ nearest point question

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

Current Time: Wed Oct 08 19:05:43 PDT 2025

Total time taken to generate the page: 0.00486 seconds