X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 31 May 2007 10:26 AM by  anon
starting IDL in auto/graphical mode and compression/decompression of jp2 images
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
31 May 2007 10:26 AM
    I am new to IDL and ENVI. I obtained an evaluation license and the IDL 6.3 from ITTVIS...for Windows. I installed it in 32 bit and the operating system is XP Professional. May I request you all to advise me how to run the IDL in auto/graphical mode and also how to compress/decompress jp2 images. Desu Subrahmanyam India.

    Deleted User



    New Member


    Posts:
    New Member


    --
    31 May 2007 10:26 AM
    On Windows IDL runs only its complete development environment; I presume that is the "graphical mode" you are looking for. I wonder, then, are you having trouble finding on your desktop or in the Windows 'Start' menu the icon that would start the "IDLDE"?. This can happen during ENVI installation, if one chooses to install what we call "ENVI Runtime" rather than "ENVI+IDL". If you installed ENVI+IDL, then the 'Start -> All Programs -> RSI ENVI 4.3' menu should show both an 'ENVI' and an 'ENVI+IDL' icon. If you installed 'ENVI Runtime', then there will just be an 'ENVI' icon, and clicking on that will not bring up the IDL Development Environment that you need. In this latter case, do two things: 1) Reply that you have this problem, and I will post the easy long-term solution in a follow-up message, and 2) For the immediate short-term solution start your IDLDE through Windows Explorer by navigating to 'C:\RSI\IDL63\bin\bin.x86\' directory and clicking on the 'idlde.exe' file icon there. This brings us then to your question about JPEG2000 file processing. I can explain a little about the special code calls that IDL has for importing data from '.jp2' files. Here are the main points: 1. IDL uses object-programming type syntax for the commands we developed for JPEG2000 processing. Thus, this is the general syntax for first opening your '.jp2' file (for reading): oJP2 = obj_new('IDLffJPEG2000', 'C:\path\to\my_very_large_image.jp2') This gives you an 'IDLffJPEG2000' object, as we say. One then uses the "arrow operator" ("->") to invoke methods on this opject. The choice of methods are viewable in IDL Online Help via the Index topic "IDLffJPEG2000 -> class". You will see there that there are not so many methods that you need to study. The below are probably the only two methods for reading and decompressing that one needs to study: 2. The call sith syntax like: oJP2->GetProperty, DIMENSIONS=imageSize, N_LAYERS=nLayers, $ N_LEVELS=nLevels, N_COMPONENTS=nBands, N_TILES=nTiles give you the syntax for querying the JPEG2000 file for what are the characteristics of the data it holds and how is it stored. The replies from the file are stored in IDL variables (the names that appear after the equal signs), which are created on the fly as 'GetProperty' executes. IDL> PRINT, [variable name] or: IDL> HELP, [variable name] can show you immediately the values that 'GetProperty' found. 3. The call with syntax like: imageSubset = oJP2->GetData(COMPONENT=2, DISCARD_LEVELS=1, $ MAX_LAYERS=3, REGION=[100, 400, 1024, 1024]) will decompress the requested subset of the file data and store it in the IDL variable 'imageSubset'. That variable is made on the fly as 'GetData' executes. To know how to make the above call the programmer might need a general understanding of the JPEG2000 file format, which is not provided by IDL Online Help, but can probably be acquired from web resources like Wikipedia. I can tell you that the above call can quickly access a 512 x 512 resampled snapshot of a 1024 x 1024 spatial subset of the third band of the original image, that spatial subset having the pixels at coordinates [100:101, 400:401] (4 pixels due to the resampling) in its lower left corner, and with some of the full "quality" of the original image (i.e. some of the "layers") discarded, presumably for the sake of data access execution speed. Once you have your data in the IDL variable, calls like: window, XSIZE=512, YSIZE=512 TV, imageSubset would help you display the imported data on an IDL graphics window on your monitor. ... or you could have ENVI import the IDL variable and do endless kind of image processing on it GUI-interactively there. James Jones ITT Technical Support
    You are not authorized to post a reply.