Task 1 Grayscale to RGB pipeline 1 Grayscale
Task 1: Grayscale to RGB pipeline
1 -Grayscale to RGB pipeline • Goal of this part: Assemble single channel TIFF original 16 -bit images into three color, low information, merged PNG images for visualization, presentations, website, illustration… Let’s start
1 -Grayscale to RGB pipeline • Open Cell. Profiler • Save project as… • Drag and drop the input images in the “Images” module • Go to the “Names. And. Types” module, set the parameters so that images containing ch 1, ch 2 and ch 3 will be called blue, green and red, respectively. Click the update button, a list should appear as in the picture: • Note: you can make the rules for ch 1 and ”duplicate this image” to make copies, then you can modify the copies for ch 2 and ch 3 • Note: be careful with scrolling with the mouse, you may change this kind of settings without noticing
1 -Grayscale to RGB pipeline • Be careful with scrolling with the mouse, you may change this kind of settings without noticing • Cell. Profiler is case sensitive: try to be consistent with your namings (either always capital letter or small letters)
1 -Grayscale to RGB pipeline • Add modules by clicking the “+” button • Find the Gray. To. Color and Save. Images modules and add them to the pipeline (check the order) • When they are added, the software will show that you need to set the parameters with the red cross
1 -Grayscale to RGB pipeline • Go to the “Gray. To. Color” module. • Indicate the type of colored image you want to create (here RGB) • Select in the selection list what image should be placed in the red, green and blue channels. Note: the selection list shows the tags given in the Names. And. Types module Here, we decided in “Names. And. Types” that ch 1 containing files would be called “blue”, but we could have called them dapi, phalloidin, etc… You can try to change the names by yourself.
1 -Grayscale to RGB pipeline • The red cross becomes a green check when you have filled in required parameters for the module to be functional (this does not tell if your settings are good/correct, in particular for more complex modules) • You can also give a name to the output new image. Here: Merged
1 -Grayscale to RGB pipeline • Go to the “Save. Images” module. • Indicate which image you want to save (here Merged) • Indicate how filenames of the images are constructed • Indicate which format. Here low quality png • Indicate where to save them
Now you can save the pipeline, decide if you want to leave the “eyes” open (to see the results), and try to run it (click analyze images). If everything is right, it should run through and save the merged images where you specified.
1 -Grayscale to RGB pipeline • Open one of the merged images in Image. J, it appears black. • By stretching the histogram you will be able to see the cells as on the right (check the next slide if you are not familiar with Fiji/Image. J) • Result: a very low-quality image • This is because we used 16 -bit TIFF images to produce an 8 -bit PNG the software keeps the same histogram but instead of 65 k grey values in each channel, there is only 256. This compresses the histogram badly. We need to improve the pipeline in order to stretch the histogram before making the low-quality image
Image. J/Fiji – how to “stretch” the histogram • Open Image. J, open an image • Open the brightness and contrast tool (under Image, Adjust) • Move the maximum slider toward the left to change the pixel intensity that is shown as white (=set a new maximal intensity for the display)
1 -Grayscale to RGB pipeline • Save the pipeline with a new name (add good at the end for example) • Add 3 times the module “Rescale. Intensity” to the pipeline (move them before the “Gray. To. Color” module) • We need to set these parameters for each channels: • Choose the image you want to rescale, give a new name • Choose how you want to rescale it, here “specific values to full intensity” It means that we will indicate the value that we want to set as 0 (black pixel) and the value that we want to set as 1 (white pixel). The histogram will be stretched accordingly. Note: it may be surprising to use fixed values for the rescaling, but this allows a visual comparison between pictures, and avoids problems with image artefacts such as dusts.
1 -Grayscale to RGB pipeline • Define the values for blue and green as well (in the 3 individual modules! One per channel) • For blue: 0. 001 – 0. 025 • For green: 0. 001 – 0. 03 • For Red: 0. 001 – 0. 015 This means we assume that all pixels that have information (FOR VISUALISATION purposes only) have an intensity comprised in the range 0. 0010. 015 for the red channel (the maximal intensity is 1, so the chosen range represents 0. 1 -1. 5% of the histogram in the original 16 -bit images having 65536 gray values Note: the values depends on the staining intensity, exposure time, etc. This needs to be checked for every image set (even replicates of the same experiment). You can also see if other rescaling method suits you
1 -Grayscale to RGB pipeline r. . o s r e r g r e n p i t d set m n o a c l e ram a i s r e t y ze th stog • For blue: 0. 001 – 0. 025 b d imi i e h n i • For green: 0. 001 – 0. 03 pt much ef o d o e t r l w a • For Red: 0. 001 – 0. 015 u o s f h e use f u l o a a v s. This means we assume that allepixels e i e d d e i h od e an need that have information (FOR T m st an giv VISUALISATION purposes only)tehave n e a intensity comprised in the range 0. 001 h c T ji i f 0. 015 for the red channel (the maximal n i m range intensity is 1, so the chosen a r g the histogram in o t represents 0. 1 -1. 5% of s i h e the originalh 16 -bit images having 65536 T is n ssio • Define the values for blue and green as well (in the 3 individual modules! One per channel) gray values Note: the values depends on the staining intensity, exposure time, etc. This needs to be checked for every image set (even replicates of the same experiment). You can also see if other rescaling method suits you
1 -Grayscale to RGB pipeline • Change the images that should be merged to the rescaled ones • In “Save. Images” module, change the place where to save the good files (for example in folder “Grayscale to RGB output good” • Save the pipeline and run it
1 -Grayscale to RGB pipeline • New outcome: Now, you should get this kind of image which is looking fine without touching the histogram. Note that this is a low information (8 -bit) image that should not be used for proper analysis, just for quality control, presentations, web…. we may have cut some values by setting the thresholds manually
Task 1 is complete! Good job. Continue with the “general course presentation part 2”
- Slides: 17