X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Nov 2014 05:51 AM by  anon
problem of using ENVI_ENTER_DATA
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
26 Nov 2014 05:51 AM
    Hi, I am new user of envi user function. I am facing a problem in using ENVI_ENTER_DATA. I have an float array (i tried byte array as well) it has values max. to 100. when i tried to display them using ENVI_ENTER_DATA it just show a black screen(same if i write an image file). But if i use the random vector and display it it works fine with same command. Surprising for me is that when i open this .img file in matlab it shows the different values. the code looks like this ENVI_ENTER_DATA, mem_res this is not working but if i use ENVI_ENTER_DATA, RANDOMN(seed, ns,nl). It works fine Can you please guide me where i am wrong. Thanks

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    26 Nov 2014 08:34 AM
    What is mem_res? Can you provide a help, mem_res so we can see what sort of array it is? If you do a quick stats on the entry in ENVI, does it show all 0s or actual values?

    Deleted User



    New Member


    Posts:
    New Member


    --
    26 Nov 2014 12:09 PM
    Thanks MariM for your reply. I doing in this way where ns and nl are number of lines and sample. I intentionally make few elements equal to 5 but it is not required in actual code. mem_res = fltarr(ns, nl) mem_res = reform(score,ns,nl) mem_res[600:614, 800:815] = 5.0 print, mem_res if result.outf.in_memory EQ 1 THEN BEGIN ; If the user wanted the result to go to memory then just output it there ENVI_ENTER_DATA, mem_res help, mem_res endif Another surprising thing as you mentioned i did help, mem_res it says undefined.the output is MEM_RES UNDEFINED = I do not know why. As you see i am printing the values aswell. The printing is alright even i right the .img file. It shows nothing in envi when i load but if i open it in matlab and draw as image. It shows different values. Thanks in advance

    Deleted User



    Basic Member


    Posts:228
    Basic Member


    --
    03 Dec 2014 11:15 AM
    ENVI_ENTER_DATA deletes the variable that is passed into it. So it is expected that mem_res would be undefined after the call to ENVI_ENTER_DATA. Can you try using the HELP command on mem_res before you call ENVI_ENTER_DATA, so we can see what it is before that? Peg Exelis VIS
    You are not authorized to post a reply.