Posted by
sdegan on
Nov 12, 2020; 4:13pm
URL: http://imagej.273.s1.nabble.com/Problem-with-thresholding-tp5024162p5024168.html
Hi,
This is not a stack. It is an immunofluorescence photomicrograph.
What is very, very weird and never happened in the past, is that I am having
the threshold values the same for all samples after sampling the cells with
the antibody staining using the sample tool in "color threshold".
Previously I was sampling the stained area of interested and the area was
coming up as a value of the actual staining for each image. What is even
more weird is that, if I run an image without the macro, but following the
same steps manually I had different -I believe the real- value of the area
picked up by the threshold.
Here is the macro I used:
// Color Thresholder 1.53f
// Autogenerated macro, single images only!
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
run("HSB Stack");
run("Convert Stack to Images");
selectWindow("Hue");
rename("0");
selectWindow("Saturation");
rename("1");
selectWindow("Brightness");
rename("2");
min[0]=0;
max[0]=255;
filter[0]="pass";
min[1]=0;
max[1]=250;
filter[1]="pass";
min[2]=134;
max[2]=255;
filter[2]="pass";
for (i=0;i<3;i++){
selectWindow(""+i);
setThreshold(min[i], max[i]);
run("Convert to Mask");
if (filter[i]=="stop") run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
selectWindow(""+i);
close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding-------------
run("Set Scale...", "distance=340 known=200 unit=um");
run("Measure");
<
http://imagej.1557.x6.nabble.com/file/t187616/Screen_Shot_2020-11-10_at_8.png>
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html