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 />

// projection result Backup<br />

// PLU stack saved into ImagePlus object<br />

String fi<strong>le</strong>name = outputDir+out_image.getTit<strong>le</strong>()+"_("+ZProjector.METHODS[method]+<br />

"_projection).tif";<br />

new Fi<strong>le</strong>Saver(out_image).saveAsTiff(fi<strong>le</strong>name);<br />

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

}<br />

/*<br />

null);<br />

return out_image;<br />

Multiply each image channel by a mean of channel values<br />

*/<br />

public void createMask(ImagePlus PLUImg /* Stack des PLU moy<strong>en</strong>nees */) {<br />

// Checking<br />

if (PLUImg==null) {<br />

IJ.log("Unfortunately, image was null.");<br />

IJ.noImage(); return;<br />

}<br />

if ( (PLUImg.getType()!=ImagePlus.COLOR_RGB) || (PLUImg.getBitDepth()!=24) ) {<br />

IJ.showMessage("the plugin requires an RGB 24-bit image");<br />

return;<br />

}<br />

// Obtain an RGB image stack<br />

ImageStack is = PLUImg.getStack();<br />

pw.println("Entry createMask: "+is.getWidth()+"x"+is.getHeight()+"x"+is.getSize());<br />

// Splits an RGB image (or stack) into 3 8-bit graysca<strong>le</strong> images or stacks<br />

IJ.showStatus("Splits an RGB image into three 8-bit graysca<strong>le</strong> images");<br />

ImageStack rgbStack = splitStack(PLUImg);<br />

// rgbStack with 3 channels required<br />

if (rgbStack.getSize()!=3)<br />

{ IJ.error("Stack Required"); return; }<br />

String tit<strong>le</strong> = PLUImg.getTit<strong>le</strong>();<br />

pw.println("createMask PLUImg tit<strong>le</strong> = " + tit<strong>le</strong>);<br />

int slices = rgbStack.getSize(); // Returns the number of channels.<br />

pw.println("createMask Num. of slices "+ slices);<br />

DecimalFormat dec = new DecimalFormat("##0.0000");<br />

// Recuperer <strong>le</strong>s 3 slices correspondants aux canaux RGB<br />

// Iterate all slices (slices are 1

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

Saved successfully!

Ooh no, something went wrong!