Hello!
I developed a macro to count the number of cells positives for a given antibody. The cells are selected depending on size, circularity and intensity. I found an intensity value good for some images and I run the macro. After that I found that the choosen threshold is too high for one image, so that to have a reliable valuation for that image I should use half of the threshold chosen for the other images, but this latter threshold is really too low for the other images and it gives a wrong result. I can't understand why this image is so different because the intensity of the cells is not so different by eyes (it's a good quality image, the ab signal is strong and there are no shadows). I was wondering if I did some mistake during the "editing": I had to cut the images (I'm interested only in a small area of them) and save them in a tiff format. Is it possible that this editing chenged the intensity values? Thank you for your help!!!! Leila -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Leila,
Are you sure ImageJ isn't autoscaling your display differently across your images? What does the pixel probe say? Mouse over your data and look at the raw numbers spit out in the main ImageJ window's status bar. Also, can you use an auto-threshold algorithm across all your images to make your analysis reproducible without needing to hardcode a specific threshold value? Regards, Curtis On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh <[hidden email]> wrote: > Hello! > > I developed a macro to count the number of cells positives for a given > antibody. The cells are selected depending on size, circularity and > intensity. I found an intensity value good for some images and I run the > macro. After that I found that the choosen threshold is too high for one > image, so that to have a reliable valuation for that image I should use > half of the threshold chosen for the other images, but this latter > threshold is really too low for the other images and it gives a wrong > result. I can't understand why this image is so different because the > intensity of the cells is not so different by eyes (it's a good quality > image, the ab signal is strong and there are no shadows). I was wondering > if I did some mistake during the "editing": I had to cut the images (I'm > interested only in a small area of them) and save them in a tiff format. Is > it possible that this editing chenged the intensity values? > Thank you for your help!!!! > > Leila > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Curtis!!!
Thank you for the reply! I tried to set the threshold without the macro, to see how reliable it is. There is a huge difference in intensity across the images...I really can't choose a good threshold for all of them. What do you mean with the auto-threshold algorithm? 2013/10/8 Curtis Rueden <[hidden email]> > Hi Leila, > > Are you sure ImageJ isn't autoscaling your display differently across your > images? > > What does the pixel probe say? Mouse over your data and look at the raw > numbers spit out in the main ImageJ window's status bar. > > Also, can you use an auto-threshold algorithm across all your images to > make your analysis reproducible without needing to hardcode a specific > threshold value? > > Regards, > Curtis > > > On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh <[hidden email]> wrote: > > > Hello! > > > > I developed a macro to count the number of cells positives for a given > > antibody. The cells are selected depending on size, circularity and > > intensity. I found an intensity value good for some images and I run the > > macro. After that I found that the choosen threshold is too high for one > > image, so that to have a reliable valuation for that image I should use > > half of the threshold chosen for the other images, but this latter > > threshold is really too low for the other images and it gives a wrong > > result. I can't understand why this image is so different because the > > intensity of the cells is not so different by eyes (it's a good quality > > image, the ab signal is strong and there are no shadows). I was wondering > > if I did some mistake during the "editing": I had to cut the images (I'm > > interested only in a small area of them) and save them in a tiff format. > Is > > it possible that this editing chenged the intensity values? > > Thank you for your help!!!! > > > > Leila > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Leila,
> What do you mean with the auto-threshold algorithm? An auto-thresholding algorithm chooses a (hopefully) appropriate threshold by analyzing the histogram of your data and guessing at a good cutoff point. See the docs at: http://imagej.net/docs/guide/146-28.html#toc-Subsubsection-28.2.4 You can also use Fiji's "Image > Adjust > Auto Threshold" plugin with method of "Try all" to create a mosaic of the mask produced by each auto-thresholding algorithm, which makes the results very easy to compare quickly. Regards, Curtis On Wed, Oct 9, 2013 at 5:02 AM, Leila Alieh <[hidden email]> wrote: > Hi Curtis!!! > Thank you for the reply! > I tried to set the threshold without the macro, to see how reliable it is. > There is a huge difference in intensity across the images...I really can't > choose a good threshold for all of them. What do you mean with the > auto-threshold algorithm? > > > 2013/10/8 Curtis Rueden <[hidden email]> > > > Hi Leila, > > > > Are you sure ImageJ isn't autoscaling your display differently across > your > > images? > > > > What does the pixel probe say? Mouse over your data and look at the raw > > numbers spit out in the main ImageJ window's status bar. > > > > Also, can you use an auto-threshold algorithm across all your images to > > make your analysis reproducible without needing to hardcode a specific > > threshold value? > > > > Regards, > > Curtis > > > > > > On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh <[hidden email]> > wrote: > > > > > Hello! > > > > > > I developed a macro to count the number of cells positives for a given > > > antibody. The cells are selected depending on size, circularity and > > > intensity. I found an intensity value good for some images and I run > the > > > macro. After that I found that the choosen threshold is too high for > one > > > image, so that to have a reliable valuation for that image I should use > > > half of the threshold chosen for the other images, but this latter > > > threshold is really too low for the other images and it gives a wrong > > > result. I can't understand why this image is so different because the > > > intensity of the cells is not so different by eyes (it's a good quality > > > image, the ab signal is strong and there are no shadows). I was > wondering > > > if I did some mistake during the "editing": I had to cut the images > (I'm > > > interested only in a small area of them) and save them in a tiff > format. > > Is > > > it possible that this editing chenged the intensity values? > > > Thank you for your help!!!! > > > > > > Leila > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
I am getting the attached error when I try to update Fiji. I am an admin on
this windows 7 65 bit machine and have verified the permission of the directory. Any ideas? thanks Rich Richard Cole Research Scientist V Director: Advanced Light Microscopy & Image Analysis Core Wadsworth Center Research Assistant Professor Dept. of Biomedical Sciences School of Public Health State University of New York P.O. Box 509 Albany N.Y. 12201-0509 518-474-7048 Phone 518-474-4430 Fax Email [hidden email] Website www.wadsworth.org/cores/alm/index.htm -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html Untitled.jpg (33K) Download Attachment |
Hi Richard,
> I am getting the attached error when I try to update Fiji. I am an > admin on this windows 7 65 bit machine and have verified the > permission of the directory. Any ideas? Do what the error message suggests: move your Fiji.app folder somewhere else where you have full read/write permission (even Windows 7 "admins" do not have full unimpeded read/write all the time to "Program Files"). Personally I like C:\Users\jdoe\Applications\Fiji.app where "jdoe" is your user name. Regards, Curtis On Wed, Oct 9, 2013 at 9:50 AM, Richard Cole <[hidden email]> wrote: > I am getting the attached error when I try to update Fiji. I am an admin > on > this windows 7 65 bit machine and have verified the permission of the > directory. Any ideas? > > thanks > > Rich > > > > Richard Cole > Research Scientist V > Director: Advanced Light Microscopy & Image Analysis Core > Wadsworth Center > > Research Assistant Professor > Dept. of Biomedical Sciences > School of Public Health State University of New York > > P.O. Box 509 Albany N.Y. 12201-0509 > 518-474-7048 Phone > 518-474-4430 Fax > > Email [hidden email] > Website www.wadsworth.org/cores/alm/index.htm > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by ctrueden
Hello Curtis,
thank you very much for your help! I studied the link you suggested me but I still have some problem. When I run the Auto Threshold I get an image with colour satured particles (the cells I'm interested in) on a black background (or on the original image in the montage when I run the "Try all" option), I don't get a black on white mask as I was used to. But the main thing is that when I select a specific method and then I select "Analyze particles" and I choose and appropriate size range I get an error message: "No particles were detected. The assumed thredhold (0-0) may not be correct" If I don't choose the size range it counts something near the image borders but not he selected particles (I checked with the outlines). I tried also to select the algorithm in normal Threshold. In this case it works, I get the mask and it measures the selected particles, but the thresold value is different than the one obtained with the same algorithm in the Auto Threshold method, is it normal? Once I have chosen the algorithm can I include it in the macro and run it automatically? How should I do? Then I will also need to measure the entire area of my cut images. Does someone already developed a macro for this? if not do you have any suggestion? Thank you very much!!! 2013/10/12 Leila Alieh <[hidden email]> > Hello Curtis, > > thank you very much for your help! > I studied the link you suggested me but I still have some problem. When I > run the Auto Threshold I get an image with colour satured particles (the > cells I'm interested in) on a black background (or on the original image in > the montage when I run the "Try all" option), I don't get a black on white > mask as I was used to. > But the main thing is that when I select a specific method and then I > select "Analyze particles" and I choose and appropriate size range I get an > error message: > > "No particles were detected. The assumed thredhold (0-0) may not be > correct" > > If I don't choose the size range it counts something near the image > borders but not he selected particles (I checked with the outlines). > I tried also to select the algorithm in normal Threshold. In this case it > works, I get the mask and it measures the selected particles, but the > thresold value is different than the one obtained with the same algorithm > in the Auto Threshold method, is it normal? > Once I have chosen the algorithm can I include it in the macro and run it > automatically? How should I do? > Here the macro I'm using: > > origen = getDirectory("Images to process"); > lista = getFileList(origen); > u0 = getNumber("threshold", u0); > setBatchMode(true); > for (i=0; i<lista.length; i++) { > showProgress(i+1, lista.length); > open(origen+lista[i]); > nombre = lista[i]; > run("Split Channels"); > run("Duplicate...", "title=[]"); > run("Subtract Background...", "rolling=50"); > run("Gaussian Blur...", "sigma=1"); > setAutoThreshold("Default"); > //run("Threshold..."); > setAutoThreshold("Default"); > setThreshold(u0, 65535); > run("Convert to Mask"); > run("Close-"); > run("Fill Holes"); > id = getImageID(); > selectImage(id+1); > sourceTitle = getTitle(); > selectImage(id); > run("Set Measurements...", "area mean min display redirect=["+ > sourceTitle+ "] decimal=3"); > run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 > show=Outlines display"); > selectImage(id+2); > sourceTitle = getTitle(); > selectImage(id); > run("Set Measurements...", "area mean min display redirect=["+ > sourceTitle+ "] decimal=3"); > run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 > show=Outlines display include"); > } > > > Then I will also need to measure the entire area of my modified images. > Does someone already developed a macro for this? if not do you have any > suggestion? > > Thank you very much!!! > > > 2013/10/9 Curtis Rueden <[hidden email]> > >> Hi Leila, >> >> > What do you mean with the auto-threshold algorithm? >> >> An auto-thresholding algorithm chooses a (hopefully) appropriate threshold >> by analyzing the histogram of your data and guessing at a good cutoff >> point. >> >> See the docs at: >> http://imagej.net/docs/guide/146-28.html#toc-Subsubsection-28.2.4 >> >> You can also use Fiji's "Image > Adjust > Auto Threshold" plugin with >> method of "Try all" to create a mosaic of the mask produced by each >> auto-thresholding algorithm, which makes the results very easy to compare >> quickly. >> >> Regards, >> Curtis >> >> >> On Wed, Oct 9, 2013 at 5:02 AM, Leila Alieh <[hidden email]> >> wrote: >> >> > Hi Curtis!!! >> > Thank you for the reply! >> > I tried to set the threshold without the macro, to see how reliable it >> is. >> > There is a huge difference in intensity across the images...I really >> can't >> > choose a good threshold for all of them. What do you mean with the >> > auto-threshold algorithm? >> > >> > >> > 2013/10/8 Curtis Rueden <[hidden email]> >> > >> > > Hi Leila, >> > > >> > > Are you sure ImageJ isn't autoscaling your display differently across >> > your >> > > images? >> > > >> > > What does the pixel probe say? Mouse over your data and look at the >> raw >> > > numbers spit out in the main ImageJ window's status bar. >> > > >> > > Also, can you use an auto-threshold algorithm across all your images >> to >> > > make your analysis reproducible without needing to hardcode a specific >> > > threshold value? >> > > >> > > Regards, >> > > Curtis >> > > >> > > >> > > On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh <[hidden email]> >> > wrote: >> > > >> > > > Hello! >> > > > >> > > > I developed a macro to count the number of cells positives for a >> given >> > > > antibody. The cells are selected depending on size, circularity and >> > > > intensity. I found an intensity value good for some images and I run >> > the >> > > > macro. After that I found that the choosen threshold is too high for >> > one >> > > > image, so that to have a reliable valuation for that image I should >> use >> > > > half of the threshold chosen for the other images, but this latter >> > > > threshold is really too low for the other images and it gives a >> wrong >> > > > result. I can't understand why this image is so different because >> the >> > > > intensity of the cells is not so different by eyes (it's a good >> quality >> > > > image, the ab signal is strong and there are no shadows). I was >> > wondering >> > > > if I did some mistake during the "editing": I had to cut the images >> > (I'm >> > > > interested only in a small area of them) and save them in a tiff >> > format. >> > > Is >> > > > it possible that this editing chenged the intensity values? >> > > > Thank you for your help!!!! >> > > > >> > > > Leila >> > > > >> > > > -- >> > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > > >> > > >> > > -- >> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > >> > >> > -- >> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Leila,
Try something like this, and remove all the other 'setThreshold', runThreshold, and setAutothreshold lines. setAutoThreshold("Huang"); // or other method run("Convert to Mask"); // display white 0 on black 255 //run("Threshold..."); //setAutoThreshold("Default"); //setThreshold(u0, 65535); You may need to try setAutoThreshold("Huang dark"); or add run("Invert"); depending on your images. At the end of your macro, do you get what you need with just two lines? Areas of each particle. // id = getImageID(); // selectImage(id+1); sourceTitle = getTitle(); // selectImage(id); run("Set Measurements...", "area mean min display decimal=3"); // run("Set Measurements...", "area mean min display redirect=["+sourceTitle+ "] decimal=3"); run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 show=Outlines display"); // selectImage(id+2); // sourceTitle = getTitle(); // selectImage(id); // run("Set Measurements...", "area mean min display redirect=["+sourceTitle+ "] decimal=3"); // run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 show=Outlines display include"); Or if you want total area of all the particle masks run("Analyze Particles...", "size=90-350 circularity=0.00-1.00 show=Masks display"); run("Measure"); Charles -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Leila Alieh Sent: Saturday, October 12, 2013 4:28 AM To: [hidden email] Subject: Re: Threshold problems Hello Curtis, thank you very much for your help! I studied the link you suggested me but I still have some problem. When I run the Auto Threshold I get an image with colour satured particles (the cells I'm interested in) on a black background (or on the original image in the montage when I run the "Try all" option), I don't get a black on white mask as I was used to. But the main thing is that when I select a specific method and then I select "Analyze particles" and I choose and appropriate size range I get an error message: "No particles were detected. The assumed thredhold (0-0) may not be correct" If I don't choose the size range it counts something near the image borders but not he selected particles (I checked with the outlines). I tried also to select the algorithm in normal Threshold. In this case it works, I get the mask and it measures the selected particles, but the thresold value is different than the one obtained with the same algorithm in the Auto Threshold method, is it normal? Once I have chosen the algorithm can I include it in the macro and run it automatically? How should I do? Then I will also need to measure the entire area of my cut images. Does someone already developed a macro for this? if not do you have any suggestion? Thank you very much!!! 2013/10/12 Leila Alieh <[hidden email]> > Hello Curtis, > > thank you very much for your help! > I studied the link you suggested me but I still have some problem. > When I run the Auto Threshold I get an image with colour satured > particles (the cells I'm interested in) on a black background (or on > the original image in the montage when I run the "Try all" option), I > don't get a black on white mask as I was used to. > But the main thing is that when I select a specific method and then I > select "Analyze particles" and I choose and appropriate size range I > get an error message: > > "No particles were detected. The assumed thredhold (0-0) may not be > correct" > > If I don't choose the size range it counts something near the image > borders but not he selected particles (I checked with the outlines). > I tried also to select the algorithm in normal Threshold. In this case > it works, I get the mask and it measures the selected particles, but > the thresold value is different than the one obtained with the same > algorithm in the Auto Threshold method, is it normal? > Once I have chosen the algorithm can I include it in the macro and run > it automatically? How should I do? > Here the macro I'm using: > > origen = getDirectory("Images to process"); lista = > getFileList(origen); > u0 = getNumber("threshold", u0); > setBatchMode(true); > for (i=0; i<lista.length; i++) { > showProgress(i+1, lista.length); > open(origen+lista[i]); > nombre = lista[i]; > run("Split Channels"); > run("Duplicate...", "title=[]"); > run("Subtract Background...", "rolling=50"); > run("Gaussian Blur...", "sigma=1"); > setAutoThreshold("Default"); > //run("Threshold..."); > setAutoThreshold("Default"); > setThreshold(u0, 65535); > run("Convert to Mask"); > run("Close-"); > run("Fill Holes"); > id = getImageID(); > selectImage(id+1); > sourceTitle = getTitle(); > selectImage(id); > run("Set Measurements...", "area mean min display redirect=["+ > sourceTitle+ "] decimal=3"); > run("Analyze Particles...", "size=90-350 pixel > circularity=0.00-1.00 show=Outlines display"); > selectImage(id+2); > sourceTitle = getTitle(); > selectImage(id); > run("Set Measurements...", "area mean min display redirect=["+ > sourceTitle+ "] decimal=3"); > run("Analyze Particles...", "size=90-350 pixel > circularity=0.00-1.00 show=Outlines display include"); > } > > > Then I will also need to measure the entire area of my modified images. > Does someone already developed a macro for this? if not do you have > any suggestion? > > Thank you very much!!! > > > 2013/10/9 Curtis Rueden <[hidden email]> > >> Hi Leila, >> >> > What do you mean with the auto-threshold algorithm? >> >> An auto-thresholding algorithm chooses a (hopefully) appropriate >> threshold by analyzing the histogram of your data and guessing at a >> good cutoff point. >> >> See the docs at: >> http://imagej.net/docs/guide/146-28.html#toc-Subsubsection-28.2.4 >> >> You can also use Fiji's "Image > Adjust > Auto Threshold" plugin with >> method of "Try all" to create a mosaic of the mask produced by each >> auto-thresholding algorithm, which makes the results very easy to >> compare quickly. >> >> Regards, >> Curtis >> >> >> On Wed, Oct 9, 2013 at 5:02 AM, Leila Alieh <[hidden email]> >> wrote: >> >> > Hi Curtis!!! >> > Thank you for the reply! >> > I tried to set the threshold without the macro, to see how reliable >> > it >> is. >> > There is a huge difference in intensity across the images...I >> > really >> can't >> > choose a good threshold for all of them. What do you mean with the >> > auto-threshold algorithm? >> > >> > >> > 2013/10/8 Curtis Rueden <[hidden email]> >> > >> > > Hi Leila, >> > > >> > > Are you sure ImageJ isn't autoscaling your display differently >> > > across >> > your >> > > images? >> > > >> > > What does the pixel probe say? Mouse over your data and look at >> > > the >> raw >> > > numbers spit out in the main ImageJ window's status bar. >> > > >> > > Also, can you use an auto-threshold algorithm across all your >> > > images >> to >> > > make your analysis reproducible without needing to hardcode a >> > > specific threshold value? >> > > >> > > Regards, >> > > Curtis >> > > >> > > >> > > On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh >> > > <[hidden email]> >> > wrote: >> > > >> > > > Hello! >> > > > >> > > > I developed a macro to count the number of cells positives for >> > > > a >> given >> > > > antibody. The cells are selected depending on size, circularity >> > > > and intensity. I found an intensity value good for some images >> > > > and I run >> > the >> > > > macro. After that I found that the choosen threshold is too >> > > > high for >> > one >> > > > image, so that to have a reliable valuation for that image I >> > > > should >> use >> > > > half of the threshold chosen for the other images, but this >> > > > latter threshold is really too low for the other images and it >> > > > gives a >> wrong >> > > > result. I can't understand why this image is so different >> > > > because >> the >> > > > intensity of the cells is not so different by eyes (it's a good >> quality >> > > > image, the ab signal is strong and there are no shadows). I was >> > wondering >> > > > if I did some mistake during the "editing": I had to cut the >> > > > images >> > (I'm >> > > > interested only in a small area of them) and save them in a >> > > > tiff >> > format. >> > > Is >> > > > it possible that this editing chenged the intensity values? >> > > > Thank you for your help!!!! >> > > > >> > > > Leila >> > > > >> > > > -- >> > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > > >> > > >> > > -- >> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > >> > >> > -- >> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you very much Charles!
2013/10/14 Anderson, Charles (DNR) <[hidden email]> > Leila, > > Try something like this, and remove all the other 'setThreshold', > runThreshold, and setAutothreshold lines. > setAutoThreshold("Huang"); // or other method > run("Convert to Mask"); // display white 0 on black 255 > //run("Threshold..."); > //setAutoThreshold("Default"); > //setThreshold(u0, 65535); > You may need to try setAutoThreshold("Huang dark"); or add run("Invert"); > depending on your images. > > At the end of your macro, do you get what you need with just two lines? > Areas of each particle. > // id = getImageID(); > // selectImage(id+1); > sourceTitle = getTitle(); > // selectImage(id); > run("Set Measurements...", "area mean min display decimal=3"); > // run("Set Measurements...", "area mean min display > redirect=["+sourceTitle+ "] decimal=3"); > run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 > show=Outlines display"); > // selectImage(id+2); > // sourceTitle = getTitle(); > // selectImage(id); > // run("Set Measurements...", "area mean min display > redirect=["+sourceTitle+ "] decimal=3"); > // run("Analyze Particles...", "size=90-350 pixel circularity=0.00-1.00 > show=Outlines display include"); > > Or if you want total area of all the particle masks > run("Analyze Particles...", "size=90-350 circularity=0.00-1.00 show=Masks > display"); > run("Measure"); > > Charles > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Leila Alieh > Sent: Saturday, October 12, 2013 4:28 AM > To: [hidden email] > Subject: Re: Threshold problems > > Hello Curtis, > > thank you very much for your help! > I studied the link you suggested me but I still have some problem. When I > run the Auto Threshold I get an image with colour satured particles (the > cells I'm interested in) on a black background (or on the original image in > the montage when I run the "Try all" option), I don't get a black on white > mask as I was used to. > But the main thing is that when I select a specific method and then I > select "Analyze particles" and I choose and appropriate size range I get an > error message: > > "No particles were detected. The assumed thredhold (0-0) may not be > correct" > > If I don't choose the size range it counts something near the image > borders but not he selected particles (I checked with the outlines). > I tried also to select the algorithm in normal Threshold. In this case it > works, I get the mask and it measures the selected particles, but the > thresold value is different than the one obtained with the same algorithm > in the Auto Threshold method, is it normal? > Once I have chosen the algorithm can I include it in the macro and run it > automatically? How should I do? > Then I will also need to measure the entire area of my cut images. Does > someone already developed a macro for this? if not do you have any > suggestion? > > Thank you very much!!! > > > > 2013/10/12 Leila Alieh <[hidden email]> > > > Hello Curtis, > > > > thank you very much for your help! > > I studied the link you suggested me but I still have some problem. > > When I run the Auto Threshold I get an image with colour satured > > particles (the cells I'm interested in) on a black background (or on > > the original image in the montage when I run the "Try all" option), I > > don't get a black on white mask as I was used to. > > But the main thing is that when I select a specific method and then I > > select "Analyze particles" and I choose and appropriate size range I > > get an error message: > > > > "No particles were detected. The assumed thredhold (0-0) may not be > > correct" > > > > If I don't choose the size range it counts something near the image > > borders but not he selected particles (I checked with the outlines). > > I tried also to select the algorithm in normal Threshold. In this case > > it works, I get the mask and it measures the selected particles, but > > the thresold value is different than the one obtained with the same > > algorithm in the Auto Threshold method, is it normal? > > Once I have chosen the algorithm can I include it in the macro and run > > it automatically? How should I do? > > Here the macro I'm using: > > > > origen = getDirectory("Images to process"); lista = > > getFileList(origen); > > u0 = getNumber("threshold", u0); > > setBatchMode(true); > > for (i=0; i<lista.length; i++) { > > showProgress(i+1, lista.length); > > open(origen+lista[i]); > > nombre = lista[i]; > > run("Split Channels"); > > run("Duplicate...", "title=[]"); > > run("Subtract Background...", "rolling=50"); > > run("Gaussian Blur...", "sigma=1"); > > setAutoThreshold("Default"); > > //run("Threshold..."); > > setAutoThreshold("Default"); > > setThreshold(u0, 65535); > > run("Convert to Mask"); > > run("Close-"); > > run("Fill Holes"); > > id = getImageID(); > > selectImage(id+1); > > sourceTitle = getTitle(); > > selectImage(id); > > run("Set Measurements...", "area mean min display redirect=["+ > > sourceTitle+ "] decimal=3"); > > run("Analyze Particles...", "size=90-350 pixel > > circularity=0.00-1.00 show=Outlines display"); > > selectImage(id+2); > > sourceTitle = getTitle(); > > selectImage(id); > > run("Set Measurements...", "area mean min display redirect=["+ > > sourceTitle+ "] decimal=3"); > > run("Analyze Particles...", "size=90-350 pixel > > circularity=0.00-1.00 show=Outlines display include"); > > } > > > > > > Then I will also need to measure the entire area of my modified images. > > Does someone already developed a macro for this? if not do you have > > any suggestion? > > > > Thank you very much!!! > > > > > > 2013/10/9 Curtis Rueden <[hidden email]> > > > >> Hi Leila, > >> > >> > What do you mean with the auto-threshold algorithm? > >> > >> An auto-thresholding algorithm chooses a (hopefully) appropriate > >> threshold by analyzing the histogram of your data and guessing at a > >> good cutoff point. > >> > >> See the docs at: > >> http://imagej.net/docs/guide/146-28.html#toc-Subsubsection-28.2.4 > >> > >> You can also use Fiji's "Image > Adjust > Auto Threshold" plugin with > >> method of "Try all" to create a mosaic of the mask produced by each > >> auto-thresholding algorithm, which makes the results very easy to > >> compare quickly. > >> > >> Regards, > >> Curtis > >> > >> > >> On Wed, Oct 9, 2013 at 5:02 AM, Leila Alieh <[hidden email]> > >> wrote: > >> > >> > Hi Curtis!!! > >> > Thank you for the reply! > >> > I tried to set the threshold without the macro, to see how reliable > >> > it > >> is. > >> > There is a huge difference in intensity across the images...I > >> > really > >> can't > >> > choose a good threshold for all of them. What do you mean with the > >> > auto-threshold algorithm? > >> > > >> > > >> > 2013/10/8 Curtis Rueden <[hidden email]> > >> > > >> > > Hi Leila, > >> > > > >> > > Are you sure ImageJ isn't autoscaling your display differently > >> > > across > >> > your > >> > > images? > >> > > > >> > > What does the pixel probe say? Mouse over your data and look at > >> > > the > >> raw > >> > > numbers spit out in the main ImageJ window's status bar. > >> > > > >> > > Also, can you use an auto-threshold algorithm across all your > >> > > images > >> to > >> > > make your analysis reproducible without needing to hardcode a > >> > > specific threshold value? > >> > > > >> > > Regards, > >> > > Curtis > >> > > > >> > > > >> > > On Tue, Oct 8, 2013 at 1:56 PM, Leila Alieh > >> > > <[hidden email]> > >> > wrote: > >> > > > >> > > > Hello! > >> > > > > >> > > > I developed a macro to count the number of cells positives for > >> > > > a > >> given > >> > > > antibody. The cells are selected depending on size, circularity > >> > > > and intensity. I found an intensity value good for some images > >> > > > and I run > >> > the > >> > > > macro. After that I found that the choosen threshold is too > >> > > > high for > >> > one > >> > > > image, so that to have a reliable valuation for that image I > >> > > > should > >> use > >> > > > half of the threshold chosen for the other images, but this > >> > > > latter threshold is really too low for the other images and it > >> > > > gives a > >> wrong > >> > > > result. I can't understand why this image is so different > >> > > > because > >> the > >> > > > intensity of the cells is not so different by eyes (it's a good > >> quality > >> > > > image, the ab signal is strong and there are no shadows). I was > >> > wondering > >> > > > if I did some mistake during the "editing": I had to cut the > >> > > > images > >> > (I'm > >> > > > interested only in a small area of them) and save them in a > >> > > > tiff > >> > format. > >> > > Is > >> > > > it possible that this editing chenged the intensity values? > >> > > > Thank you for your help!!!! > >> > > > > >> > > > Leila > >> > > > > >> > > > -- > >> > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > > >> > > > >> > > -- > >> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > >> > > >> > -- > >> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |