-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colors wrong when saving ND2 to png #52
Comments
Hi @LordKnish, I believe the color issue is due to the default value that I see different options here:
Hope this helps! |
I tried experimenting with colormaps both through Also some more info on the channels themselves. each are two channels and I;16. Let me know what you think |
@ggirelli This is the results of the colormaps tests I tried. These are the most similar results of colormaps with their respective names. The issue is I am still missing that layer of blue and red from the Cy3 and Dapi layers. |
I see. I have to admit that I have limited experience with Regarding the issue with bit-depth, I would recommend checking out the Regarding the colormap issue, I have never assigned colors to channels in Python. To the best of my knowledge (quite possibly outdated or simply wrong), the TIFF format has tags for the colorspace and colormap. I found a post by the curator of the |
@ggirelli I am going to try out Tifffile and see how it works with saving a concatenated image. As for the TIFF formats tags. below is a full analysis of the tiff original image during ImageMagick. Let me know what you think.
going to investigate that post from tifffile curator but not sure how well it will work since I want to use the images for analysis from an AI not with ImageJ |
If the analysis is done via deep learning or similar, I would not expect the color label to matter, only the intensity of the different channels (if the ML approach you use can handle them separately). If that is the case, even if you see the wrong colors or use different color maps, would that affect your results? 🤔 |
I would also recommend opening an issue for help in the |
The main thing is that our AI works a bit differently but I can't really go into detail on that. Either way we need to convert the ND2 file to either tiff or png and have the output be the same as NisElements output. First of all I think that combining the channels is the first thing that needs to change. You said concatenating the channels together so I will try that out with Tifffile but just keep in mind that each channel are two channel PIMs frames so I wonder if they need some sort of filter on them? Thoughts? |
Update @ggirelli I tried out Tifffile and it outputs a black image and posts the following error to the console I can open an issue there if you are unsure code:
|
Hi,
I am using ND2reader to take each color channel (3 in my case) combine and export to a tif. This is an example of what it should look like:
but instead I get this image which seems like the colors are completely off.
doing an image analysis and comparison using ImageMagick it seems like my script is just not saving it as 16 bit or combining as 16 bit at all. Any thoughts?
Image from script ->
ImageFromND2_hour0.frame0.png PNG 512x512 512x512+0+0 8-bit sRGB 400303B 0.000u 0:00.002
Image From NisElements ->
31.5.21 alk ascending concentration_croppedt01xy01.tif TIFF 512x512 512x512+0+0 16-bit sRGB 1.51925MiB 0.031u 0:00.035
My script:
The text was updated successfully, but these errors were encountered: