Dear All,
I am a new user to image J. Can someone please help me with a plugin that can find the average of top 5 intensities from the ROI or the image. I have attached a sample image and I want to find the average of top 5 intensities in the image. I would be grateful for your help. Kind regards, Yaseen -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html test_image.tif (12K) Download Attachment |
I've been playing around with that for my project. I didn't find an actual
plugin for it, but you can do it manually. There's a transect tool in ImageJ, just create the transect line then hit ctrl+K which gives out a plot profile for that line. It will show you the peaks in a graph and you can generate 5 of these. Fiji in the other hand has a plugin called Pixel Inspector which will throw you a massive table that can examine a 10 pixel radius and give you intensities per pixel within the small frame you create with it, this one I've yet to play around with enough but it certainly is interesting. You can also make a rectangle on the ROI and use the Surface plot option in the analyze tab which will throw you a 3D view of the peaks (do it in wireframe and without shading). Hope that helped, Best regards, Keyvan Balazadeh On Sun, Oct 19, 2014 at 7:03 AM, Yaseen Ladak <[hidden email]> wrote: > Dear All, > > I am a new user to image J. Can someone please help me with a plugin that > can find the average of top 5 intensities from the ROI or the image. > > I have attached a sample image and I want to find the average of top 5 > intensities in the image. > > I would be grateful for your help. > > Kind regards, > Yaseen > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
This post was updated on .
In reply to this post by Yaseen Ladak
Hi Yaseen,
I think that you can use histogram function, and then list the intensity and find the top five pixels and calculate the average of them. It works also if you select an area, or a ROI: because histogram works with selections. I don't know if exists a plugin that does that, but i think that would be not too much complicated write one. Hoping to be helpful, have a nice day Emanuele Martini @IFOM-IEO Research Campus -MI-
Image Analyst @Ifom-IEO research campus -MI-
|
Dear Emanuele et Yaseen,
Using or creating a plugin for doing what you are looking for is somehow over killing since a simple macro can already do the job. And the following macro will actually open the Blobs picture and make the needed work: run("Blobs (25K)"); getDimensions(width, height, channels, slices, frames); val = newArray(width * height); for(i = 0; i != width; i++) for(j = 0; j != height; j++) val[j * width + i] = getPixel(i, j); Array.sort (val); Array.reverse (val); sub = Array.trim(val, 5); Array.getStatistics(sub, min, max, mean, stdDev); print(mean); My best regards, Philippe Philippe CARL Laboratoire de Biophotonique et Pharmacologie UMR 7213 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de Emanuele Martini Envoyé : lundi 20 octobre 2014 09:15 À : [hidden email] Objet : Re: Plugin for finding average of top 5 intensities in an image file. Hi Yaseen, I think that you can use histogram function, and then list the intensity and find the top five pixels and the average of them. I don't know if exists a plugin that does that, but i think that would be not too much complicated write one. Hoping to be helpful, have a nice day Emanuele Martini @IFOM-IEO Research Campus -MI- -- View this message in context: http://imagej.1557.x6.nabble.com/Plugin-for-finding-average-of-top-5-intensi ties-in-an-image-file-tp5010099p5010109.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 |
Yes, Philippe.
I wrote plugin, but I intend a "simple script" :) Have a nice day, Emanuele Martini
Image Analyst @Ifom-IEO research campus -MI-
|
Hello Philippe,
So I should copy paste this in a file and save it where and what should be the extension. How should I also run it? I am very new to this. Kind regards, Yaseen Ladak Email: [hidden email] Skype: yaseen.ladak On 20 October 2014 11:10, Emanuele Martini <[hidden email]> wrote: > Yes, Philippe. > I wrote plugin, but I intend a "simple script" :) > Have a nice day, > Emanuele Martini > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Plugin-for-finding-average-of-top-5-intensities-in-an-image-file-tp5010099p5010112.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 |
Dear Yaseen,
There are a couple of ways of running a macro, but since you are a beginner I will describe you what is probably one of if not the easiest one. So just create a file called whatever you want with underscores and the extension .ijm (like "my_macro.ijm") that you save in your Fiji/ImageJ plugin folder and containing the following ASCII code (the file should be created and saved through the software Notepad or an equivalent of it, i.e. do not use Word or similar software for this): getDimensions(width, height, channels, slices, frames); val = newArray(width * height); for(i = 0; i != width; i++) for(j = 0; j != height; j++) val[i * height + j] = getPixel(i, j); Array.sort (val); Array.reverse (val); sub = Array.trim(val, 5); Array.getStatistics(sub, min, max, mean, stdDev); print(mean); Once done, just open your Fiji/ImageJ software, open the picture you want to get the values from and then run your macro from your Fiji/ImageJ plugin menu. In the case you have still some difficulties using the macro after these explanations, it would maybe be better that you contact me out of the list. My best regards, Philippe Philippe CARL Laboratoire de Biophotonique et Pharmacologie UMR 7213 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de Yaseen Ladak Envoyé : lundi 20 octobre 2014 12:28 À : [hidden email] Objet : Re: Plugin for finding average of top 5 intensities in an image file. Hello Philippe, So I should copy paste this in a file and save it where and what should be the extension. How should I also run it? I am very new to this. Kind regards, Yaseen Ladak Email: [hidden email] Skype: yaseen.ladak On 20 October 2014 11:10, Emanuele Martini <[hidden email]> wrote: > Yes, Philippe. > I wrote plugin, but I intend a "simple script" :) Have a nice day, > Emanuele Martini > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Plugin-for-finding-average-of-top-5-i > ntensities-in-an-image-file-tp5010099p5010112.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 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |