Okay, it seems i have some problem with the original tiff:
IDL> tiff_dump,"Alexa555p81.h00.tif"
% Compiled module: TIFF_DUMP.
Tiff File: byte order=II, Version = 42
23 directory entries
*** NewSubfileType, tag = 254, Long, Count = 1
0
*** ImageWidth, tag = 256, Long, Count = 1
1978
*** ImageLength, tag = 257, Long, Count = 1
5761
*** BitsPerSample, tag = 258, Short, Count = 1
16
*** Compression, tag = 259, Short, Count = 1
1
*** PhotometricInterpretation, tag = 262, Short, Count = 1
1
*** ImageDescription, tag = 270, Ascii, Count = 555
% Subscript range values must be >= 0, < size: VAL.
% Error occurred at: TIFF_DUMP_FIELD 118 /afs/caspur.it/local/products/
vendor/idl/idl/lib/obsolete/tiff_dump.pro
% TIFF_DUMP 219 /afs/caspur.it/local/products/
vendor/idl/idl/lib/obsolete/tiff_dump.pro
% $MAIN$
% Execution halted at: TIFF_DUMP 219 /afs/caspur.it/local/
products/vendor/idl/idl/lib/obsolete/tiff_dump.pro
IDL>
//// but I can read it anyway ////
IDL> img=read_tiff("Alexa555p81.h00.tif",/unsigned)
IDL> help, img
IMG LONG = Array[1978, 5761]
IDL> print,max(img)
65535
IDL>
IDL> write_tiff,"prova.tif",fix(img),/LONG
IDL> help,img
IMG LONG = Array[1978, 5761]
IDL> print,max(img)
65535
IDL> tiff_dump,"prova.tif"
Tiff File: byte order=II, Version = 42
14 directory entries
*** NewSubfileType, tag = 254, Long, Count = 1
0
*** ImageWidth, tag = 256, Long, Count = 1
1978
*** ImageLength, tag = 257, Long, Count = 1
5761
*** BitsPerSample, tag = 258, Short, Count = 1
32
*** Compression, tag = 259, Short, Count = 1
1
*** PhotometricInterpretation, tag = 262, Short, Count = 1
1
*** StripOffsets, tag = 273, Long, Count = 1
8
*** Orientation, tag = 274, Short, Count = 1
4
*** SamplesPerPixel, tag = 277, Short, Count = 1
1
*** RowsPerStrip, tag = 278, Long, Count = 1
5761
*** StripByteCounts, tag = 279, Long, Count = 1
45581032
*** XResol, tag = 282, Rational, Count = 1
100.000
*** Yresol, tag = 283, Rational, Count = 1
100.000
*** PlanarConfiguration, tag = 284, Short, Count = 1
1
IDL>
and the resulting file seems to have less problems but I can not
understand the meaning of these tag and the result is the same with
different images.
IDL> img2=read_tiff("prova.tif",/UNSIGNED)
IDL> help, img2
IMG2 LONG = Array[1978, 5761]
IDL> print,max(img2)
255
IDL>
On Fri, 29 Feb 2008 02:09:35 -0800, Spon wrote:
> On Feb 29, 7:34 am, Stefano Scardigli <s.scardi...@libero.it> wrote:
>> what a mess =:-O
>>
>> I'm on IDL 5.1 and I'm working on a remote server via ssh.
>>
>> I haven't QUERY_TIFF
>> I haven't SWAP_ENDIAN_INPLACE
>>
>>
> I think TIFF_DUMP was QUERY_TIFF's unwieldy predecessor. Perhaps you
> have that, and can use the Offset information to open at least the image
> within the file with OPENR / FSTAT / READU, reform the input manually
> and use REVERSE instead of SWAP_ENDIAN?
>
> I think all these features are likely to predate 5.0
>
> Best of luck,
> Chris
|