I have a small problem here.
Currently, a program I'm working on has various types of image data that read
in to an array, image. Currently, image can be in the format of [m, n, o] or
[o,m,n], for example, [512,512,3] or [3,512,512]. I am performing a histo
stretch on individual bands in the data, like the following:
IDL> print, !version
{ x86 Win32 Windows 5.1.1 Jul 20 1998}
IDL> image = bindgen(3,512,512)
IDL> displayimage = image
IDL> i = 2
IDL> minthresh = 4
IDL> maxthresh = 234
IDL> displayImage[i,0,0] = BytScl(reform(image[i,*,*]), Max=maxThresh,
Min=minThresh)
% Out of range subscript encountered: DISPLAYIMAGE.
% Execution halted at: $MAIN$
IDL> image = bindgen(512,512,3)
IDL> displayimage = image
IDL> displayImage[0,0,i] = BytScl(reform(image[*,*,i]), Max=maxThresh,
Min=minThresh)
why does the first (displayimage[i,0,0]) not work, but the second does?
If I enter it as displayimage[i,*,*] =... then it works, but this is a much
slower assignment.
I had received the [0,0,i] = ... tip from an RSI engineer. Apparently, it is
about 10x faster than doing [*,*,i] = ... I just want it to work for the other
case as well!
Any ideas, or is there a better, faster way?
------------------------------------------------------------ ----------
Sean P. Rumelhart Positive Systems, Inc.
seanr@possys.com 250 Second St. East
PH: 406.862.7745 Whitefish MT 59937
FAX: 406.862.7759 www.possys.com
------------------------------------------------------------ ----------
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
|