Vous regardez une version antérieure (v. /pages/viewpage.action?pageId=208247408) de cette page.

afficher les différences afficher l'historique de la page

Vous regardez la version actuelle de cette page. (v. 1) afficher la version suivante »


Let's say you have many images taken the same way from two different samples: One Control group and One test group.


What will/should you do to analyse them?


The first thing I would do will be to open a random pair of image (one from the control and one from the test) and have a look at them...

Control                                                   Test


Then I would normalize the brightness and contrast for each channel and across images to make the display settings  the same for both images.

ImageJ Macro to Equalize Brightness and Contrast for all opened images
// This macro was created by nstifani@gmail.com
// Feel free to reach out for any question or improvement suggestions
// This macro will look for Min and Max values on all open images and then apply the Min and the Max to adjust the display brightness of all opened images.

// Create Arrays to store image info
ListOfCh=newArray(nImages);
ListOfSlices=newArray(nImages);
ListOfFrames=newArray(nImages);

// Get the dimensions of the opened Images
for(ImageI=1; ImageI<nImages+1; ImageI++){
selectImage(ImageI);
getDimensions(width, height, channels, slices, frames);
ListOfCh[ImageI-1]=channels;
ListOfSlices[ImageI-1]=slices;
ListOfFrames[ImageI-1]=frames;
}// end for ImageI


// Get some statistics
Array.getStatistics(ListOfCh, MinCh, MaxCh, MeanCh, StdDevCh);
Array.getStatistics(ListOfSlices, MinSlice, MaxSlice, MeanSlice, StdDevSlice);
Array.getStatistics(ListOfFrames, MinFrame, MaxFrame, MeanFrame, StdDevFrame);


// Process all chanels using two functions
for(ChI=1; ChI<MaxCh+1;ChI++){
MinAndMax=GetBnCValues(ChI);
MinMin=MinAndMax[0];
MaxMax=MinAndMax[1];
ApplyBnC(ChI,MinMin, MaxMax);
}


function GetBnCValues(ChI) {
ListOfMin=newArray(nImages);
ListOfMax=newArray(nImages);

// Measure Min and Max for all open images
for(ImageI=1; ImageI<nImages+1; ImageI++){
selectImage(ImageI);
Stack.setChannel(ChI);
getMinAndMax(min, max);
ListOfMin[ImageI-1]=min;
ListOfMax[ImageI-1]=max;
}// end for ImageI

// Get Statistics
Array.getStatistics(ListOfMin, MinMin, MaxMin, MeanMin, StdDevMin);
Array.getStatistics(ListOfMax, MinMax, MaxMax, MeanMax, StdDevMax);
return newArray(MinMin, MaxMax);
}

function ApplyBnC(ChI, MinMin, MaxMax) {
for(ImageI=1; ImageI<nImages+1; ImageI++){
selectImage(ImageI);
Stack.setChannel(ChI);
setMinAndMax(MinMin, MaxMax);
}// end for ImageI


Then I would look at each channel individually and use a LUT Fire to have better appreciate the intensities.


Macro Apply LUT Fire to all opened images
for(ImageI=1; ImageI<nImages+1; ImageI++){
selectImage(ImageI);
getDimensions(width, height, channels, slices, frames);
for(ChI=1; ChI<channels+1;ChI++){
Stack.setChannel(ChI);
Property.set("CompositeProjection", "null");
Stack.setDisplayMode("color");
run("Fire");
}
}


Finally I will use the syncrhonize Windows features to navigate the two images at the same time

ImageJ>Windows>Synchronize Windows

ou dans une macro

run("Synchronize Windows");



                           Control  Ch1                                         Test Ch1                        

                           Control  Ch2                                         Test Ch2                        


To my eyes the Ch1 and Ch2 are slighly brighter in the Test conditions.

Here we can't compare Ch1 to Ch2 because the range of display are not the same. It seems than Ch2 is much weaker than Ch1 but it is actually not accurate. The best way to sort this is to add a calibration bar to each channel ImageJ>Tools>Calibration Bar. The calibration bar is non-destructive as it will be added to the overlay. To "print" it on the image you can flatten it on the image ImageJ>Image>Overlay>Flatten.

                               Control  Ch1                                         Control Ch2       


If you apply the same display to Ch1 and Ch2 then you can see that Ch1 overall more intense while Ch2 has few very strong spots.

                         Control  Ch1                       Control Ch2 with same display than Ch1



Looking more closely

In Ch1 we can see that there is some low level intensity and a high level circular foci whereas in Ch2 there is a bean shaped structure.



                 Control Ch1                          Control Ch2









  • Aucune étiquette