X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 09 Oct 2006 12:28 PM by  anon
creating tif images from TVSCL
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
09 Oct 2006 12:28 PM
    Hello everyone, I have a floating point array in which I'm trying to create a tiff of. I can easily create a tiff of the image created by TVSCL (output tiff matches exactly the image window), but I want to create a tiff of the image created by the TV function (output tif no longer matches image window). I have posted my routine below, so I hope someone can help me out, Thanks in advance! Justin pha=fltarr(xs,ys) openr,1,'snaphu_12978-16986_60m_diff.unw_cut' readu,1,pha close,1 ;convert to mm rpha2=pha/(2*!Pi)*28.3 pha=rpha2 ;rotate to proper orientation pha=rotate(pha,2) ;view un-altered (no coherence mask) unwrapped image window,7,xsiz=xs/sc,ysiz=ys/sc, title='raw UNwrapped' loadct,13 ;---converts color bar into 1 color bar = 28.3mm--- all=(abs(min(pha))+abs(max(pha)))/28.3 mmulti,all rpha=congrid(pha,xs/sc,ys/sc) tv,rpha TVLCT, R, G, B, /GET r2=rotate(c1,7) write_tiff,'z_snaphu_12978-16986_diff.unw_cut.tif',bytscl(r2), RED=R, GREEN=G, BLUE=B

    Deleted User



    New Member


    Posts:
    New Member


    --
    09 Oct 2006 12:28 PM
    WRITE_TIFF can be used to output numeric data that is not necessarily directly mapped to color table indices. That is easy to do with syntax like: write_tiff, 'z_snaphu_12978-16986_diff.unw_cut.tif', rpha, /FLOAT, $ RED=R, GREEN=G, BLUE=B I doubt, however, that it is well-defined in all TIFF viewers what to do with data that is not in a 0-255 range (or that arrives as floating point, in general, regardless of the range) in regards to mapping it to the TIFF file's color palette data. In an IDL program, you could program exactly what, in terms of color, is meant by a certain floating point value. In other viewers, though, I would tend to think that they would treat all floating point data as greyscale data and the color table would not be used. So, the question is: If you are not scaling your data to bytes, do you even want the current color table in IDL to be exported to your output TIFF file? James Jones
    You are not authorized to post a reply.