I read into IDL a set of 2d images (10 in all) from a fold and put them into a 3-D array.
My code is as following
IDL> a3d=bindgen(2048,1768,10)
IDL> start_dir=get_coursefiles_dir(/data)
IDL> names=sindgen(10)
IDL> for i=0,9 do names[i]=start_dir+path_sep()+strcompress(string(i),/remove_all)+'.tif'
IDL> for i=0,9 do a3d[*,*,i]=read_tiff(names[i])
Both of the following code is OK and IDL 8.1.0 can draw the original image ( it is 1.tif here) or part of it.
IDL> i6=image(a3d[*,*,1])
IDL> i6=image(a3d[100:600,200:1000,1])
But when I use this following code, an error occurs:
IDL> i6=image(a3d[*,1,*])
% IMAGE: First argument has invalid dimensions% Execution halted at: $MAIN$
I am really confused because there should be no difference between these two codes.
Another question is that, which routine or function should I use if I want to create a 3-D picture from the 3-D array? The pictures used above are intensity-mapped images.
Thanks for you help. I will appreciate you deeply.
Zhenbo Xia
|