Subset Image [message #45478] |
Thu, 15 September 2005 12:20  |
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 #45628 is a reply to message #45478] |
Sun, 18 September 2005 15:10  |
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 #45630 is a reply to message #45478] |
Sun, 18 September 2005 11:58  |
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  |
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  |
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
|
|
|