http://imagej.273.s1.nabble.com/particle-size-by-using-intersect-line-tp5021832p5021872.html
the forum.
and significant contrast one could work with profiles of lines. However,
both conditions are not fulfilled. Of course the number of intersections
alone is insufficient...
> A more basic question is does the intersect line method actually produce
> a particle size estimate.
>
>
> Consider two particles with the same area, one with a smooth edge and
> the second with a crenellated edge. The areas are the same but the
> number of intersections will clearly differ. By size we normally mean
> area, which clearly cannot be provided by the number of intersections.
>
>
> If a single particle is present then a perimeter estimate is possible
> but when more than one particle is present the method contains no
> mechanism for counting the number of particles and cannot produce
> particle size.
>
>
> Finally most particles are not 2 dimensional and a single 2D image
> cannot be used to determine size (volume) or surface area.
>
>
> So back the basic question - what measurement is wanted.
>
>
> Jeremy Adler
>
> Uppsala U
>
>
>
> ------------------------------------------------------------------------
> *From:* ImageJ Interest Group <
[hidden email]> on behalf of Herbie
> <
[hidden email]>
> *Sent:* 02 March 2019 15:47
> *To:*
[hidden email]
> *Subject:* Re: particle size by using intersect line?
> Good day!
>
> Neither from here, nor from the IJ-forum you've received satisfying
> solutions and I guess this is due to the fact that your seemingly simple
> problem in fact is rather complicated.
>
> I've spent several hours but wasn't successful either.
>
> Here are some hints:
>
> 1. "intersect line method" (successive image profiles)
> I doubt what you've written elsewhere, namely that one can distinguish
> signal and background by *simply* analyzing profiles. The reason is that
> the fluctuations are too large.
>
> 2. For the provided sample image I was able to compute a reasonable
> binary contour image (see attachment). Here is the ImageJ-macro code:
>
> // imagej-macro "meanderContours" (Herbie G., 26. Feb. 2019)
> requires( "1.52k" );
> setBackgroundColor(0, 0, 0);
> setOption("BlackBackground", true);
> img=getTitle();
> setBatchMode(true);
> run("Duplicate...", "title=copy");
> run("Median...", "radius=2");
> run("Bandpass Filter...", "filter_large=3 filter_small=0 suppress=None
> tolerance=5");
> setAutoThreshold("RenyiEntropy dark");
> run("Convert to Mask");
> run("Analyze Particles...", "size=0-50 pixel add");
> n=roiManager("count");
> a=Array.getSequence(n) ;
> roiManager("select", a );
> roiManager("combine");
> roiManager("add");
> roiManager("Delete");
> roiManager("Select", 0);
> run("Clear", "slice");
> close("ROI Manager");
> run("Remove Overlay");
> run("Select None");
> run("Close-");
> run("Skeletonize");
> setBatchMode(false);
> makeRectangle(3,3,668,376);
> run("Crop");
> run("Select None");
> exit();
> // imagej-macro "meanderContours" (Herbie G., 26. Feb. 2019)
>
> I have no idea how this approach generalized to other images of this kind!
>
> 3. To find the area of the signal or of the background from the binary
> contour image turned out being really complicated and I haven't found a
> convincing approach yet. Here is an ImageJ-macro code that may give you
> an idea of how to start but it doesn't do the complete job (see attached
> result image):
>
> // imagej-macro "fillMeander" (Herbie G., 27. Feb. 2019)
> requires( "1.52k" );
> setForegroundColor(255, 255, 255);
> makeRectangle(0,0,668,1);
> analyzeProfile();
> exit();
> function analyzeProfile() {
> p=getProfile();
> p=Array.concat(Array.concat(0,p), 0);
> n=p.length;
> a=newArray(n*0.5);
> idx=1;
> for ( i=0; i<n; i++ ) {
> if (p[i]>0) {
> if (p[i-1]<255 || p[i+1]<255) {a[idx]=i-1; idx++;} else
> setPixel(i-1, 0, 0); // care fore line breaks (single code line here)
> }
> }
> a=Array.trim(a, idx+1);
> a[idx]=getWidth()-1;
> a[0]=0;
> floodFill(0.5*a[0], 0);
> odd=false;
> for ( i=0; i<idx; i++ ) {
> x=0.5*(a[i]+a[i+1]);
> val=getPixel(x, 0);
> if (odd) {
> if (val<255) {floodFill(x, 0); }
> odd=false;
> } else {
> if (val<255) odd=true;
> }
> }
> }
> // imagej-macro "fillMeander" (Herbie G., 27. Feb. 2019)
>
> Good luck
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::::
> Am 24.02.19 um 15:03 schrieb Steven Liu:
>> Dear all,
>> There are several ways to get the particle size. But I want to try "intersect line method". I know how to get the "Plot Profile". However, I do not know how to get the particle size automatically. Imaging I have many images, it will be convenient to apply Macros.
>> Is there available Macros for use? I failed to find one.
>> Could anyone help me?
>> I attached one example image.
>> Thanks!
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>>
>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> Page Title
>
>
>
>
>
>
>
> När du har kontakt med oss på Uppsala universitet med e-post så innebär
> det att vi behandlar dina personuppgifter. För att läsa mer om hur vi
> gör det kan du läsa här:
http://www.uu.se/om-uu/dataskydd-personuppgifter/>
> E-mailing Uppsala University means that we will process your personal
> data. For more information on how this is performed, please read here:
>
http://www.uu.se/en/about-uu/data-protection-policy