Commit b85bcc55 authored by lombardo's avatar lombardo

Force the black background option in Process>Binary>Options to be unchecked

parent 3817cfed
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
<developers> <developers>
<developer> <developer>
<id>developer_id</id>
<name> Benoit </name> <name> Benoit </name>
<email>ipf(A_T)mpi-cbg.de</email> <email>ipf(A_T)mpi-cbg.de</email>
<organization>MPI-CBG</organization> <organization>MPI-CBG</organization>
......
...@@ -53,10 +53,10 @@ public class Celegans_beads_analysis implements PlugIn { ...@@ -53,10 +53,10 @@ public class Celegans_beads_analysis implements PlugIn {
GenericDialog gd = new GenericDialog("Process pixels"); GenericDialog gd = new GenericDialog("Process pixels");
gd.addNumericField("transmission channel",2, 0); gd.addNumericField("transmission channel",2, 0);
gd.addNumericField("bid channel", 1, 0); gd.addNumericField("beads channel", 1, 0);
gd.addNumericField("minimal mask area", 5000, 0); gd.addNumericField("minimal mask area", 5000, 0);
gd.addCheckbox("use a manual threshold", false); gd.addCheckbox("use a manual threshold", false);
gd.addNumericField("manual bid threshold", 200, 0); gd.addNumericField("manual beads threshold", 200, 0);
gd.showDialog(); gd.showDialog();
if (gd.wasCanceled()) if (gd.wasCanceled())
...@@ -74,7 +74,9 @@ public class Celegans_beads_analysis implements PlugIn { ...@@ -74,7 +74,9 @@ public class Celegans_beads_analysis implements PlugIn {
public void process(ImagePlus imp_orig){ public void process(ImagePlus imp_orig){
IJ.run(null, "Options...", "iterations=1 count=1"); //makes sure that the black background option is not check (the "create selection" command depends on it)
ImageStack stack = imp_orig.getImageStack(); ImageStack stack = imp_orig.getImageStack();
int Zslice = 1; int Zslice = 1;
for( int frame=1; frame<=imp_orig.getNFrames(); frame++){ for( int frame=1; frame<=imp_orig.getNFrames(); frame++){
...@@ -120,7 +122,7 @@ public class Celegans_beads_analysis implements PlugIn { ...@@ -120,7 +122,7 @@ public class Celegans_beads_analysis implements PlugIn {
// extract the bid image for the original image // extract the bid image for the original image
int stackIdx_bid = imp_orig.getStackIndex(ch_bid,Zslice,frame); // channel, slice, frame; int stackIdx_bid = imp_orig.getStackIndex(ch_bid,Zslice,frame); // channel, slice, frame;
ImageProcessor ip_bid = stack.getProcessor(stackIdx_bid); ImageProcessor ip_bid = stack.getProcessor(stackIdx_bid);
ImagePlus imp_bid = new ImagePlus("bid image", ip_bid.duplicate() ); ImagePlus imp_bid = new ImagePlus("beads image", ip_bid.duplicate() );
// filter bid image // filter bid image
...@@ -139,7 +141,7 @@ public class Celegans_beads_analysis implements PlugIn { ...@@ -139,7 +141,7 @@ public class Celegans_beads_analysis implements PlugIn {
// create a selection of the mask to make measure on the original bid image // create a selection of the mask to make measure on the original bid image
IJ.run(imp_bidMask, "Create Selection", ""); IJ.run(imp_bidMask, "Create Selection", "");
imp_bid = new ImagePlus("bid image", ip_bid.duplicate() ); imp_bid = new ImagePlus("beads image", ip_bid.duplicate() );
imp_bid.setRoi(imp_bidMask.getRoi()); // apply the bid selection to the bid image imp_bid.setRoi(imp_bidMask.getRoi()); // apply the bid selection to the bid image
IJ.run("Set Measurements...","area mean redirect=None decimal=3"); IJ.run("Set Measurements...","area mean redirect=None decimal=3");
IJ.run(imp_bid, "Measure", ""); IJ.run(imp_bid, "Measure", "");
......
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