|
Getting Started with IDL: Reading and Writing Data |
|
You can import image data into IDL directly at the command line or also using the iImage tool.
The iTools are fully interactive and automatically read your image data.
Here is an example of opening an image file in iImage:
Open and from the examples\data directory choose a file named image.tif.
Reading image files directly into IDL is easy if you know the format in which the image is stored. First we must read in the image. Here we will use a TIFF format image of an aerial satellite view of Manhattan Island in New York City.
MYIMAGE=READ_TIFF(FILEPATH('image.tif',SUBDIR= $
['examples', 'data']))
TV, MYIMAGE
| Note Another way to import image data is to use the Import Image File toolbar button on the IDLDE toolbar. To use this feature simply click the button and the dialog will appear so that you may select "image.tif". However, this will name the image differently than shown in this example. |
WRITE_TIFF, 'imagecopy.tif', MYIMAGE
IDL Online Help (March 06, 2007)