2003.11.16 22:37 "[Tiff] reading Affymetrix tiff images", by Sridhar Duggireddy

2003.11.17 23:30 "[Tiff] reading Affymetrix tiff images", by Ross Finlayson

I am trying to read affymetrix tiff images. As you said before I printed the tiffinfo. It gave like this:

sample.tif: Warning, invalid TIFF directory; tags are not sorted in ascending order.
sample.tif: Warning, TIFF directory is missing required "StripByteCounts" field, calculating from imagelength.
TIFF Directory at offset 0x8
  Image Width: 4733 Image Length: 4733
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Image Description: "[30..46140] PGA-HCL-astM_atop-10aUA-s2:CLS=4733 RWS=4733 XIN=3 YIN=3 VE=17 2.0 09/04/02 15:32:34 \024 \024 HG-U133A.1sq \024 \024 \024 \024 \024 \024 \024 \024 \024 6"
  Planar Configuration: single image plane

my tiff image is sample.tif. from the above I understood that my tiff image doesn't use any compression. It also says single image plane. In the above output what does XIN and YIN and VE mean? Now can you explain me with a program(if possible) how to read the image data? one more doubt is in the above output where should i look for the type of image like is it scanline-based or strip based or tile based?

Hi Sridhar,

It looks like the Image Description field contains text data that has meaning to the Affymetrix output. XIN, YIN, etcetera are probably some kind of experiment parameters. You should look to the other data format specifications for the Affymetrix output to get an idea of what those mean.

You should run tiffdump on the image because it has a better chance of getting the tag content when the image appears to not conform to specification.

About getting the data, you have a void buffer of size strip_size=TIFFStripSize(), and then you cast it it to a buffer of the pointer type of the sample width, for example for eight bits per sample/one sample grayscale: 1 x 8=8 bits=1 byte, sizeof(unsigned char)==1 on most systems. Then, you can access the array with the buffer[x] for x from zero to strip_size-1.

Ross F.