Incorrect default color for channels when opening .nd2 images

Dear community,
These issues exist when I updated imageJ to the latest version.
When I open an nd2 images with bio-formats, different from the situations in the older version, I have to change the colour mode from default to composed/colourized, or I will get a totally grey stack.
However, even when I choose the composed/colorized color mode, the channel colour seems quite different from what I have set when photographing. For example, the nd2 image consists of 4 channels: 1. FITC, 2. TRITC, 3. DAPI, 4. Cy5. But the colours displayed in ImageJ always becomes 1.green, 2. red, 3. blue, 4. RED as followed(which is supposed to be MAGENTA and works well in the older version). The same in all images no matter what channels are used and what the channel order is.

  1. I have checked the image information, the channel is recognized and the channel order is correct.
  2. I have also updated bio-formats to the latest version.
    Though I can change the colour of each channel with channel tools, it is still big trouble because I have to change the color manually based on the information.
    Can anyone help me please? Thanks.

Do you see the same problem if you change the setting for using the Native ND2 library? You can change the setting in Plugins > Bio-Formats > Bio-Formats Plugins Configuration > Formats > Nikon ND2 > Use Nikons ND2 library

If that makes no difference, do you know what version of Bio-Formats was being used in the older version? And if possible would yo be able to share a sample image showing the problem?

Hi @dgault !
Thanks for your help. It doesn’t work.


Actually, I updated imageJ (or FIJI) without updating Bio-Formats. And the images are displayed in the same way as mentioned, grey in all channels in default colour mode, or incorrect colour in some channels in composite/coloured mode.
I have also tried to return to the older version of imageJ via Help->Update ImageJ and choose v1.51 without changing the updated version of Bio-Formats. The bug remains.
But unfortunately, I forget the version of Bio-Formats in the older version which can recognize the channel correctly.
This is how the images are displayed in composite/coloured mode.

This is in default mode.

I fail to upload the original nd2 file. But the same problem also occurs to my colleagues when opening any nd2 images after updating ImageJ. As I have noticed, the built-in sample tiff files or VSI files are opened properly with or without Bio-Formats.

If you view the OME-XML, would you be able to post the Channel elements? It should look something similar to below:

<Channel Color="-1" EmissionWavelength="685.0" EmissionWavelengthUnit="nm" ID="Channel:0:0" Name="CSU far red RNA" SamplesPerPixel="1">
<Channel Color="-16776961" EmissionWavelength="607.0" EmissionWavelengthUnit="nm" ID="Channel:0:1" Name="CSU red RNA" SamplesPerPixel="1">
<Channel Color="16711935" EmissionWavelength="525.0" EmissionWavelengthUnit="nm" ID="Channel:0:2" Name="CSU green RNA" SamplesPerPixel="1">
<Channel Color="65535" EmissionWavelength="405.0" EmissionWavelengthUnit="nm" ID="Channel:0:3" Name="CSU blue RNA" SamplesPerPixel="1">
<Channel Color="-1" ID="Channel:0:4" Name="CSU BF" SamplesPerPixel="1">

Thanks for replying.


It is like this.

Hi, @dgault !
What’s wrong with these elements? It seems that my channel elements lack “name=*” compared to your example.

Yeah, it does seem like some of the channel metadata has not been populated correctly. I would really need to see a sample file to understand exactly why this is happening. Would you be able to try uploading a sample again? You could try https://zenodo.org/ as a public upload location if you do not have access to one.

I uploaded a sample file as followed. Thanks again

Thanks Zoey, I was able to debug the file and believe I have found the source of the problem. I have opened a Bio-Formats PR which will hopefully fix the issue: ND2: Always fall back to check channel names by dgault · Pull Request #3679 · ome/bioformats · GitHub

Thanks a lot, @dgault !
I hope that the update would be available as fast as possible. :smiley: