09.08.2013 Views

Analyse avec le logiciel imagej d'un lot d'images en microscopie par ...

Analyse avec le logiciel imagej d'un lot d'images en microscopie par ...

Analyse avec le logiciel imagej d'un lot d'images en microscopie par ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C:\Docum<strong>en</strong>ts and Settings\montarou\Bureau\correction\chandez\PLU_RGB_Avg_v3_.java jeudi 22 juil<strong>le</strong>t 2010 16:22<br />

in2p3-00530281, version 1 - 28 Oct 2010<br />

}<br />

//sci<strong>en</strong>ceBlueChannel.show();<br />

fi<strong>le</strong>Name = outputDir+"splitter "+sci<strong>en</strong>ceBlueChannel.getTit<strong>le</strong>()+".tif";<br />

new Fi<strong>le</strong>Saver(sci<strong>en</strong>ceBlueChannel).saveAsTiff(fi<strong>le</strong>Name);<br />

// For each channel, multiply sci<strong>en</strong>ce image by PLU/mean<br />

// Creates 3 "Corrected_" RGB images<br />

ImagePlus correctedRedChannel = doCorrection(sci<strong>en</strong>ceRedChannel, rgbPLUmask[0]);<br />

ImagePlus correctedGre<strong>en</strong>Channel = doCorrection(sci<strong>en</strong>ceGre<strong>en</strong>Channel, rgbPLUmask[1]);<br />

ImagePlus correctedBlueChannel = doCorrection(sci<strong>en</strong>ceBlueChannel, rgbPLUmask[2]);<br />

if (debug==1) {<br />

String fi<strong>le</strong>Name = null;<br />

}<br />

/*<br />

//correctedRedChannel.show();<br />

fi<strong>le</strong>Name = outputDir+correctedRedChannel.getTit<strong>le</strong>()+".tif";<br />

new Fi<strong>le</strong>Saver(correctedRedChannel).saveAsTiff(fi<strong>le</strong>Name);<br />

//correctedGre<strong>en</strong>Channel.show();<br />

fi<strong>le</strong>Name = outputDir+correctedGre<strong>en</strong>Channel.getTit<strong>le</strong>()+".tif";<br />

new Fi<strong>le</strong>Saver(correctedGre<strong>en</strong>Channel).saveAsTiff(fi<strong>le</strong>Name);<br />

//correctedBlueChannel.show();<br />

fi<strong>le</strong>Name = outputDir+correctedBlueChannel.getTit<strong>le</strong>()+".tif";<br />

new Fi<strong>le</strong>Saver(correctedBlueChannel).saveAsTiff(fi<strong>le</strong>Name);<br />

Lors de la conversion <strong>d'images</strong> 16-bit (<strong>en</strong>tier) ou 32-bit (réel) <strong>en</strong> image cou<strong>le</strong>ur,<br />

il y a toujours une perte d'information, puisque chaque canal <strong>d'images</strong> <strong>en</strong> cou<strong>le</strong>urs<br />

ne conti<strong>en</strong>t que 8 bits d'information (va<strong>le</strong>urs <strong>en</strong>tre 0 et 255) .<br />

Cette information est perdue et ne peut pas être récupérés <strong>en</strong> utilisant la cou<strong>le</strong>ur,<br />

<strong>le</strong> contraste, ou la luminosité.<br />

Malheureusem<strong>en</strong>t, c'est exactem<strong>en</strong>t la façon standard de produire des images <strong>en</strong> cou<strong>le</strong>ur<br />

à <strong>par</strong>tir <strong>d'images</strong> <strong>en</strong> niveaux de gris dans ImageJ, donc si des images <strong>avec</strong> plus<br />

de dynamique sont utilisées, el<strong>le</strong>s doiv<strong>en</strong>t toujours être dégradé <strong>en</strong> 8-bits avant<br />

d'être convertie <strong>en</strong> cou<strong>le</strong>urs RVB.<br />

*/<br />

// Do Stack conversions<br />

//---------------------<br />

// ImageProcessor convertion to 8-bit graysca<strong>le</strong><br />

// Construction <strong>d'un</strong>e stack <strong>d'images</strong> <strong>avec</strong> des va<strong>le</strong>urs réel<strong>le</strong>s<br />

ImageStack stack = new ImageStack(width, height); // former la stack a convertir <strong>en</strong> RGB<br />

stack.addSlice("red", correctedRedChannel.getProcessor());<br />

stack.addSlice("gre<strong>en</strong>", correctedGre<strong>en</strong>Channel.getProcessor());<br />

stack.addSlice("blue", correctedBlueChannel.getProcessor());<br />

// Constructs an ImagePlus from a stack.<br />

tit<strong>le</strong> = "ImageStack 32-bit (avant conversion)";<br />

ImagePlus imp_corrected = new ImagePlus(tit<strong>le</strong>, stack);<br />

if (debug==1) {<br />

String fi<strong>le</strong>Name = outputDir+imp_corrected.getTit<strong>le</strong>()+".tif";<br />

new Fi<strong>le</strong>Saver(imp_corrected).saveAsTiffStack(fi<strong>le</strong>Name);<br />

}<br />

/* 1. Quand la variab<strong>le</strong> doScaling == false:<br />

Tous <strong>le</strong>s pixels <strong>en</strong> dessous de la va<strong>le</strong>ur de certains niveaux de gris sont mises à 0<br />

et tous ceux qui figur<strong>en</strong>t au dessus de la va<strong>le</strong>ur maxima<strong>le</strong> (pour <strong>le</strong>s images 8-bit)<br />

-12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!