BfConvert Command Line Tool

Tags: #<Tag:0x00007fd542a134d8> #<Tag:0x00007fd542a132d0> #<Tag:0x00007fd542a13168>


The erroneous red lines are gone when the option is enabled. For my tiff files, would I only be able to read them with SCIFIO? I import .lif files to Fiji and used the software to create the .tiff files using the the bfconvert command-line tool.



So I have been able to get the BfConvert command line tool to work, but it creates tiffs that appear to be distorted on ImageJ unless SCIFIO is enabled. Maybe this would be okay if I am using it solely for data analysis, but I have to publish this data on our consortium website. It seems impractical for website users to download the image data, see the distortion, and have to enable SCIFIO. Although, I have been able to successfully implement the tool, I may have to try the macro programming again as that perhaps would create tiffs that can be opened correctly with ImageJ without SCIFIO.

I am also running into Tiff issues with the macro program I am trying to create to merge 2 channels of data (generated from bfconvert). In another forum, I have been trying to debug issues with my code: Merge Channels Issue I thought the merge channels function was not working correctly, but it seems to be an issue with opening the tiff files themselves. The code seems to run fine.

If anyone has any suggestions and insight on this issue that would be greatly appreciated.



Agreed. Note that based on the additional information you provided above, the issue is very likely a bug in ImageJ 1.x’s TIFF reader. Sorry that I do not have time to dig into it right now—although anyone else in the community could do so, since the TIFF file you linked above reproducibly demonstrates the issue.

In the meantime, two other ways to read the TIFF without distortion, without needing to enable SCIFIO by default:

  1. File :arrow_forward: Import :arrow_forward: Image…
  2. File :arrow_forward: Import :arrow_forward: Bio-Formats

Both of these options are far toward/at the bottom of the submenu.


I did some digging in the ImageJ1.x code for reading TIFFs. The assumption that pixels of multi-plane TIFFs are contiguous does not hold for files generated with bfconvert (side note: same for SCIFIO). In the resulting TIFF files, IDF data are stored inbetween the pixels, which are ignored by ImageJ1.

Don’t know how to further proceed on this. Any thoughts @ctrueden?


The best way would be to improve ImageJ 1.x’s TIFF reader to handle this case correctly. This could potentially compromise ImageJ1’s TIFF reading performance, though. Perhaps ImageJ1 could gain some case logic that only does the contiguous pixels reading when it knows the input is actually a valid IJ1-flavored TIFF (not something written by something else such as Bio-Formats or SCIFIO). @Wayne do you have any preferences or ideas here?


What do I need to do to reproduce this problem? I used File>Save>OME-TIFF to save the T1 Head sample stack, but it opened without a problem.


I am using the Bfconvert Command line tools to generate tiff files from .lif files. Those tiff files are not opening correctly using File>Open, but do open correctly using Bioformats Importer and File> Import > Image
-I could provide a sample if you like

I want to open these tiff files to merge the two channels. I am currently stuck on how to macro program the bioformats importer in my code. Merge Channels Issue


Please provide a sample image that will not open correctly.



As I mentioned before, I am having trouble with using bioformats importer in a macro program to replace File>Open. With File> Open, the code is open(file1 + list1[i]); with i iterating through the list of files in the directory. With Bioformats Importer, you first have to create text for the file then pass it to the bioformats function:

open1=(file1 + list1[i]); //should print “/home/azmanr/folder/file.tiff"
run(“Bio-Formats Importer”, “open=[”+open1+”] autoscale color_mode=Default rois_import=[ROI manager] split_channels view=Hyperstack stack_order=XYCZT");

But, I keep getting null value for open1 and have not been able to pass any filenames to the Bioformats Importer in the for loop, what am I doing wrong? Is it a syntax issue? Here is a link to the full code: Merge Channels Issue

With the Ome.Tiff files I created using ImageJ, they open correctly with File> Open; however, with Bioformats importer my already created merge images appear in seperate channels in greyscale. File> Import> Image opens the merged images formatted correctly, but has c=3 and the c slider bar is showing; the single channel data opens as greyscale instead of the correct color channel. I am now using Tiff files, but I don’t understand why there are descrepencies between tiff and ome.tiff as well as between files created manually in ImageJ or bfconvert. Here is a sample ome.tiff file:



Thanks to @stelfrich, this bug is fixed in the latest ImageJ daily build (1.51q27).


Just as a follow up, we also received a very similar report on the OME users mailing list:

Using the SCIFIO option also resolved the issue for that particular user. Linking to the Trello card that the Bio-Formats team had for tracking this issue for future reference:

David Gault