Re: DNs independent from Datatypes for ENVI-Mosaics [message #36923] |
Sat, 15 November 2003 08:34 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
H. U. Zimmerer wrote:
> I want to set the SEE_THROUGH_VALUE of an ENVI Mosaic I create with an
> IDL-Program alwas to the DN of Black without writing a CASE-Statement
> for the different Datatypes. Is there a way of doing it?
Yes,
this is a piece of code of the rewritten deftype routine from our
library. But be carefull with this. You should read this article:
http://www.dfanning.com/math_tips/double.html
type_var=SIZE(data_with_type,/TYPE)
result = MAKE_ARRAY(TYPE=type_var,SIZE(value_without_type,/dim)>1)
result[*]=value_without_type
IF (SIZE(value_without_type,/DIM))[0] EQ 0 THEN result=result[0]
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|