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

Home » Public Forums » archive » RTV_DOIT to EVF
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
RTV_DOIT to EVF [message #85838] Thu, 12 September 2013 15:24 Go to next message
ilya85parshakov is currently offline  ilya85parshakov
Messages: 2
Registered: September 2013
Junior Member
I'm trying to automatically create training areas for the SVM classifier in ENVI.
I have a raster image that shows where training areas should be - something like a mask.

Then I use ENVI_DOIT to create a vector file from this file:
ENVI_DOIT, 'RTV_DOIT', DIMS=dims, FID=fid, /IN_MEMORY, OUT_NAME=out_name, L_NAME=l_name, POS=0, VALUES=0

This gives me a vector file that is not in the EVF format, so I cannot open it in IDL. And it doesn't generate a file ID for the created file (no r_fid functionality).

My next step would be to use envi_evf_define_init and envi_evf_define_add_record to add the vector data. After that I need to convert the evf file into ROIs somehow....

Question 1: How do you read whatever ENVI_DOIT produces?

Question 2: Is there an easier way to do SVM classification, maybe without generating vector files?
Re: RTV_DOIT to EVF [message #85904 is a reply to message #85838] Mon, 16 September 2013 14:30 Go to previous messageGo to next message
ilya85parshakov is currently offline  ilya85parshakov
Messages: 2
Registered: September 2013
Junior Member
In other words, is it possible to save RTV_DOIT output to disk as an evf file?
Re: RTV_DOIT to EVF [message #85906 is a reply to message #85904] Tue, 17 September 2013 05:56 Go to previous message
Josh Sixsmith is currently offline  Josh Sixsmith
Messages: 13
Registered: December 2012
Junior Member
On Tuesday, 17 September 2013 07:30:53 UTC+10, ilya85p...@gmail.com wrote:
> In other words, is it possible to save RTV_DOIT output to disk as an evf file?

I'm pretty sure that evf is the only format that the RTV_DOIT procedure outputs to disk. Your call to this procedure may not actually be correct, which maybe causing your evf file to not be generated correctly.

From your example:
ENVI_DOIT, 'RTV_DOIT', DIMS=dims, FID=fid, /IN_MEMORY, OUT_NAME=out_name, L_NAME=l_name, POS=0, VALUES=0

Only the value of zero in your raster will be converted to vector. The keywords in_memory, outname, l_name, pos & values all need to be arrays of the same length.

So for your case only the value of zero is wanted for conversion to vector:
pos =[0]
values=[0]
in_memory=lonarr(0)
out_name = ['test_zero_value.evf']
l_name = ['zero_class']

That is probably what you're after.

Cheers
Josh
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem running functions
Next Topic: chisq value

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

Current Time: Wed Oct 08 11:39:47 PDT 2025

Total time taken to generate the page: 0.00503 seconds