Login  Register

on ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

on ImageJ

Juan Francisco-2
59 posts
Dear all:
  anyone knows how to extract from a TIFF file the size of the files (bytes) and the size of the image (widht x hight)?. I use a fortram program wich manage TIFF files but I don´t know how to extract the size of file and size of image from the TIFF file.
  Thanks
  JFC

 
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: on ImageJ

Albert Cardona
298 posts
Francisco,

The ij.io.TiffDecoder class will show you how.

http://rsb.info.nih.gov/ij/developer/source/ij/io/TiffDecoder.java.html


Keep in mind ImageJ has its own way of reading tiffs, so if your tiff
files have longer headers than what ImageJ expects you may run into
trouble. If so, just have a look at the tiff file format documentation
(google will show you), for all information on how to retrieve the
header offset, width and height from the header, and then the pixels
using this info. The header length (i.e. offset until the pixels start),
as far as I remember, is written within the first couple of bytes of the
tiff file.

Albert