AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.03.05 03:36 "Problem with multipage .stk tiff file", by Shafiq Abedin
2010.03.05 12:46 "Re: Problem with multipage .stk tiff file", by Ashish Uthama
2010.03.05 13:20 "Re: Problem with multipage .stk tiff file", by Kevin W Eliceiri
2010.03.08 15:24 "Re: Problem with multipage .stk tiff file", by Shafiq Abedin
2010.03.05 13:57 "Re: Problem with multipage .stk tiff file", by Shafiq Abedin
2010.03.08 16:29 "Re: Problem with multipage .stk tiff file", by Steve Eddins
2010.03.08 16:34 "Re: Problem with multipage .stk tiff file", by Shafiq Abedin

2010.03.08 15:24 "Re: Problem with multipage .stk tiff file", by Shafiq Abedin

Hi,

Since no one has responded with as explanation regarding reading a .stk file
with libtiff, I am assuming you cant. I am looking into the matlab
tiffread2.m file and trying to figure out how to do it without libtiff. If
anyone has any suggestion, please let me know. It will be very helpful to me
if you do :)

Thnaks

-- 
Shafiq Abedin

University Of Pittsburgh
McGowan Institute for Regenerative Medicine


On Mar 5, 2010, at 8:57 AM, Shafiq Abedin wrote:

> Great source! I apologize if I sound arrogant but I am trying to
> accomplish this with libtiff and c. We already process our data with
> Matlab. Thank you though :) 
> 
> 
> Shafiq Abedin
> sha33@pitt.edu
> 
> 
> 
> 
> On Mar 5, 2010, at 7:46 AM, Ashish Uthama wrote:
> 
>> Information in this thread might be useful:
>> http://www.mathworks.com/matlabcentral/newsreader/view_thread/265330
>>  
>> points to: http://support.meta.moleculardevices.com/docs/t10243.pdf and
>> ftp://ftp.meta.moleculardevices.com/support/stack/STK.doc
>>  
>>  
>>  
>> From: tiff-bounces@lists.maptools.org
>> [mailto:tiff-bounces@lists.maptools.org] On Behalf Of Shafiq Abedin
>> Sent: Thursday, March 04, 2010 10:37 PM
>> To: tiff@lists.maptools.org
>> Subject: [Tiff] Problem with multipage .stk tiff file
>>  
>> Hello All:
>>  
>> I am writing this post after pulling my hair multiple times (I am bald
>> now!) and doing many many google searches (all the webpages related to
>> libtiff is now imprinted in my brain). I have failed to find a post on
>> this mailing list that solves the problem or anywhere for that matter. I
>> hate to be repetitive but I have the same problem described in this post
>> (http://www.asmail.be/msg0054982856.html). Solution given here is too
>> vague for me to pick up on (is it really like a linked list?). I didn't
>> find any post related to reading the .stk file (I wish I could give you a
>> sample right now but they are extremely big - 2gb ). I can read the first
>> in the stack but cant go beyond that. This particular image has 7400
>> slices but whenever i do a tiffdump, this is what I get:
>>  
>> test.stk:
>> Magic: 0x4949 <little-endian> Version: 0x2a
>> Directory 0: offset 1342567917 (0x5005f5ed) next 0 (0)
>> SubFileType (254) LONG (4) 1<0>
>> ImageWidth (256) LONG (4) 1<348>
>> ImageLength (257) LONG (4) 1<260>
>> BitsPerSample (258) SHORT (3) 1<16>
>> Compression (259) SHORT (3) 1<1>
>> Photometric (262) SHORT (3) 1<1>
>> ImageDescription (270) ASCII (2) 2545600<Acquired from Photometri ...>
>> StripOffsets (273) LONG (4) 24<8 7664 15320 22976 30632 38288 45944 53600
>> 61256 68912 76568 84224 91880 99536 107192 114848 122504 130160 137816
>> 145472 153128 160784 168440 176096>
>> SamplesPerPixel (277) SHORT (3) 1<1>
>> RowsPerStrip (278) LONG (4) 1<11>
>> StripByteCounts (279) LONG (4) 24<7656 7656 7656 7656 7656 7656 7656 7656
>> 7656 7656 7656 7656 7656 7656 7656 7656 7656 7656 7656 7656 7656 7656
>> 7656 4872>
>> XResolution (282) RATIONAL (5) 1<72>
>> YResolution (283) RATIONAL (5) 1<72>
>> PlanarConfig (284) SHORT (3) 1<1>
>> ResolutionUnit (296) SHORT (3) 1<2>
>> Software (305) ASCII (2) 18<MetaMorph 7.1.7.0\0>
>> DateTime (306) ASCII (2) 21<2009:09:08 17:54:57\0\0>
>> Predictor (317) SHORT (3) 1<1>
>> 33628 (0x835c) LONG (4) 7435<0 0 1 0 2 4095 3 0 4 1341649855 5 1341649863
>> 6 1341649871 7 1341649880 8 0 9 255 11 128 12 64 ...>
>> 33629 (0x835d) RATIONAL (5) 7400<0 0.0383822 0.0380645 0 0.0383822
>> 0.0380645 0 0.0383821 0.0380645 0 0.0383821 0.0380645 0 0.038382
>> 0.0380645 0 0.038382 0.0380645 0 0.038382 0.0380645 0 0.0383819 0.0380645
>> ...>
>> 33630 (0x835e) RATIONAL (5) 7400<0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 ...>
>> 33631 (0x835f) LONG (4) 7400<28 65536 0 65536 0 65536 0 65536 0 65536 0
>> 65536 0 65536 0 65536 0 65536 0 65536 0 65536 0 65536 ...>
>>  
>> My attempt to get the the read Strip or Tile have failed because the
>> libtiff  TIFFTAG_TILEBYTECOUNTS  and TIFFTAG_STRIPBYTECOUNTS returns only
>> 24. Although I can see the offset info in the dump, I dont know actually
>> how to get to the next image and read (using TIFFReadScanline) it so that
>> I can manipulate it. I should also mention that the directory count is
>> useless here because it returns 1 . This problem might be too trivial for
>> you but I need help finding a way to read these images. If you please
>> provide examples, it would be most helpful. Thanks in advance.
>>  
>> -- 
>> Shafiq
>> 
>> University Of Pittsburgh
>> McGowan Institute for Regenerative Medicine
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
> 
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/