X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 24 Mar 2017 11:30 AM by  Deleted User
Write_tiff multiband image
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Deleted User



New Member


Posts:
New Member


--
24 Mar 2017 11:30 AM
    Hey all, I am a student learning IDL and am seeking help in creating a multiband image from 11 .tiff files. I am trying to create a time sequence NDVI file that has each different NDVI time as a separate layer. I am having trouble building a code in IDL to make this happen. I've been through the IDL help page for Write_tiff and have not been able to successfully construct a set of code to do what I want. So I need to pull 11 images from a folder and combine them into one multiband .tiff file, and then save that file with a specific name to a different location. Any help would be awesome! Thanks!

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    06 Apr 2017 04:42 PM
    For the most part, I think you will want to follow the procedure below: 1) Create [k,n,m] arrays of the images in the TIFF file. Where k is the number of bands, and [n,m] are the dimensions of the image. 2) Use WRITE_TIFF to write the first image to the file 3) Use WRITE_TIFF with the APPEND keyword to write the rest of the images to the file. A brief example is shown below: pro dj_forum_462017424 compile_opt idl2 read_jpeg, file_which('rose.jpg'), rose ;create no blue rose rose_noblue = rose rose_noblue[2,*,*] = 0 ;create no green rose rose_nogreen = rose rose_nogreen[1,*,*]=0 write_tiff, 'test_tiff.tif', rose write_tiff, 'test_tiff.tif', rose_noblue, /append write_tiff, 'test_tiff.tif', rose_nogreen, /append end
    You are not authorized to post a reply.