Bug when reading RGB TIFF files with ROWSPERSTRIP=1

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Bug when reading RGB TIFF files with ROWSPERSTRIP=1

MRivers
Folks,

I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.

These files are displayed correctly in other applications, including:

-          Microsoft Photos, Paint (Windows 10)

-          IDL (8.5.1)

-          ImageMagick "display" utility on Linux (6.7.8-9)

This is the output of the Linux tiffinfo command on the file:
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I have attached 2 PNG files.

rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.

I have not attached the test file because it is quite large.  However, it can be found here:

http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif

That directory also contains 2 other test files.

test_rgb1_001.tif
This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: single image plane
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

test_rgb3_001.tif
This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.

Thanks,
Mark Rivers



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

rgb2.png (23K) Download Attachment
rgb2_ImageMagick.png (27K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Good day Mark,

your sample image "test_rgb2_001.tif" opens correctly when using BioFormats.

It is not a conventional RGB-image but an image showing two color
channels (blue is empty).

BioFormats setting:

View stack with: Hyperstack
Color mode:      Default

After the import you can get an RGB image by:

"Image >> Colors >> Channels Tool... >> More >> Convert to RGB"

HTH

Herbie

::::::::::::::::::::::::::::::::::::::::
Am 15.04.18 um 17:33 schrieb Mark Rivers:

> Folks,
>
> I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.
>
> These files are displayed correctly in other applications, including:
>
> -          Microsoft Photos, Paint (Windows 10)
>
> -          IDL (8.5.1)
>
> -          ImageMagick "display" utility on Linux (6.7.8-9)
>
> This is the output of the Linux tiffinfo command on the file:
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1
>    Planar Configuration: separate image planes
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> I have attached 2 PNG files.
>
> rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
> rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.
>
> I have not attached the test file because it is quite large.  However, it can be found here:
>
> http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif
>
> That directory also contains 2 other test files.
>
> test_rgb1_001.tif
> This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1024
>    Planar Configuration: single image plane
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> test_rgb3_001.tif
> This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1024
>    Planar Configuration: separate image planes
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.
>
> Thanks,
> Mark Rivers
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

MRivers
In reply to this post by MRivers
Herbie wrote:

Good day Mark,

your sample image "test_rgb2_001.tif" opens correctly when using BioFormats.

It is not a conventional RGB-image but an image showing two color
channels (blue is empty).

BioFormats setting:

View stack with: Hyperstack
Color mode:      Default

After the import you can get an RGB image by:

"Image >> Colors >> Channels Tool... >> More >> Convert to RGB"

HTH

Herbie

I am not sure what BioFormats is?  Is this an ImageJ plugin?

I don't agree that blue is empty in these files.  I have made a new file in the same directory as my previous image, test_rgb2_002.tif.  In this image the red, green, and blue planes all have the same value, so it should display in grey.   Indeed it does display in grey when using ImageMagick on Linux, or Photos or Paint on Windows.  I have attached a PNG file screen shot of the ImageMagick display of this file.  Note that it is grey.  I have also attached the ImageJ display screen shot.  Note that it is not grey, and in fact clearly contains red, green, and blue colors but is not displaying the file correctly.

I maintain my file is a perfectly valid RGB file.  It has separate color planes.  Rather than having the more conventional 1024 rows/strip for plane interleave has 1 row/strip.  Other applications read this file correctly, but ImageJ does not.

Thanks,
Mark



From: Mark Rivers
Sent: Sunday, April 15, 2018 10:33 AM
To: [hidden email]
Subject: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Folks,

I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.

These files are displayed correctly in other applications, including:

-          Microsoft Photos, Paint (Windows 10)

-          IDL (8.5.1)

-          ImageMagick "display" utility on Linux (6.7.8-9)

This is the output of the Linux tiffinfo command on the file:
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I have attached 2 PNG files.

rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.

I have not attached the test file because it is quite large.  However, it can be found here:

http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif

That directory also contains 2 other test files.

test_rgb1_001.tif
This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: single image plane
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

test_rgb3_001.tif
This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
*******************************
TIFF Directory at offset 0x300008 (3145736)
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: separate image planes
  Make: Unknown
  Model: Unknown
  Software: EPICS areaDetector
*******************************

I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.

Thanks,
Mark Rivers



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

rgb2_002.png (34K) Download Attachment
rgb2_002ImageMagick.png (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Yes Mark,

it is an ImageJ-plugin:

<https://www.openmicroscopy.org/bio-formats/downloads/>

Please try with BioFormats and please report about your result.

Regards

Herbie


:::::::::::::::::::::::::::::::::::::::::
Am 16.04.18 um 00:42 schrieb Mark Rivers:

> Herbie wrote:
>
> Good day Mark,
>
> your sample image "test_rgb2_001.tif" opens correctly when using BioFormats.
>
> It is not a conventional RGB-image but an image showing two color
> channels (blue is empty).
>
> BioFormats setting:
>
> View stack with: Hyperstack
> Color mode:      Default
>
> After the import you can get an RGB image by:
>
> "Image >> Colors >> Channels Tool... >> More >> Convert to RGB"
>
> HTH
>
> Herbie
>
> I am not sure what BioFormats is?  Is this an ImageJ plugin?
>
> I don't agree that blue is empty in these files.  I have made a new file in the same directory as my previous image, test_rgb2_002.tif.  In this image the red, green, and blue planes all have the same value, so it should display in grey.   Indeed it does display in grey when using ImageMagick on Linux, or Photos or Paint on Windows.  I have attached a PNG file screen shot of the ImageMagick display of this file.  Note that it is grey.  I have also attached the ImageJ display screen shot.  Note that it is not grey, and in fact clearly contains red, green, and blue colors but is not displaying the file correctly.
>
> I maintain my file is a perfectly valid RGB file.  It has separate color planes.  Rather than having the more conventional 1024 rows/strip for plane interleave has 1 row/strip.  Other applications read this file correctly, but ImageJ does not.
>
> Thanks,
> Mark
>
>
>
> From: Mark Rivers
> Sent: Sunday, April 15, 2018 10:33 AM
> To: [hidden email]
> Subject: Bug when reading RGB TIFF files with ROWSPERSTRIP=1
>
> Folks,
>
> I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.
>
> These files are displayed correctly in other applications, including:
>
> -          Microsoft Photos, Paint (Windows 10)
>
> -          IDL (8.5.1)
>
> -          ImageMagick "display" utility on Linux (6.7.8-9)
>
> This is the output of the Linux tiffinfo command on the file:
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1
>    Planar Configuration: separate image planes
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> I have attached 2 PNG files.
>
> rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
> rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.
>
> I have not attached the test file because it is quite large.  However, it can be found here:
>
> http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif
>
> That directory also contains 2 other test files.
>
> test_rgb1_001.tif
> This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1024
>    Planar Configuration: single image plane
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> test_rgb3_001.tif
> This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>    Image Width: 1024 Image Length: 1024
>    Bits/Sample: 8
>    Sample Format: unsigned integer
>    Compression Scheme: None
>    Photometric Interpretation: RGB color
>    Samples/Pixel: 3
>    Rows/Strip: 1024
>    Planar Configuration: separate image planes
>    Make: Unknown
>    Model: Unknown
>    Software: EPICS areaDetector
> *******************************
>
> I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.
>
> Thanks,
> Mark Rivers
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

MRivers
In reply to this post by MRivers
Hi Herbie,

> Yes Mark,
> it is an ImageJ-plugin:
> <https://www.openmicroscopy.org/bio-formats/downloads/>
> Please try with BioFormats and please report about your result.

> Regards
> Herbie


Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.

Thanks,
Mark

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Mark,

due to the highly flexible TIF-definition (a generally positive
property) there is an enormous variety of TIF-file types and ImageJ
can't open all of them (correctly). A typical variety that poses
problems are compressed TIF-files.

BioFormats copes with more TIF-types and most of them it opens without
further processing.

I understand that the steps I've proposed aren't suited for opening
files on a regular basis. Therefore, I suggest to contact the
BioFormats-team and provide typical images that pose problems. In
general, they will have a look at them and if possible provide a
dedicated solution. This means that you may then be able to open such
images via BioFormats directly, i.e. without any further steps or settings.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 16.04.18 um 15:36 schrieb Mark Rivers:

> Hi Herbie,
>
>> Yes Mark,
>> it is an ImageJ-plugin:
>> <https://www.openmicroscopy.org/bio-formats/downloads/>
>> Please try with BioFormats and please report about your result.
>
>> Regards
>> Herbie
>
>
> Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.
>
> Thanks,
> Mark
>
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
In reply to this post by MRivers
Mark,

for the time being and if you have the file paths as strings, you may
use this ImageJ-macro to open such TIF-files:

fileName = "test_rgb2_001.tif";
imagePath = "dirPath/"+fileName;
run("Bio-Formats Importer", "open="+imagePath+" color_mode=Default
view=Hyperstack stack_order=XYCZT"); // watch for line break
run("Stack to RGB");
selectWindow(fileName);
close();

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 16.04.18 um 15:36 schrieb Mark Rivers:

> Hi Herbie,
>
>> Yes Mark,
>> it is an ImageJ-plugin:
>> <https://www.openmicroscopy.org/bio-formats/downloads/>
>> Please try with BioFormats and please report about your result.
>
>> Regards
>> Herbie
>
>
> Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.
>
> Thanks,
> Mark
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

MRivers
In reply to this post by Herbie
> due to the highly flexible TIF-definition (a generally positive property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.

That is true.  But in the specific case of the simple images I am discussing I believe it is a true bug in ImageJ.

First, these images open correctly in every other application I have tested, which now includes several more than my previous posts.

- The Python Imaging Library (PIL) correctly displays these files with the following:
>>> from PIL import Image
>>> im = Image.open('test_rgb2_001.tif')
>>> im.Show()

- IDL read_tiff('test_rgb2_001.tif') function returns an 3-D array that displays correctly with the IDL iimage function.

- ImageMagick correctly displays the file with the Linux "display test_rgb2_001.tif" command

- Dragging the file into a Microsoft Word document displays it correctly

- Dragging the file into a Microsoft PowerPoint document displays it correctly.

- Opening the file with Microsoft Paint displays the file correctly

- Opening the file with Microsoft Photos displays the file correctly

In fact the only application I can find that does not display the file correctly is ImageJ.

Moreover, if ImageJ does not understand the TIFF file it should report a warning or error.  However, it does not report any problem.  It acts as if it correctly read the file, but the image displayed in ImageJ is completely wrong.

I really believe this is a bug in ImageJ.

Mark


-----Original Message-----
From: Herbie [mailto:[hidden email]]
Sent: Monday, April 16, 2018 8:48 AM
To: Mark Rivers <[hidden email]>; [hidden email]
Subject: Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Mark,

due to the highly flexible TIF-definition (a generally positive
property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.

BioFormats copes with more TIF-types and most of them it opens without further processing.

I understand that the steps I've proposed aren't suited for opening files on a regular basis. Therefore, I suggest to contact the BioFormats-team and provide typical images that pose problems. In general, they will have a look at them and if possible provide a dedicated solution. This means that you may then be able to open such images via BioFormats directly, i.e. without any further steps or settings.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 16.04.18 um 15:36 schrieb Mark Rivers:

> Hi Herbie,
>
>> Yes Mark,
>> it is an ImageJ-plugin:
>> <https://www.openmicroscopy.org/bio-formats/downloads/>
>> Please try with BioFormats and please report about your result.
>
>> Regards
>> Herbie
>
>
> Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.
>
> Thanks,
> Mark
>
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Kenneth Sloan-3
I agree.  Reading common (even complicated) image formats should be a core part of the ImageJ package.

It seems to me that TIF problems have been historically punted to BioFormats.  [I may be totally wrong about
this - but that's the impression I have].  

If so, this is a mistake.  The cardinal rule for software is "be liberal in what you read, and conservative in what you write".

Another rule is: recognize your limitions and report it when you are asked to do something beyond the scope of your competence.

I'm not saying that it's *easy* to produce a high quality TIF reader - but I do believe that it SHOULD BE a high priority.

Again - at the very LEAST: recognize format variations that canNOT be handled, and report this clearly.

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 16 Apr 2018, at 14:41 , Mark Rivers <[hidden email]> wrote:
>
>> due to the highly flexible TIF-definition (a generally positive property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.
>
> That is true.  But in the specific case of the simple images I am discussing I believe it is a true bug in ImageJ.
>
> First, these images open correctly in every other application I have tested, which now includes several more than my previous posts.
>
> - The Python Imaging Library (PIL) correctly displays these files with the following:
>>>> from PIL import Image
>>>> im = Image.open('test_rgb2_001.tif')
>>>> im.Show()
>
> - IDL read_tiff('test_rgb2_001.tif') function returns an 3-D array that displays correctly with the IDL iimage function.
>
> - ImageMagick correctly displays the file with the Linux "display test_rgb2_001.tif" command
>
> - Dragging the file into a Microsoft Word document displays it correctly
>
> - Dragging the file into a Microsoft PowerPoint document displays it correctly.
>
> - Opening the file with Microsoft Paint displays the file correctly
>
> - Opening the file with Microsoft Photos displays the file correctly
>
> In fact the only application I can find that does not display the file correctly is ImageJ.
>
> Moreover, if ImageJ does not understand the TIFF file it should report a warning or error.  However, it does not report any problem.  It acts as if it correctly read the file, but the image displayed in ImageJ is completely wrong.
>
> I really believe this is a bug in ImageJ.
>
> Mark
>
>
> -----Original Message-----
> From: Herbie [mailto:[hidden email]]
> Sent: Monday, April 16, 2018 8:48 AM
> To: Mark Rivers <[hidden email]>; [hidden email]
> Subject: Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1
>
> Mark,
>
> due to the highly flexible TIF-definition (a generally positive
> property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.
>
> BioFormats copes with more TIF-types and most of them it opens without further processing.
>
> I understand that the steps I've proposed aren't suited for opening files on a regular basis. Therefore, I suggest to contact the BioFormats-team and provide typical images that pose problems. In general, they will have a look at them and if possible provide a dedicated solution. This means that you may then be able to open such images via BioFormats directly, i.e. without any further steps or settings.
>
> Regards
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::
> Am 16.04.18 um 15:36 schrieb Mark Rivers:
>> Hi Herbie,
>>
>>> Yes Mark,
>>> it is an ImageJ-plugin:
>>> <https://www.openmicroscopy.org/bio-formats/downloads/>
>>> Please try with BioFormats and please report about your result.
>>
>>> Regards
>>> Herbie
>>
>>
>> Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.
>>
>> Thanks,
>> Mark
>>
>>
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

ctrueden
In reply to this post by MRivers
Hi everyone,

Since no one else brought it up yet: the state of ImageJ's TIFF support is
described here:

   https://imagej.net/TIFF

If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
which has different behavior than plain ImageJ 1.x does.

Regards,
Curtis

P.S. Note that this bug report was also posted on GitHub at
https://github.com/imagej/imagej/issues/196.

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Mon, Apr 16, 2018 at 4:32 PM, Kenneth Sloan <[hidden email]>
wrote:

> I agree.  Reading common (even complicated) image formats should be a core
> part of the ImageJ package.
>
> It seems to me that TIF problems have been historically punted to
> BioFormats.  [I may be totally wrong about
> this - but that's the impression I have].
>
> If so, this is a mistake.  The cardinal rule for software is "be liberal
> in what you read, and conservative in what you write".
>
> Another rule is: recognize your limitions and report it when you are asked
> to do something beyond the scope of your competence.
>
> I'm not saying that it's *easy* to produce a high quality TIF reader - but
> I do believe that it SHOULD BE a high priority.
>
> Again - at the very LEAST: recognize format variations that canNOT be
> handled, and report this clearly.
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
> > On 16 Apr 2018, at 14:41 , Mark Rivers <[hidden email]> wrote:
> >
> >> due to the highly flexible TIF-definition (a generally positive
> property) there is an enormous variety of TIF-file types and ImageJ can't
> open all of them (correctly). A typical variety that poses problems are
> compressed TIF-files.
> >
> > That is true.  But in the specific case of the simple images I am
> discussing I believe it is a true bug in ImageJ.
> >
> > First, these images open correctly in every other application I have
> tested, which now includes several more than my previous posts.
> >
> > - The Python Imaging Library (PIL) correctly displays these files with
> the following:
> >>>> from PIL import Image
> >>>> im = Image.open('test_rgb2_001.tif')
> >>>> im.Show()
> >
> > - IDL read_tiff('test_rgb2_001.tif') function returns an 3-D array that
> displays correctly with the IDL iimage function.
> >
> > - ImageMagick correctly displays the file with the Linux "display
> test_rgb2_001.tif" command
> >
> > - Dragging the file into a Microsoft Word document displays it correctly
> >
> > - Dragging the file into a Microsoft PowerPoint document displays it
> correctly.
> >
> > - Opening the file with Microsoft Paint displays the file correctly
> >
> > - Opening the file with Microsoft Photos displays the file correctly
> >
> > In fact the only application I can find that does not display the file
> correctly is ImageJ.
> >
> > Moreover, if ImageJ does not understand the TIFF file it should report a
> warning or error.  However, it does not report any problem.  It acts as if
> it correctly read the file, but the image displayed in ImageJ is completely
> wrong.
> >
> > I really believe this is a bug in ImageJ.
> >
> > Mark
> >
> >
> > -----Original Message-----
> > From: Herbie [mailto:[hidden email]]
> > Sent: Monday, April 16, 2018 8:48 AM
> > To: Mark Rivers <[hidden email]>; [hidden email]
> > Subject: Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1
> >
> > Mark,
> >
> > due to the highly flexible TIF-definition (a generally positive
> > property) there is an enormous variety of TIF-file types and ImageJ
> can't open all of them (correctly). A typical variety that poses problems
> are compressed TIF-files.
> >
> > BioFormats copes with more TIF-types and most of them it opens without
> further processing.
> >
> > I understand that the steps I've proposed aren't suited for opening
> files on a regular basis. Therefore, I suggest to contact the
> BioFormats-team and provide typical images that pose problems. In general,
> they will have a look at them and if possible provide a dedicated solution.
> This means that you may then be able to open such images via BioFormats
> directly, i.e. without any further steps or settings.
> >
> > Regards
> >
> > Herbie
> >
> > :::::::::::::::::::::::::::::::::::::::::
> > Am 16.04.18 um 15:36 schrieb Mark Rivers:
> >> Hi Herbie,
> >>
> >>> Yes Mark,
> >>> it is an ImageJ-plugin:
> >>> <https://www.openmicroscopy.org/bio-formats/downloads/>
> >>> Please try with BioFormats and please report about your result.
> >>
> >>> Regards
> >>> Herbie
> >>
> >>
> >> Yes, I can read these images with Bioformats as you described.
> However, that is rather inconvenient.  These are perfectly valid TIFF files
> which can be opened with no problems in other applications (IDL,
> ImageMagick, Photos, Paint, etc.) so I believe they should open correctly
> with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them
> but completely incorrectly.
> >>
> >> Thanks,
> >> Mark
> >>
> >>
> >>
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
In reply to this post by MRivers
Mark,

I think we understood your concerns but I'm not responsible for the
TIFF-reader code, so please be less upset and wait for an eventual solution.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 16.04.18 um 21:41 schrieb Mark Rivers:

>> due to the highly flexible TIF-definition (a generally positive property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.
>
> That is true.  But in the specific case of the simple images I am discussing I believe it is a true bug in ImageJ.
>
> First, these images open correctly in every other application I have tested, which now includes several more than my previous posts.
>
> - The Python Imaging Library (PIL) correctly displays these files with the following:
>>>> from PIL import Image
>>>> im = Image.open('test_rgb2_001.tif')
>>>> im.Show()
>
> - IDL read_tiff('test_rgb2_001.tif') function returns an 3-D array that displays correctly with the IDL iimage function.
>
> - ImageMagick correctly displays the file with the Linux "display test_rgb2_001.tif" command
>
> - Dragging the file into a Microsoft Word document displays it correctly
>
> - Dragging the file into a Microsoft PowerPoint document displays it correctly.
>
> - Opening the file with Microsoft Paint displays the file correctly
>
> - Opening the file with Microsoft Photos displays the file correctly
>
> In fact the only application I can find that does not display the file correctly is ImageJ.
>
> Moreover, if ImageJ does not understand the TIFF file it should report a warning or error.  However, it does not report any problem.  It acts as if it correctly read the file, but the image displayed in ImageJ is completely wrong.
>
> I really believe this is a bug in ImageJ.
>
> Mark
>
>
> -----Original Message-----
> From: Herbie [mailto:[hidden email]]
> Sent: Monday, April 16, 2018 8:48 AM
> To: Mark Rivers <[hidden email]>; [hidden email]
> Subject: Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1
>
> Mark,
>
> due to the highly flexible TIF-definition (a generally positive
> property) there is an enormous variety of TIF-file types and ImageJ can't open all of them (correctly). A typical variety that poses problems are compressed TIF-files.
>
> BioFormats copes with more TIF-types and most of them it opens without further processing.
>
> I understand that the steps I've proposed aren't suited for opening files on a regular basis. Therefore, I suggest to contact the BioFormats-team and provide typical images that pose problems. In general, they will have a look at them and if possible provide a dedicated solution. This means that you may then be able to open such images via BioFormats directly, i.e. without any further steps or settings.
>
> Regards
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::
> Am 16.04.18 um 15:36 schrieb Mark Rivers:
>> Hi Herbie,
>>
>>> Yes Mark,
>>> it is an ImageJ-plugin:
>>> <https://www.openmicroscopy.org/bio-formats/downloads/>
>>> Please try with BioFormats and please report about your result.
>>
>>> Regards
>>> Herbie
>>
>>
>> Yes, I can read these images with Bioformats as you described.  However, that is rather inconvenient.  These are perfectly valid TIFF files which can be opened with no problems in other applications (IDL, ImageMagick, Photos, Paint, etc.) so I believe they should open correctly with the built-in ImageJ TIFF reader.  The built-in TIFF reader opens them but completely incorrectly.
>>
>> Thanks,
>> Mark
>>
>>
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

MRivers
In reply to this post by MRivers
Hi Curtis,

> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
> Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
> which has different behavior than plain ImageJ 1.x does.

Thanks for the suggestion.  It looks like I need ImageJ2 to try that, right?  I have never tried ImageJ2, and I am having trouble figuring out how to install it.  I downloaded the latest release candidate zip from from Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows 10, 64-bit.  Do I need to install maven to build this?  Are there any pre-built install packages for ImageJ on Windows?

Thanks,
Mark

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Mark,

I just opened your image "test_rgb2_001.tif" in Fiji with SCIFIO and it
opens visually correct but as 3-channel image, again with an empty third
channel (blue).

So I see no advantage compared to BioFormats.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 17.04.18 um 15:36 schrieb Mark Rivers:

> Hi Curtis,
>
>> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
>> Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
>> which has different behavior than plain ImageJ 1.x does.
>
> Thanks for the suggestion.  It looks like I need ImageJ2 to try that, right?  I have never tried ImageJ2, and I am having trouble figuring out how to install it.  I downloaded the latest release candidate zip from from Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows 10, 64-bit.  Do I need to install maven to build this?  Are there any pre-built install packages for ImageJ on Windows?
>
> Thanks,
> Mark
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
In reply to this post by MRivers
Mark,

your image "test_rgb2_002.tif" opens the same with BioFormats and SCIFIO
as a 3-channel (8bit each) image.

As you've mentioned, image "test_rgb2_002.tif" is a achromatic picture,
i.e. all channels have signals.

Please use the color channel tool to confirm my investigations on your side.

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::
Am 17.04.18 um 16:35 schrieb Mark Rivers:

> Hi Herbie,
>
>
> Thanks for checking.
>
>
> I don't understand why it would say that blue is empty, it should not be.
>
>
> What happens if you open test_rgb2_002.tif?  Is it gray?  If so then blue cannot be empty or one would not get gray.
>
>
> The latest Fiji uses ImageJ2?
>
>
> Thanks,
>
> Mark
>
>
>
> ________________________________
> From: Herbie <[hidden email]>
> Sent: Tuesday, April 17, 2018 9:25 AM
> To: Mark Rivers
> Subject: Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1
>
> Mark,
>
> I just opened your image "test_rgb2_001.tif" in Fiji* with SCIFIO and it
> opens visually correct but as 3-channel image, again with an empty third
> channel (blue).
>
> So I see no advantage compared to BioFormats.
>
> Regards
>
> Herbie
>
> PS: No need to compile ImageJ-2 just use Fiji.
>
> :::::::::::::::::::::::::::::::::::::::::
> Am 17.04.18 um 15:36 schrieb Mark Rivers:
>> Hi Curtis,
>>
>>> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
>>> Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
>>> which has different behavior than plain ImageJ 1.x does.
>>
>> Thanks for the suggestion.  It looks like I need ImageJ2 to try that, right?  I have never tried ImageJ2, and I am having trouble figuring out how to install it.  I downloaded the latest release candidate zip from from Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows 10, 64-bit.  Do I need to install maven to build this?  Are there any pre-built install packages for ImageJ on Windows?
>>
>> Thanks,
>> Mark
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

ctrueden
In reply to this post by MRivers
Hi Mark,

> It looks like I need ImageJ2 to try that, right?

Yes. The easiest way to get ImageJ2 right now is to download Fiji from
https://fiji.sc/#download.

Herbie wrote:
> I see no advantage compared to BioFormats.

The advantage is that enabling the "Use SCIFIO when opening files" option
will use SCIFIO for drag-and-drop and other integrated file opening
functions. So you can drag-and-drop these TIFF files onto the ImageJ main
window, and/or associate ImageJ as the default program to open them, and
they will open correctly.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Tue, Apr 17, 2018 at 8:36 AM, Mark Rivers <[hidden email]>
wrote:

> Hi Curtis,
>
> > If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
> > Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
> > which has different behavior than plain ImageJ 1.x does.
>
> Thanks for the suggestion.  It looks like I need ImageJ2 to try that,
> right?  I have never tried ImageJ2, and I am having trouble figuring out
> how to install it.  I downloaded the latest release candidate zip from from
> Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows 10,
> 64-bit.  Do I need to install maven to build this?  Are there any pre-built
> install packages for ImageJ on Windows?
>
> Thanks,
> Mark
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Good day Curtis!

"[...] and they will open correctly."

Mark's images don't open correctly, neither with BioFormats nor with
SCIFIO under Fiji.

Mark's TIF-images should appear as 24bit RGB images but BioFormats and
SCIFIO under Fiji opens them as 3-channel images.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 17.04.18 um 17:54 schrieb Curtis Rueden:

> Hi Mark,
>
>> It looks like I need ImageJ2 to try that, right?
>
> Yes. The easiest way to get ImageJ2 right now is to download Fiji from
> https://fiji.sc/#download.
>
> Herbie wrote:
>> I see no advantage compared to BioFormats.
>
> The advantage is that enabling the "Use SCIFIO when opening files" option
> will use SCIFIO for drag-and-drop and other integrated file opening
> functions. So you can drag-and-drop these TIFF files onto the ImageJ main
> window, and/or associate ImageJ as the default program to open them, and
> they will open correctly.
>
> Regards,
> Curtis
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Tue, Apr 17, 2018 at 8:36 AM, Mark Rivers <[hidden email]>
> wrote:
>
>> Hi Curtis,
>>
>>> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
>>> Options > ImageJ2..., TIFF files will be opened using the SCIFIO library,
>>> which has different behavior than plain ImageJ 1.x does.
>>
>> Thanks for the suggestion.  It looks like I need ImageJ2 to try that,
>> right?  I have never tried ImageJ2, and I am having trouble figuring out
>> how to install it.  I downloaded the latest release candidate zip from from
>> Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows 10,
>> 64-bit.  Do I need to install maven to build this?  Are there any pre-built
>> install packages for ImageJ on Windows?
>>
>> Thanks,
>> Mark
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

ctrueden
In reply to this post by ctrueden
Hi Herbie,

> Mark's TIF-images should appear as 24bit RGB images but BioFormats and
> SCIFIO under Fiji opens them as 3-channel images.

Bio-Formats and SCIFIO never open images as 24-bit RGB. Such images always
open in composite mode. If needed, they can be converted to RGB as usual
via the Image > Type > RGB command.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Tue, Apr 17, 2018 at 11:41 AM, Herbie <[hidden email]> wrote:

> Good day Curtis!
>
> "[...] and they will open correctly."
>
> Mark's images don't open correctly, neither with BioFormats nor with
> SCIFIO under Fiji.
>
> Mark's TIF-images should appear as 24bit RGB images but BioFormats and
> SCIFIO under Fiji opens them as 3-channel images.
>
> Regards
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::
> Am 17.04.18 um 17:54 schrieb Curtis Rueden:
>
>> Hi Mark,
>>
>>
>> It looks like I need ImageJ2 to try that, right?
>>>
>>
>> Yes. The easiest way to get ImageJ2 right now is to download Fiji from
>> https://fiji.sc/#download.
>>
>> Herbie wrote:
>>
>>> I see no advantage compared to BioFormats.
>>>
>>
>> The advantage is that enabling the "Use SCIFIO when opening files" option
>> will use SCIFIO for drag-and-drop and other integrated file opening
>> functions. So you can drag-and-drop these TIFF files onto the ImageJ main
>> window, and/or associate ImageJ as the default program to open them, and
>> they will open correctly.
>>
>> Regards,
>> Curtis
>>
>> --
>> Curtis Rueden
>> LOCI software architect - https://loci.wisc.edu/software
>> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
>> Did you know ImageJ has a forum? http://forum.imagej.net/
>>
>>
>> On Tue, Apr 17, 2018 at 8:36 AM, Mark Rivers <[hidden email]>
>> wrote:
>>
>> Hi Curtis,
>>>
>>> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
>>>> Options > ImageJ2..., TIFF files will be opened using the SCIFIO
>>>> library,
>>>> which has different behavior than plain ImageJ 1.x does.
>>>>
>>>
>>> Thanks for the suggestion.  It looks like I need ImageJ2 to try that,
>>> right?  I have never tried ImageJ2, and I am having trouble figuring out
>>> how to install it.  I downloaded the latest release candidate zip from
>>> from
>>> Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows
>>> 10,
>>> 64-bit.  Do I need to install maven to build this?  Are there any
>>> pre-built
>>> install packages for ImageJ on Windows?
>>>
>>> Thanks,
>>> Mark
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Curtis,

please realize that I don't have any problems and I've even posted a
solution earlier in this thread.

It is Mark who is unhappy with this situation and he calls the
conversion from composite to RGB clumsy.

Apart from this, it appears as if ImageJ-1 can't open Mark's images
correctly and I agree that this looks like a bug because ImageJ-1
doesn't tell us that it is unable to deal with this TIF-variety but
simply opens an incorrect image.

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 17.04.18 um 19:49 schrieb Curtis Rueden:

> Hi Herbie,
>
>> Mark's TIF-images should appear as 24bit RGB images but BioFormats and
>> SCIFIO under Fiji opens them as 3-channel images.
>
> Bio-Formats and SCIFIO never open images as 24-bit RGB. Such images always
> open in composite mode. If needed, they can be converted to RGB as usual
> via the Image > Type > RGB command.
>
> Regards,
> Curtis
>
> --
> Curtis Rueden
> LOCI software architect - https://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Tue, Apr 17, 2018 at 11:41 AM, Herbie <[hidden email]> wrote:
>
>> Good day Curtis!
>>
>> "[...] and they will open correctly."
>>
>> Mark's images don't open correctly, neither with BioFormats nor with
>> SCIFIO under Fiji.
>>
>> Mark's TIF-images should appear as 24bit RGB images but BioFormats and
>> SCIFIO under Fiji opens them as 3-channel images.
>>
>> Regards
>>
>> Herbie
>>
>> :::::::::::::::::::::::::::::::::::::::::::
>> Am 17.04.18 um 17:54 schrieb Curtis Rueden:
>>
>>> Hi Mark,
>>>
>>>
>>> It looks like I need ImageJ2 to try that, right?
>>>>
>>>
>>> Yes. The easiest way to get ImageJ2 right now is to download Fiji from
>>> https://fiji.sc/#download.
>>>
>>> Herbie wrote:
>>>
>>>> I see no advantage compared to BioFormats.
>>>>
>>>
>>> The advantage is that enabling the "Use SCIFIO when opening files" option
>>> will use SCIFIO for drag-and-drop and other integrated file opening
>>> functions. So you can drag-and-drop these TIFF files onto the ImageJ main
>>> window, and/or associate ImageJ as the default program to open them, and
>>> they will open correctly.
>>>
>>> Regards,
>>> Curtis
>>>
>>> --
>>> Curtis Rueden
>>> LOCI software architect - https://loci.wisc.edu/software
>>> ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
>>> Did you know ImageJ has a forum? http://forum.imagej.net/
>>>
>>>
>>> On Tue, Apr 17, 2018 at 8:36 AM, Mark Rivers <[hidden email]>
>>> wrote:
>>>
>>> Hi Curtis,
>>>>
>>>> If you check the option "Use SCIFIO when opening files (BETA!)" in Edit >
>>>>> Options > ImageJ2..., TIFF files will be opened using the SCIFIO
>>>>> library,
>>>>> which has different behavior than plain ImageJ 1.x does.
>>>>>
>>>>
>>>> Thanks for the suggestion.  It looks like I need ImageJ2 to try that,
>>>> right?  I have never tried ImageJ2, and I am having trouble figuring out
>>>> how to install it.  I downloaded the latest release candidate zip from
>>>> from
>>>> Github (imagej-imageJ-2.0.0-rc-65) and unzipped it.  This is on Windows
>>>> 10,
>>>> 64-bit.  Do I need to install maven to build this?  Are there any
>>>> pre-built
>>>> install packages for ImageJ on Windows?
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Wayne Rasband-2
In reply to this post by MRivers
> On Apr 15, 2018, at 11:33 AM, Mark Rivers <[hidden email]> wrote:
>
> Folks,
>
> I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.

This bug is fixed in the latest ImageJ daily build (1.52a56).

-wayne

> These files are displayed correctly in other applications, including:
>
> -          Microsoft Photos, Paint (Windows 10)
>
> -          IDL (8.5.1)
>
> -          ImageMagick "display" utility on Linux (6.7.8-9)
>
> This is the output of the Linux tiffinfo command on the file:
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>  Image Width: 1024 Image Length: 1024
>  Bits/Sample: 8
>  Sample Format: unsigned integer
>  Compression Scheme: None
>  Photometric Interpretation: RGB color
>  Samples/Pixel: 3
>  Rows/Strip: 1
>  Planar Configuration: separate image planes
>  Make: Unknown
>  Model: Unknown
>  Software: EPICS areaDetector
> *******************************
>
> I have attached 2 PNG files.
>
> rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
> rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.
>
> I have not attached the test file because it is quite large.  However, it can be found here:
>
> http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif
>
> That directory also contains 2 other test files.
>
> test_rgb1_001.tif
> This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>  Image Width: 1024 Image Length: 1024
>  Bits/Sample: 8
>  Sample Format: unsigned integer
>  Compression Scheme: None
>  Photometric Interpretation: RGB color
>  Samples/Pixel: 3
>  Rows/Strip: 1024
>  Planar Configuration: single image plane
>  Make: Unknown
>  Model: Unknown
>  Software: EPICS areaDetector
> *******************************
>
> test_rgb3_001.tif
> This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
> *******************************
> TIFF Directory at offset 0x300008 (3145736)
>  Image Width: 1024 Image Length: 1024
>  Bits/Sample: 8
>  Sample Format: unsigned integer
>  Compression Scheme: None
>  Photometric Interpretation: RGB color
>  Samples/Pixel: 3
>  Rows/Strip: 1024
>  Planar Configuration: separate image planes
>  Make: Unknown
>  Model: Unknown
>  Software: EPICS areaDetector
> *******************************
>
> I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.
>
> Thanks,
> Mark Rivers

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Bug when reading RGB TIFF files with ROWSPERSTRIP=1

Herbie
Many thanks Wayne,

for the as always prompt and perfect support!

Mark's test images now open as expected.

With best regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 18.04.18 um 02:07 schrieb Wayne Rasband:

>> On Apr 15, 2018, at 11:33 AM, Mark Rivers <[hidden email]> wrote:
>>
>> Folks,
>>
>> I believe I have found a bug in ImageJ (1.51j8) when it reads RGB TIFF files with RowsPerStrip=1.
>
> This bug is fixed in the latest ImageJ daily build (1.52a56).
>
> -wayne
>
>> These files are displayed correctly in other applications, including:
>>
>> -          Microsoft Photos, Paint (Windows 10)
>>
>> -          IDL (8.5.1)
>>
>> -          ImageMagick "display" utility on Linux (6.7.8-9)
>>
>> This is the output of the Linux tiffinfo command on the file:
>> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1 and Planar Configuration is separate image planes.
>> *******************************
>> TIFF Directory at offset 0x300008 (3145736)
>>   Image Width: 1024 Image Length: 1024
>>   Bits/Sample: 8
>>   Sample Format: unsigned integer
>>   Compression Scheme: None
>>   Photometric Interpretation: RGB color
>>   Samples/Pixel: 3
>>   Rows/Strip: 1
>>   Planar Configuration: separate image planes
>>   Make: Unknown
>>   Model: Unknown
>>   Software: EPICS areaDetector
>> *******************************
>>
>> I have attached 2 PNG files.
>>
>> rgb2.png is a screen shot of how ImageJ displays this file.  It is incorrect.
>> rgb2_ImageMagick is a screen shot of how ImageMagick displays this file.  It is correct.  This is also how IDL, Photos, Paint, etc. display this file.
>>
>> I have not attached the test file because it is quite large.  However, it can be found here:
>>
>> http://cars.uchicago.edu/data/rivers/imagej/test_rgb2_001.tif
>>
>> That directory also contains 2 other test files.
>>
>> test_rgb1_001.tif
>> This is essential the same data, but with a more conventional TIFF layout of pixel interleave.  It displays correctly in ImageJ, as shown by rgb1.png which is a screen shot of ImageJ display of this file.
>> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is single image plane.
>> *******************************
>> TIFF Directory at offset 0x300008 (3145736)
>>   Image Width: 1024 Image Length: 1024
>>   Bits/Sample: 8
>>   Sample Format: unsigned integer
>>   Compression Scheme: None
>>   Photometric Interpretation: RGB color
>>   Samples/Pixel: 3
>>   Rows/Strip: 1024
>>   Planar Configuration: single image plane
>>   Make: Unknown
>>   Model: Unknown
>>   Software: EPICS areaDetector
>> *******************************
>>
>> test_rgb3_001.tif
>> This is essential the same data, but with a more conventional TIFF layout of plane  interleave.  It displays correctly in ImageJ, as shown by rgb3.png which is a screen shot of ImageJ display of this file.
>> This is the output of tiffinfo on this file.  Note that Rows/Strip is 1024 and Planar Configuration is separate image planes.
>> *******************************
>> TIFF Directory at offset 0x300008 (3145736)
>>   Image Width: 1024 Image Length: 1024
>>   Bits/Sample: 8
>>   Sample Format: unsigned integer
>>   Compression Scheme: None
>>   Photometric Interpretation: RGB color
>>   Samples/Pixel: 3
>>   Rows/Strip: 1024
>>   Planar Configuration: separate image planes
>>   Make: Unknown
>>   Model: Unknown
>>   Software: EPICS areaDetector
>> *******************************
>>
>> I searched for the correct way to submit an ImageJ bug report, and saw that there should be a menu item to do that in the Help menu.  But it does not appear in my 1.51j8 version.
>>
>> Thanks,
>> Mark Rivers
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
12