Convert 3D to 1D, apply fuction then convert back to 3D [message #71439] |
Sun, 20 June 2010 15:58 |
Mat
Messages: 14 Registered: December 2009
|
Junior Member |
|
|
I am converting a image (5 bands) to 1D using reform. I then apply a
function to this data and get a double "Array[3]"result. How do I then
convert this result back into the origional image dimensions? eg:
image= READ_IMAGE('test.tif')
imagesize = SIZE(image, /DIMENSIONS)
nx=imagesize[1]
ny=imagesize[2]
npix = nx*ny
coords_2d = array_indices([nx,ny], lindgen(npix), /dimen)
imageR= REFORM(image,5,npix)
I then apply a function to this data and get a return in the form of:
IDL> help, ret3
RET3 DOUBLE = Array[3]
I'm struggling to covert this back to a 3D image. Any ideas?
|
|
|