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

Home » Public Forums » archive » Subset Image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Subset Image [message #45478] Thu, 15 September 2005 12:20 Go to next message
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Hello,

ENVI allows to subset an image via ROIs (Regions of interest). I want
to make the same using IDL. Does anybody know some IDL code do make
that?

Thanks,
Julio
Re: Subset Image [message #45626 is a reply to message #45478] Sun, 18 September 2005 20:20 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Anytime :) Hope it helps!

Jeff
Re: Subset Image [message #45628 is a reply to message #45478] Sun, 18 September 2005 15:10 Go to previous message
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Thanks Jeff. I didn't use the "shapefile" word in the search, so I had
not visited it. I think it will show me some shortcuts.

Thanks, this will be very useful to solve my problem!

Júlio.
Re: Subset Image [message #45629 is a reply to message #45478] Sun, 18 September 2005 14:04 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Julio,

A old thread in this newsgroup may be useful for you. Try searching
for "Apply a shapefile to raster images in IDL" if this link doesn't
work.....

http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/4b90c8f4a2c7b715/6e29cac0ee6fe976?q=Apply+a+sha pefile+to+raster+images+in+IDL&rnum=1#6e29cac0ee6fe976

Jeff
Re: Subset Image [message #45630 is a reply to message #45478] Sun, 18 September 2005 11:58 Go to previous message
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Hi, Jeff,

No, I'm not trying to avoid ENVI, I have both installed here. The
problem is I have lot of images to be processed and manipulated. So I
want to use IDL to make the same that ENVI does, but not interactively.
I know there are lot of codes to use ENVI with IDL, and I have tried to
use them, but with no success.

The point is: I must read vector files (EVF, DXF or Shapefile) and use
it to cut off my big images and make small images... And I haven't
found some code to make it. I know it must be possible, but I'm not a
professional programmer... :-)

Regards,
Julio

Jeff N. escreveu:

> I'm sure that IDL can read shapefiles, but I'm not positive about the
> other vector formats (I'd guess DXF can probably be read). I've never
> done any of that though. Let me ask you...are you specifically trying
> to avoid using ENVI? Like maybe you need to run code on a machine that
> has IDL but not ENVI? Because if you're not trying to avoid ENVI
> specifically and are just trying to make something happen
> programatically that you've done interactively with ENVI, you should be
> aware that there are a lot of IDL routines that you get with ENVI that
> allow you to manipulate ENVI from an IDL program. This might make your
> life a lot easier.
Re: Subset Image [message #45633 is a reply to message #45478] Sat, 17 September 2005 15:22 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
I'm sure that IDL can read shapefiles, but I'm not positive about the
other vector formats (I'd guess DXF can probably be read). I've never
done any of that though. Let me ask you...are you specifically trying
to avoid using ENVI? Like maybe you need to run code on a machine that
has IDL but not ENVI? Because if you're not trying to avoid ENVI
specifically and are just trying to make something happen
programatically that you've done interactively with ENVI, you should be
aware that there are a lot of IDL routines that you get with ENVI that
allow you to manipulate ENVI from an IDL program. This might make your
life a lot easier.
Re: Subset Image [message #45636 is a reply to message #45478] Sat, 17 September 2005 10:32 Go to previous message
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Actually, I don't have the ROIs yet. What I want is to subset the image
using the limits of a vector file (EVF or DXF). I think it could be
carried out using ROIs, but I'm not sure about that. I'll take a look
on XROI...
Do you have some idea to make that without using ROIs?

Júlio


Jeff N. escreveu:

> The 'subset via ROI' function in ENVI sets every pixel outside of the
> ROI to zero right? There are actually lots of ways to do this with
> IDL. The answer really depends on your ROI. If your ROI is
> rectangular, you can do it with array subscripting. If your ROI is an
> irregular shape, you would probably use the WHERE() function. Are you
> planning to draw the ROI's with IDL too? If so, you might try XROI.
>
> Jeff
>
>
> Julio wrote:
>> Hi,
>>
>> I want to subset the image using ROIs. I can't use SUB_RECT because I
>> don't know the limits (columns, rows) of each subset (it is specified
>> by ROIs).
>> Thanks at any rate,
>> Julio
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help me plz abt this c program
Next Topic: Gaussian Enhancement on Image Histogram

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

Current Time: Wed Oct 08 19:13:59 PDT 2025

Total time taken to generate the page: 0.00670 seconds