X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 24 Nov 2009 08:50 AM by  anon
how to change the pixel depth of the result image when using math_doit?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
24 Nov 2009 08:50 AM
    I am using MATH_DOIT for adding several bands. The pixel depth of origin bands is 16bit signed integer, after addition, some pixel value exceeds the 32768. But for the result of MATH_DOIT keep the pixel depth as 16bit signed integer, the real result is wrong. How can the result of MATH_DOIT be change to 32 bit signed integer?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    24 Nov 2009 10:14 AM
    You can use the IDL FLOAT function to cast your data into 32-bit floating point or LONG to cast it into 32-bit longword integer data.  For example: long(b1)+long(b2) where b1 and b2 are your 16-bit integer bands. 
    You are not authorized to post a reply.