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

Home » Public Forums » archive » Re: subset an image programatically
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: subset an image programatically [message #46817] Tue, 03 January 2006 15:09 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Aha. I would do something like this. Find the maximum and minum
values of the xpts and ypts arrays, naming them something like min_x,
max_x, min_y, max_y. If you'd like, you can add a few extra pixels so
that the vector doesn't touch the boundary of the image here too
(for example, min_x = min(xpts) -2) Then do some array subscripting on
the input image:

out_image = input_image[min_x:max_x, min_y:max_y]

Then write out_image out to a file.

Jeff

Javier Martinez wrote:
> Hi,
> thanks for the hints. I'm already try to do the job using the
> ENVI_MASK_APPLY_DOIT routine, but with this I obtain an image of the
> same dimensions than the original image but (obviously) with the pixel
> outside of the vector file masked out, and the thing that I want to do
> Its a subset image of smaller size than the original, that match the
> dimensions of the vector file. If you know a way to do this job please
> let me know.
>
> Thanks again
>
> Javier Martinez
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Printing iTools window to PS file
Next Topic: Problem Compiling and Using Functions

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

Current Time: Fri Oct 10 05:42:55 PDT 2025

Total time taken to generate the page: 0.16312 seconds