Commit a2bb2aeb authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

Embryo focusing using mean intensity value rather then CV

parent bed48c29
......@@ -137,7 +137,7 @@ public class Job_FocusEmbryoAuto extends Job_Default{
for (int sliceIndex=1; sliceIndex<=nSlices; sliceIndex++){
currentProcessor=imStack.getProcessor(sliceIndex);
currentStatistics=currentProcessor.getStatistics();
focusValues[sliceIndex-1]=currentValue=currentStatistics.stdDev/currentStatistics.mean;//currentStatistics.mean;
focusValues[sliceIndex-1]=currentValue=currentStatistics.mean;//currentStatistics.stdDev/currentStatistics.mean;
if(currentValue>maxValue){
maxValue=currentValue;
maxSliceIndex=sliceIndex;
......
......@@ -97,7 +97,7 @@ public class Job_FocusEmbryoAutoDataset extends Job_Default{
//ImageWindow.setNextLocation(initialLocationX,initialLocationY);
//img=new Duplicator().run(img, 3, 4, 1, img.getNSlices(), 1, 1);
this.showDebug(img, "Original Image", false);
//new WaitForUserDialog ("Select Shift Point").show();
......@@ -135,7 +135,7 @@ public class Job_FocusEmbryoAutoDataset extends Job_Default{
for (int sliceIndex=1; sliceIndex<=nSlices; sliceIndex++){
currentProcessor=imStack.getProcessor(sliceIndex);
currentStatistics=currentProcessor.getStatistics();
focusValues[sliceIndex-1]=currentValue=currentStatistics.stdDev/currentStatistics.mean;//currentStatistics.mean;
focusValues[sliceIndex-1]=currentValue=currentStatistics.mean;//currentStatistics.stdDev/currentStatistics.mean;//
if(currentValue>maxValue){
maxValue=currentValue;
maxSliceIndex=sliceIndex;
......@@ -225,8 +225,8 @@ public class Job_FocusEmbryoAutoDataset extends Job_Default{
// start ImageJ
new ImageJ();
String tblPth="C:/tempDat/AutoFRAP_test";
String tblFnm="summary_TEST14_.txt";
String tblPth="C:\\tempDat\\Crocker-lab\\Test_protocol_update_20181109";
String tblFnm="summary_test8_m.txt";
Job_FocusEmbryoAutoDataset testJob=new Job_FocusEmbryoAutoDataset();
testJob.initialise(null, "Focus.Image", false);
testJob.testJobMicTable(0, tblPth, tblFnm);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment