NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 916 - Tiff fiel not opened/displayed right
Tiff fiel not opened/displayed right
Status: ASSIGNED
Product: ImageJ
Classification: Unclassified
Component: SCIFIO
unspecified
PC Windows
: P5 major
Assigned To: Mark Hiner
Depends on:
Blocks:
 
Reported: 2014-08-27 05:09 CDT by Tom
Modified: 2015-04-06 16:04 CDT
4 users (show)

See Also:


Attachments
tif file not opened right (1.88 KB, text/plain)
2014-08-27 05:09 CDT, Tom
this file is not opened/displayed right (512.80 KB, image/tiff)
2014-08-27 12:21 CDT, Tom

Description Tom 2014-08-27 05:09:27 CDT
Created attachment 206
tif file not opened right

The attached tiff file is not displayed right anymore after update to ImageJ2.
Old version worked perfectly. Other third party image viewer function as well.
It is a 32bit grayscale image.
Comment 1 Mark Hiner 2014-08-27 08:34:42 CDT
Hi Tom,

It looks like the attached file is the Fiji configuration data generated during a bug report, and not the actual tiff image that is failing.

Based on the attached document there are a number of files out of date. I would recommend first running "Help > Update Fiji" and then "Edit > Options > ImageJ2" and ensuring those options are disabled.

If you'd like to test with the experimental ImageJ2 options enabled, that is certainly appreciated. If your image still doesn't look right after updating, please feel welcome to attach it here or upload it via "Help > Upload Sample Image" in Fiji.

Thank you for the report.
Comment 2 Tom 2014-08-27 12:21:19 CDT
Created attachment 207
this file is not opened/displayed right
Comment 3 Tom 2014-08-27 12:26:53 CDT
Hi Mark,

I updated and disabled the ImageJ2 options. Display become worse even.
When using de Imagej2 option enabled it dispalys as a two channel image with a strange LUT. Some comparable image will not be opened at all.

I added the file to the bug report.. I think at least. 
I the first report I added FIJI configuration and the file.
Let me know if you did not find a file lake.tif
These are file from a series of testimages from the internet. Several of these are troublesome, while ImageJ opened these flawlessly.
Comment 4 Tom 2014-08-27 12:33:27 CDT
I found out one more thing about the troublesome files. Irfanview opens them easily. In the information there it shown that these are files with a 16-bit colorDepth. I can try to write a small program in C++ using OpenCv to get more file info if you need.
Comment 5 Mark Hiner 2014-08-27 12:42:15 CDT
Hi Tom,

 I got the attached image - thank you! I can confirm the image does not open correctly.

The results I saw were:

* ImageJ 1.x (File > Open): alternating black/white vertical bands
* SCIFIO (File > Import > Image...) and Bio-Formats (File > Import > Bio-Formats): open as a composite image with an all-255 channel 2

I believe channel 1 is correct for Bio-Formats and SCIFIO. We'll investigate and figure out why the 2nd channel is being added.. probably related to the 16bit reading you noted in irfanview

Tom - what version of ImageJ were you using that it opened correctly? As of 1.49g I get the alternating vertical bands when opening, as per File > Open in Fiji.

Thanks again.
Comment 6 Tom 2014-08-27 13:47:38 CDT
Mark,

I do not know exactly when the changes happened. It is so0me test image I use every now and then. I just tested it on my 1.48 version running on my Ubuntu machine. It also displays wrong, but differently wrong. Not the striped thing, but mixed up any way. 

I found some backup 1.47 version showing a display comparable to 1.48.

Now I start wondering if I have gotten files mixed. I sometimes used this as a test file in OpenCv projects. Maybe I have written a copy of this file as just 8-bit grayscale using Opencv Imwrite and always looked at that one. 

I have been working on tiff a lot in the past. It is a very flexible format, that give you probaly headaches. AsTiffTagViewer is veru usefull for development. It show you the tiff metadata. 

Let me know if I can be of any assistance with this problem. No java experience but about 15 years on image processing and c++

Regards
Comment 7 Wayne Rasband 2014-08-27 18:17:21 CDT
The following are the TIFF tags of the lake.tif image, as reported by AsTiffTagViewer (http://www.awaresystems.be/imaging/tiff/astifftagviewer.html). It is 8-bits with 2 channels, an uncommon TIFF format. It does not open correctly in older versions of ImageJ. 

SubFileType (1 Long): Zero
ImageWidth (1 Long): 512
ImageLength (1 Long): 512
BitsPerSample (2 Short): 8, 8
Compression (1 Short): Uncompressed
Photometric (1 Short): MinIsBlack
ImageDescription (1 ASCII):  
StripOffsets (52 Long): 24, 10264, 20504, 30744, 40984, 51224,...
Orientation (1 Short): TopLeft
SamplesPerPixel (1 Short): 2
RowsPerStrip (1 Long): 10
StripByteCounts (52 Long): 10240, 10240, 10240, 10240, 10240, 10240,...
XResolution (1 Rational): 28.34646
YResolution (1 Rational): 28.34646
ResolutionUnit (1 Short): Centimeter
ExtraSamples (1 Short): 999
IT8Site (0 ASCII): 
IT8ColorSequence (0 ASCII): 
IT8Header (0 ASCII): 
IT8RasterPadding (1 Short): 0
IT8BitsPerRunLength (1 Short): 8
IT8BitsPerExtendedRunLength (1 Short): 16
IT8ColorTable (0 Byte): 
IT8ImageColorIndicator (1 Byte): 0
IT8BkgColorIndicator (1 Byte): 0
IT8ImageColorValue (0 Byte): 
IT8BkgColorValue (0 Byte): 
IT8PixelIntensityRange (2 Byte): 0, 0
IT8TransparencyIndicator (1 Byte): 0
IT8ColorCharacterization (0 ASCII): 
34030 (1 Long): 0