There are available and useful plugins such as Directionality to measure the orientation of particle across an entire image. Does anyone have a plugin they suggest that can measure the angle between adjacent particles, and preferably display the data with a histogram and image of the original image with numbered particles? It would be like an orientation of a nearest neighbor.
Thanks! |
Good day!
Evidently this is a cross-post from the forum. I'm pretty sure that no such ImageJ-code exists yet. When thinking about writing such code, a fundamental question concerns the typical number of particles in an image and their properties (e.g. are they strictly oriented?). A _typical_ image may help. Best Herbie ::::::::::::::::::::::::::::::::::::::::::: Am 02.02.17 um 18:32 schrieb DarthRevan109: > There are available and useful plugins such as Directionality to measure the > orientation of particle across an entire image. Does anyone have a plugin > they suggest that can measure the angle between adjacent particles, and > preferably display the data with a histogram and image of the original image > with numbered particles? It would be like an orientation of a nearest > neighbor. > > Thanks! -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Herbie,
Thanks for the response, that's the answer I expected but feared. Thanks as well for your suggestions I will keep them in mind.
Cheers,
Sent from my iPhone
|
I have been trying to develop a macro to do this to detect changes in the orientation of bristles in the Drosophila wing - it relies on a beautiful “nearest Neighbor” macro written by Michael Cammer - keep in mind that I am a rank amateur in writing these macros, and I would welcome advice on improvements, but the following macro works for a “test image” that I’ve been using
Len Dobens ************************* run("Revert"); run("Make Binary"); run("Set Measurements...", "centroid center feret's redirect=None decimal=3"); Dialog.create("Minimum particle size"); Dialog.addNumber("Width:", 5); Dialog.show(); z = Dialog.getNumber(); run("Analyze Particles...", "size=z-Infinity show=Overlay display exclude clear add"); run("To ROI Manager"); roiManager("Show All without labels"); run("RGB Color"); title = "Nearest neighbor"; width=1024; height=1024; Dialog.create("Nearest neighbor"); Dialog.addNumber("Angle difference:", 10); Dialog.addChoice("number of neighbors:", newArray("1", "2", "3")); Dialog.show(); angle = Dialog.getNumber(); neighbors = Dialog.getChoice(); /* Next step is to save all 1st and 2nd shortest pairs with their distances. If distance greater than certain criteria, such as 15% longer than avg dist, then sever it. Then sort into clusters and do convex hull. Michael Cammer 20150707 for ImageJ 1.50a */ var shortestColor1 = "yellow"; var shortestColor2 = "red"; var shortestColor3 = "blue"; var shortestColor4 = "green"; macro "shortest and 2nd shortest [q]" { run("Select None"); // This part of the macro gets the XY locations of the points. It could // be replaced with some other method such as opening a text file or measuring // centroids of objects by some other method. run("Clear Results"); run("Set Measurements...", "centroid redirect=None decimal=3"); run("Find Maxima...", "noise=10 output=List"); x = newArray(nResults()); y = newArray(nResults()); feret = newArray(nResults()); for(row=0; row<nResults(); row++) { x[row] = getResult("X", row); y[row] = getResult("Y", row); feret[row] = getResult("FeretAngle", row); } // for row to get XY locations // calculate shortest and 2nd shortest run("Remove Overlay"); dist = newArray(x.length); for(i=0; i<x.length; i++) { for(k=0; k<x.length; k++) { dist[k] = sqrt(((y[i] - y[k]) * (y[i] - y[k])) + ((x[i] - x[k]) * (x[i] - x[k]))); } // for k inside loop ranking = Array.rankPositions(dist); shortest0 = ranking[0]; shortest1 = ranking[1]; // ranking[0] will always give the position of 0 in the distance array shortest2 = ranking[2]; shortest3 = ranking[3]; // uncomment next three lines to show method // Array.print(dist); // Array.print(ranking); // print(""); doWand(x[i],y[i]); List.setMeasurements; degrees1 = List.getValue("FeretAngle"); doWand(x[shortest1],y[shortest1]); List.setMeasurements; degrees2 = List.getValue("FeretAngle"); doWand(x[shortest2],y[shortest2]); List.setMeasurements; degrees3 = List.getValue("FeretAngle"); doWand(x[shortest3],y[shortest3]); List.setMeasurements; degrees4 = List.getValue("FeretAngle"); if (neighbors == 1) { if (abs(degrees1 - degrees2) > angle) { doWand(x[shortest1],y[shortest1]); run("Add Selection...", "stroke=none width=0 fill=red"); } } if (neighbors == 2) { if (abs(degrees1 - (degrees2 + degrees3)/2) > angle) { doWand(x[shortest1],y[shortest1]); run("Add Selection...", "stroke=none width=0 fill=red"); } } if (neighbors == 3) { if (abs(degrees1 - (degrees2 + degrees3 + degrees4)/3) > angle) { doWand(x[shortest1],y[shortest1]); run("Add Selection...", "stroke=none width=0 fill=red"); } } makeLine(x[i],y[i], x[shortest1],y[shortest1], 1); Overlay.addSelection(shortestColor1); makeLine(x[i]+2,y[i]+2, x[shortest2]+2,y[shortest2]+2, 1); // offset to help show when there are shortest & 2nd shortest Overlay.addSelection(shortestColor2); makeLine(x[i]-2,y[i]-2, x[shortest3]-2,y[shortest3]-2, 1); // offset to help show when there are shortest & 2nd shortest Overlay.addSelection(shortestColor3); } On Feb 2, 2017, at 12:43 PM, DarthRevan109 <[hidden email]<mailto:[hidden email]>> wrote: Hi Herbie, Thanks for the response, that's the answer I expected but feared. Thanks as well for your suggestions I will keep them in mind. Cheers, Sent from my iPhone On Feb 2, 2017, at 11:52 AM, Herbie [via ImageJ] <[hidden email]<mailto:[hidden email]><mailto:[hidden email]>> wrote: Good day! Evidently this is a cross-post from the forum. I'm pretty sure that no such ImageJ-code exists yet. When thinking about writing such code, a fundamental question concerns the typical number of particles in an image and their properties (e.g. are they strictly oriented?). A _typical_ image may help. Best Herbie ::::::::::::::::::::::::::::::::::::::::::: Am 02.02.17 um 18:32 schrieb DarthRevan109: There are available and useful plugins such as Directionality to measure the orientation of particle across an entire image. Does anyone have a plugin they suggest that can measure the angle between adjacent particles, and preferably display the data with a histogram and image of the original image with numbered particles? It would be like an orientation of a nearest neighbor. Thanks! -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html ________________________________ If you reply to this email, your message will be added to the discussion below: http://imagej.1557.x6.nabble.com/Measuring-Angles-between-adjacent-particles-tp5018001p5018004.html To unsubscribe from Measuring Angles between adjacent particles, click here< NAML<http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> -- View this message in context: http://imagej.1557.x6.nabble.com/Measuring-Angles-between-adjacent-particles-tp5018001p5018006.html Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html Leonard Dobens, PhD Professor of Molecular Biology and Biochemistry SCB312 School of Biological Sciences University of Missouri-Kansas City 5007 Rockhill Road Kansas City, MO 64110 8162356272 [hidden email]<mailto:[hidden email]> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by DarthRevan109
Hi Aidan,
On Thu, Feb 2, 2017 at 11:32 AM, DarthRevan109 <[hidden email] > wrote: > There are available and useful plugins such as Directionality to measure > the > orientation of particle across an entire image. Does anyone have a plugin > they suggest that can measure the angle between adjacent particles, and > preferably display the data with a histogram and image of the original > image > with numbered particles? It would be like an orientation of a nearest > neighbor. > If your particles are fiber-like, such as collagen, you might find this CurveAlign tool interesting: http://loci.wisc.edu/software/curvealign It is from my group, although I am not the one responsible for developing it. On Thu, Feb 2, 2017 at 11:48 AM, Herbie <[hidden email]> wrote: > Evidently this is a cross-post from the forum. It is a good idea to post the link to the other half of the conversation, so that everyone can follow it more easily. In this case, that is: http://forum.imagej.net/t/measuring-angles-between-adjacent-objects/3975 On Thu, Feb 2, 2017 at 11:48 AM, Herbie <[hidden email]> wrote: > A _typical_ image may help. > I agree: if you can post a sample image, that is very helpful for us to make more targeted suggestions. Regards, Curtis -- Curtis Rueden LOCI software architect - https://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/ On Thu, Feb 2, 2017 at 12:43 PM, DarthRevan109 <[hidden email] > wrote: > Hi Herbie, > > Thanks for the response, that's the answer I expected but feared. Thanks > as well for your suggestions I will keep them in mind. > > Cheers, > > > > Sent from my iPhone > > On Feb 2, 2017, at 11:52 AM, Herbie [via ImageJ] < > [hidden email]<mailto:ml-node+ > [hidden email]>> wrote: > > Good day! > > Evidently this is a cross-post from the forum. > > I'm pretty sure that no such ImageJ-code exists yet. > > When thinking about writing such code, a fundamental question concerns > the typical number of particles in an image and their properties (e.g. > are they strictly oriented?). > > A _typical_ image may help. > > Best > > Herbie > > ::::::::::::::::::::::::::::::::::::::::::: > Am 02.02.17 um 18:32 schrieb DarthRevan109: > > There are available and useful plugins such as Directionality to measure > the > > orientation of particle across an entire image. Does anyone have a plugin > > they suggest that can measure the angle between adjacent particles, and > > preferably display the data with a histogram and image of the original > image > > with numbered particles? It would be like an orientation of a nearest > > neighbor. > > > > Thanks! > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://imagej.1557.x6.nabble.com/Measuring-Angles-between- > adjacent-particles-tp5018001p5018004.html > To unsubscribe from Measuring Angles between adjacent particles, click > here<http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro= > unsubscribe_by_code&node=5018001&code=YWlkYW4ubS5mZW5peEB2YW5kZXJiaW > x0LmVkdXw1MDE4MDAxfC03MDQ5NTA5Mjk=>. > NAML<http://imagej.1557.x6.nabble.com/template/ > NamlServlet.jtp?macro=macro_viewer&id=instant_html% > 21nabble%3Aemail.naml&base=nabble.naml.namespaces. > BasicNamespace-nabble.view.web.template.NabbleNamespace- > nabble.view.web.template.NodeNamespace&breadcrumbs= > notify_subscribers%21nabble%3Aemail.naml-instant_emails% > 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > > > > -- > View this message in context: http://imagej.1557.x6.nabble. > com/Measuring-Angles-between-adjacent-particles-tp5018001p5018006.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you all for the suggestions, I have started using the CurveAlignTool. My structures are "fibrillar" in a sense, they are the Z-discs of sarcomeres. Here I've attached a typical
image. I would like to measure the angles between adjacent structures.
Fortunately, as biological data goes this is a fairly easy structure to mask. Aidan Fenix, B.S.
Graduate Student
Vanderbilt University
From: ctrueden [via ImageJ] [ml-node+[hidden email]]
Sent: Thursday, February 02, 2017 4:52 PM To: Fenix, Aidan Mandy Subject: Re: Measuring Angles between adjacent particles Hi Aidan,
On Thu, Feb 2, 2017 at 11:32 AM, DarthRevan109 <[hidden email] > wrote: > There are available and useful plugins such as Directionality to measure > the > orientation of particle across an entire image. Does anyone have a plugin > they suggest that can measure the angle between adjacent particles, and > preferably display the data with a histogram and image of the original > image > with numbered particles? It would be like an orientation of a nearest > neighbor. > If your particles are fiber-like, such as collagen, you might find this CurveAlign tool interesting: http://loci.wisc.edu/software/curvealign It is from my group, although I am not the one responsible for developing it. On Thu, Feb 2, 2017 at 11:48 AM, Herbie <[hidden email]> wrote: > Evidently this is a cross-post from the forum. It is a good idea to post the link to the other half of the conversation, so that everyone can follow it more easily. In this case, that is: http://forum.imagej.net/t/measuring-angles-between-adjacent-objects/3975 On Thu, Feb 2, 2017 at 11:48 AM, Herbie <[hidden email]> wrote: > A _typical_ image may help. > I agree: if you can post a sample image, that is very helpful for us to make more targeted suggestions. Regards, Curtis -- Curtis Rueden LOCI software architect - https://loci.wisc.edu/software ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden Did you know ImageJ has a forum? http://forum.imagej.net/ On Thu, Feb 2, 2017 at 12:43 PM, DarthRevan109 <[hidden email] > wrote: > Hi Herbie, > > Thanks for the response, that's the answer I expected but feared. Thanks > as well for your suggestions I will keep them in mind. > > Cheers, > > > > Sent from my iPhone > > On Feb 2, 2017, at 11:52 AM, Herbie [via ImageJ] < > [hidden email]<mailto:ml-node+ > [hidden email]>> wrote: > > Good day! > > Evidently this is a cross-post from the forum. > > I'm pretty sure that no such ImageJ-code exists yet. > > When thinking about writing such code, a fundamental question concerns > the typical number of particles in an image and their properties (e.g. > are they strictly oriented?). > > A _typical_ image may help. > > Best > > Herbie > > ::::::::::::::::::::::::::::::::::::::::::: > Am 02.02.17 um 18:32 schrieb DarthRevan109: > > There are available and useful plugins such as Directionality to measure > the > > orientation of particle across an entire image. Does anyone have a plugin > > they suggest that can measure the angle between adjacent particles, and > > preferably display the data with a histogram and image of the original > image > > with numbered particles? It would be like an orientation of a nearest > > neighbor. > > > > Thanks! > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://imagej.1557.x6.nabble.com/Measuring-Angles-between- > adjacent-particles-tp5018001p5018004.html > To unsubscribe from Measuring Angles between adjacent particles, click > here<http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro= > unsubscribe_by_code&node=5018001&code=YWlkYW4ubS5mZW5peEB2YW5kZXJiaW > x0LmVkdXw1MDE4MDAxfC03MDQ5NTA5Mjk=>. > NAML<http://imagej.1557.x6.nabble.com/template/ > NamlServlet.jtp?macro=macro_viewer&id=instant_html% > 21nabble%3Aemail.naml&base=nabble.naml.namespaces. > BasicNamespace-nabble.view.web.template.NabbleNamespace- > nabble.view.web.template.NodeNamespace&breadcrumbs= > notify_subscribers%21nabble%3Aemail.naml-instant_emails% > 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > > > > -- > View this message in context: http://imagej.1557.x6.nabble. > com/Measuring-Angles-between-adjacent-particles-tp5018001p5018006.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Measuring-Angles-between-adjacent-particles-tp5018001p5018010.html
Typical_Image.tif (451K) Download Attachment |
In reply to this post by dobensl
Hi dobensl,
Thank you for the reply, seems like we have a similar problem. I've started macro in pieces and as a whole. When I run the whole macro, it fails because it says "Overlay required". I will keep trying to identify where my image is getting this error. On the other hand, individually the steps seem to work well so far. |
In reply to this post by ctrueden
Hi Curtis,
Thank you for the CurveAlignment suggestion. I have read through the instruction manual and it seems like this tool could work nicely for my application. However, despite reading the detailed naming instructions, I can't seem to open any image in the initial dialogue box ("Get Images"). WOrking on a mac, I get the error tone when I try an open the image. Have you had this problem? Thanks, |
Hi Aidan,
I am Curtis's colleague, Yuming Liu who is taking care of CurveAlign now and would like to take your question about the use of CurveAlign. To launch a MAC standalone APP correctly, the following steps are suggested: right click the APP(ctrl -click)----->Show Package Contents ----> Contents---->MacOS---->applauncher (right-click and choose open). As far as your original question is concerned, CurveAlign measures relative angle of a fiber/fiber segment with respect to a nearest point on a user specified boundary. It can also measure the relative alignment (or dispersity of angle, or angular anisotropy) of a fiber's nearest 2,4, 8 ,16 fibers but it does not output the relative angle of adjacent fibers. But it would be straightforward to add that. In the newest version(V4.0) that is under testing now, you can also set essentially arbitrary number of nearest fibers. Hope it helps. You can directly email me for further questions about the usage. Regards, Yuming |
Hello,
I'm wondering to wich extent CurvAlign compares to OrientionJ Thank you, Fabrice 2017-02-07 0:05 GMT+01:00 Yuming Liu <[hidden email]>: > Hi Aidan, > > I am Curtis's colleague, Yuming Liu who is taking care of CurveAlign now > and > would like to take your question about the use of CurveAlign. > > To launch a MAC standalone APP correctly, the following steps are > suggested: > right click the APP(ctrl -click)----->Show Package Contents ----> > Contents---->MacOS---->applauncher (right-click and choose open). > > As far as your original question is concerned, CurveAlign measures > relative > angle of a fiber/fiber segment with respect to a nearest point on a user > specified boundary. It can also measure the relative alignment (or > dispersity of angle, or angular anisotropy) of a fiber's nearest 2,4, 8 ,16 > fibers but it does not output the relative angle of adjacent fibers. But it > would be straightforward to add that. > > In the newest version(V4.0) that is under testing now, you can also set > essentially arbitrary number of nearest fibers. > > Hope it helps. You can directly email me for further questions about the > usage. > > Regards, > Yuming > > > > > > -- > View this message in context: http://imagej.1557.x6.nabble. > com/Measuring-Angles-between-adjacent-particles-tp5018001p5018041.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Fabrice, To my knowledge, Orientation J uses structure tensor to calculate orientation of each pixel and does not directly track fiber. But it can give you a quick evaluation of overall alignment of any image or any region of interest. While our tool, CurveAlign, directly tracks fiber using either curvelet transform or fiber propagation algorithm and is able to yield overall alignment as well was localized alignment. It also has a feature to calculate the relative angle of a fiber with respect to a user-defined boundary. The new version to be released soon is under test now and is available to be downloaded from our website. Please give it a try if interested. Thanks, Yuming On Wed, Feb 8, 2017 at 9:54 AM, fabrice senger-2 [via ImageJ] <[hidden email]> wrote: Hello, |
In reply to this post by Yuming Liu
Hi Yuming,
Thanks for contacting me and sorry for the delay, I've been in data collection mode the last few days and can now get back to this question. I will attempt to use the Curve Align tool this week. I have the CurveAlign App launching correctly, but when I
previously attempted to use it I couldn't upload images for analysis.
I will attempt again and get back to you. Thanks,
Aidan Fenix, B.S.
Graduate Student
Vanderbilt University
From: Yuming Liu [via ImageJ] [ml-node+[hidden email]]
Sent: Monday, February 06, 2017 5:05 PM To: Fenix, Aidan Mandy Subject: Re: Measuring Angles between adjacent particles Hi Aidan,
I am Curtis's colleague, Yuming Liu who is taking care of CurveAlign now and would like to take your question about the use of CurveAlign. To launch a MAC standalone APP correctly, the following steps are suggested: right click the APP(ctrl -click)----->Show Package Contents ----> Contents---->MacOS---->applauncher (right-click and choose open). As far as your original question is concerned, CurveAlign measures relative angle of a fiber/fiber segment with respect to a nearest point on a user specified boundary. It can also measure the relative alignment (or dispersity of angle, or angular anisotropy) of a fiber's nearest 2,4, 8 ,16 fibers but it does not output the relative angle of adjacent fibers. But it would be straightforward to add that. In the newest version(V4.0) that is under testing now, you can also set essentially arbitrary number of nearest fibers. Hope it helps. You can directly email me for further questions about the usage. Regards, Yuming If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Measuring-Angles-between-adjacent-particles-tp5018001p5018041.html
|
Free forum by Nabble | Edit this page |