How to create an image from the last columns of a stack of images? [message #45395] |
Thu, 01 September 2005 00:17  |
Jeff N.
Messages: 120 Registered: April 2005
|
Senior Member |
|
|
Hi everyone,
I have a large image cube(1920x1080x3000 - columns x rows x bands)
from which i need to create a new image from the last column of all the
input bands. Actually, there's a loop involved, the second image to
create is from the set of next to last columns of all the input bands.
I'm wondering how to go about doing this. I could use the ASSOC
function to get to each band without having to read the entire band
into memory, but this is still taking a long time. If I needed to
extract rows rather than columns I'd probably use point_lun in a loop
over each band, but since I need columns I'm not going to be reading
contiguous chunks of data from disk (I don't think), so I'm not sure
thats really efficient either. Anyone have any suggestions?
Thanks,
Jeff
|
|
|
Re: How to create an image from the last columns of a stack of images? [message #45398 is a reply to message #45395] |
Fri, 09 September 2005 08:10  |
cgguido
Messages: 195 Registered: August 2005
|
Senior Member |
|
|
Not sure I get your question 100%. But if you have an image cube A so
that
idl> help, A
A something_array[1920, 1080, 3000]
and you want to create a 2D image from the 1920th slice along the first
index then it's as simplle as
idl> b=a[1919, *, *]
this is !very! simple though, so I really think you mean something
else. could you clarify your question, perhaps with a small example?
thanks,
Gianguido
|
|
|