MontpellierRessourcesImagerie / imagej_macros_and_scripts

ImageJ macros and scripts written at the imaging facility MRI
MIT License
29 stars 15 forks source link

Intensity_Ratio_Nuclei_Cytoplasm.ijm #13

Open Crystal97-7 opened 2 years ago

Crystal97-7 commented 2 years ago

Thank you for your work. I followed your instructment to install Intensity_Ratio_Nuclei_Cytoplasm.ijm, and saved it under macros/toolsets. But when I chose the tool, the buttons of "C", "N", "B" did not show, so I can not continue the analysis...

volker-baecker commented 2 years ago

Hi @Crystal97-7, the drag and drop does not always work. Please download the Intensity_Ratio_Nuclei_Cytoplasm.ijm file and put it into the macros/toolsets folder. I changed the instructions accordingly. Did you also select the toolset from the >> button? Only after that will the "c", "s" and "b" buttons appear. Best, Volker

Crystal97-7 commented 2 years ago

Hi Volker, Thanks a lot! I can see the "c", "s" and "b" buttons now. But after I opened an image and pressed the "c" button, an error occurred, " LUTs cannot be assiged to RGB image. in line 298 (called from line 42)”. Best, Crystal

On May 21, 2022, at 10:54 PM, Volker @.***> wrote:

 Hi @Crystal97-7, the drag and drop does not always work. Please download the Intensity_Ratio_Nuclei_Cytoplasm.ijm file and put it into the macros/toolsets folder. I changed the instructions accordingly. Did you also select the toolset from the >> button? Only after that will the "c", "s" and "b" buttons appear. Best, Volker

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

volker-baecker commented 2 years ago

Hi @Crystal97-7, yes, it is not possible to use RGB images. This tool is for images from epifluorescence microscopy. As input images you need two greyscale images of two independent channels in the same folder. One with a staining of the nuclei (usually Hoechst or DAPI) and one for the staining of the cytoplasm (for example GFP, Rhodamine, ...). The names of both images must be the same except for the part naming the channel. You set the channel names in the dialog that opens by right-clicking on the s-button. Best, Volker

Crystal97-7 commented 2 years ago

Hi Volker, Thank you for your reply! As your instruction, I saved an image staining of the nuclei and an image staining of the cytoplasm in the same folder, but I could not make both images the same name. For example, the name of the image of nuclei was “dapi”, and the other was “dapi1”. It was going well to input the image of cytoplasm, but when I opened an image of nuclei and pressed the “s” button, a log window containing the message “skipped saturated image” appeared. Best, Crystal

On May 22, 2022, at 7:08 PM, Volker @.***> wrote:

yes, it is not possible to use RGB images. This tool is for images from epifluorescence microscopy. As input images you need two greyscale images of two independent channels in the same folder. One with a staining of the nuclei (usually Hoechst or DAPI) and one for the staining of the cytoplasm (for example GFP, Rhodamine, ...). The names of both images must be the same except for the part naming the channel. You set the channel names in the dialog that opens by right-clicking on the s-button.

volker-baecker commented 2 years ago

Hi @Crystal97-7, that means that too many pixels of the image are saturated, i.e. the intensity is above the maximal value that can be measured. Since it doesn't make sense to compare intensities in this case (the real intensities being unknown) the tool skips saturated images (a low percentage of saturated pixels is allowed though). You need to choose the gain and acquisition time, so that the intensities values do not go up and beyond the maximum. You should be able to see the saturation in the histogram of the image. Open the cytoplasm channel and press h. There should be a peak at the rightmost bin. This needs to be avoided. Best, Volker

Crystal97-7 commented 2 years ago

Hi Volker, The problems mentioned above were solved according to your instructions. Input the RGB images to image J and change the type to 8-bit, so that the images won’t be saturated. Is it ok to do this? The results of the analysis showed that % nuclei were too low and % cytoplasm too high, which was not consistent with eye observation. Whether the problem caused by that the intensity of nuclei was taken into account in the part of the cytoplasm? What to do if I would like to analyze the ratio of nuclei to cytoplasm of one cell or several specific cells in one image? Best, Crystal

volker-baecker commented 2 years ago

Hi Crystal, no it's not alright. You can not use an RGB image and separate the channels. You need greyscale images that have been independently acquired for each channel. Also depending on your ImageJ settings the conversion might modify the intensity values. You need take care during acquisition that no saturation happens.

If you want to measure the ratio for individual cells you need to segment the cytoplasm of the individual cells. That was difficult to do reliably before, however now with deep-learning it should be possible.

You could try to use cellpose or stardist. In this tool https://github.com/MontpellierRessourcesImagerie/imagej_macros_and_scripts/wiki/Measure_Nuclei_And_Membranes_Tool

we used cellpose and measured the intensity in the nucleus and the membrane. We could adapt it by skipping the step that turns the cytoplasm selection into a membrane selection. Best, Volker