Reading Tiff tags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading Tiff tags

Glen MacDonald
A colleague has images from an Amersham phosphor imager, in the .gel  
tiff format.  I need to read some private tiff tags to find bit depth  
and scaling info in order to restore the pixel intensities.  Could  
someone give me a pointer on how to access tags by an Imagej macro? I  
have the tag addresses from the Amersham documentation.

Thanks,
Glen

University of Washington
Reply | Threaded
Open this post in threaded view
|

Re: Reading Tiff tags

Nicolas Fête-2
Yep, I've had a such problem, i.e I wanted to know what information and how
ImageJ read it.
Here's how I did it (i've ImageJ 1.36b), two ways :
    - the shorter: ImageJ has a "Debug mode" which display in a log window
information when opening Tiff file: Edit->Options->Misc and check Debug
mode. Open then Tiff image and perhaps it'll display it. ImageJ displayed
all the tags of my image, a leica tiff sp2 confocal image, without problems
    - the less short: download source code and modify the dump tag function
(IJ\IO\TiffDecoder.java). To display it easily I printed self-made xml tags.
Install Ant and JDK et recompile

For information, I'm making a windows c++ tiffreader based on Tiff
documentation, in order to display values of fields and values of image (I
want to know how Leica register the 12bit sample in my 16bit tiff)
Good work ! :)

--
Nicolas FÊTE, PhD student biotech
EPFL Computer Science Engineer
Ecole Polytechnique Fédérale de Lausanne
Faculté des Sciences de la Vie
Laboratoire de Dynamique des Cellules Souches
Bâtiment AAB
Station 15
CH-1015 Lausanne
Tél:+41 21 693 16 33
Fax:+41 21 693 16 30
HomePage (under construction): http://ldcs.epfl.ch
----- Original Message -----
From: "Glen MacDonald" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, September 21, 2006 5:36 AM
Subject: Reading Tiff tags


>A colleague has images from an Amersham phosphor imager, in the .gel  tiff
>format.  I need to read some private tiff tags to find bit depth  and
>scaling info in order to restore the pixel intensities.  Could  someone
>give me a pointer on how to access tags by an Imagej macro? I  have the tag
>addresses from the Amersham documentation.
>
> Thanks,
> Glen
>
> University of Washington
>
Reply | Threaded
Open this post in threaded view
|

Re: Reading Tiff tags

Jonathan Hilmer
Glen,

Would it be possible to post the documentation regarding the tif
headers?  We have a Typhoon imager for which I have experimentally
determined the storage formula, and I've examined the .gel files with
a hex editor, but I'd like to see what GE has to say on the issue.

For the record, on our scanner the relationship is always the same:
the 145*(actual value)^(1/2) = (stored value).  Reversing this in
ImageJ gives the 0-100,000 range they brag about.


Jonathan


On 9/22/06, Nicolas Fête <[hidden email]> wrote:

> Yep, I've had a such problem, i.e I wanted to know what information and how
> ImageJ read it.
> Here's how I did it (i've ImageJ 1.36b), two ways :
>     - the shorter: ImageJ has a "Debug mode" which display in a log window
> information when opening Tiff file: Edit->Options->Misc and check Debug
> mode. Open then Tiff image and perhaps it'll display it. ImageJ displayed
> all the tags of my image, a leica tiff sp2 confocal image, without problems
>     - the less short: download source code and modify the dump tag function
> (IJ\IO\TiffDecoder.java). To display it easily I printed self-made xml tags.
> Install Ant and JDK et recompile
>
> For information, I'm making a windows c++ tiffreader based on Tiff
> documentation, in order to display values of fields and values of image (I
> want to know how Leica register the 12bit sample in my 16bit tiff)
> Good work ! :)
>
> --
> Nicolas FÊTE, PhD student biotech
> EPFL Computer Science Engineer
> Ecole Polytechnique Fédérale de Lausanne
> Faculté des Sciences de la Vie
> Laboratoire de Dynamique des Cellules Souches
> Bâtiment AAB
> Station 15
> CH-1015 Lausanne
> Tél:+41 21 693 16 33
> Fax:+41 21 693 16 30
> HomePage (under construction): http://ldcs.epfl.ch
> ----- Original Message -----
> From: "Glen MacDonald" <[hidden email]>
> To: <[hidden email]>
> Sent: Thursday, September 21, 2006 5:36 AM
> Subject: Reading Tiff tags
>
>
> >A colleague has images from an Amersham phosphor imager, in the .gel  tiff
> >format.  I need to read some private tiff tags to find bit depth  and
> >scaling info in order to restore the pixel intensities.  Could  someone
> >give me a pointer on how to access tags by an Imagej macro? I  have the tag
> >addresses from the Amersham documentation.
> >
> > Thanks,
> > Glen
> >
> > University of Washington
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Reading Tiff tags

Glen MacDonald
In reply to this post by Glen MacDonald
Thanks Nicolas,  just when I think that I know the manual by heart,  
but if I'd have only re-read the section on opening files.  Your  
shorter method of using debug displays the private tags.  It looks as  
though I now need to convert the ASCII value from hexadecimal to  
interpret them.

Jonathan,
the specs for the tags were found in this file, a scan of a manual  
from Molecular Dynamics:
http://research.stowers-institute.org/efg/ScientificSoftware/Utility/ 
TiffTags/GEL-FileFormat.pdf

what is the ASCII tag value for your conversion value of 145?

Regards,
Glen


> Yep, I've had a such problem, i.e I wanted to know what information  
> and how ImageJ read it.
> Here's how I did it (i've ImageJ 1.36b), two ways :
>    - the shorter: ImageJ has a "Debug mode" which display in a log  
> window information when opening Tiff file: Edit->Options->Misc and  
> check Debug mode. Open then Tiff image and perhaps it'll display  
> it. ImageJ displayed all the tags of my image, a leica tiff sp2  
> confocal image, without problems
>    - the less short: download source code and modify the dump tag  
> function (IJ\IO\TiffDecoder.java). To display it easily I printed  
> self-made xml tags. Install Ant and JDK et recompile
>
> For information, I'm making a windows c++ tiffreader based on Tiff  
> documentation, in order to display values of fields and values of  
> image (I want to know how Leica register the 12bit sample in my  
> 16bit tiff)
> Good work ! :)
>
> --
> Nicolas FÊTE, PhD student biotech
>
>
> Glen,
>
> Would it be possible to post the documentation regarding the tif
> headers?  We have a Typhoon imager for which I have experimentally
> determined the storage formula, and I've examined the .gel files with
> a hex editor, but I'd like to see what GE has to say on the issue.
>
> For the record, on our scanner the relationship is always the same:
> the 145*(actual value)^(1/2) = (stored value).  Reversing this in
> ImageJ gives the 0-100,000 range they brag about.
>
>
> Jonathan
>
Reply | Threaded
Open this post in threaded view
|

Re: Reading Tiff tags

Jonathan Hilmer
Glen,

Are you sure that's the right link to the header information?  It
seems to be a link to header-related TIFF software. Using the header
reader found in the link you put, 'MD_ScalePixel' has a value of
'1/21025'.  For me, the problem is a lack of trust in MD/Amersham/GE
regarding what they say their hardware and software does.  Hence, the
145 number was determined experimentally, not by using header values.

I did have the opportunity recently to speak with a hardware
technician who was sent to deal with a Typhoon problem.  He said that
the scalar and square root were applied with analog circuitry which
was standardized and not adjustable for all of that model series.
Again, I'm not sure if I would rely upon that, but you might find that
the scalar will always be 145 for every .GEL file.


Jonathan

On 9/26/06, Glen MacDonald <[hidden email]> wrote:

> Thanks Nicolas,  just when I think that I know the manual by heart,
> but if I'd have only re-read the section on opening files.  Your
> shorter method of using debug displays the private tags.  It looks as
> though I now need to convert the ASCII value from hexadecimal to
> interpret them.
>
> Jonathan,
> the specs for the tags were found in this file, a scan of a manual
> from Molecular Dynamics:
> http://research.stowers-institute.org/efg/ScientificSoftware/Utility/
> TiffTags/GEL-FileFormat.pdf
>
> what is the ASCII tag value for your conversion value of 145?
>
> Regards,
> Glen