Dear all,
I am using imagej to analyse EM pictures. Now I would like to count particles within a defined circular region. This would require that in the simpliest case I can overlay circles on the picture by clicking at a certain point of the picture and thereby define the middle of the circle and it then draws a circle with defined radius. Is there a workaround with the normal imagej functions or does anybody know a plugin that would make the job? Thanks and best wishes, daniyard |
Hi
in my opinion, I think you can manually select the area of interest, delete the outer area, then apply the command "analyze particles" choosing your parameters (min area- max area...and so on) You can try to use the batch command recording the handmade circle and then choosing process. In a while I'll sentd u a macro that could work bye ________________________________ Da: Daniyard <[hidden email]> A: [hidden email] Inviato: Lunedì 10 Giugno 2013 16:20 Oggetto: draw circles with defined diameter according to scale bar Dear all, I am using imagej to analyse EM pictures. Now I would like to count particles within a defined circular region. This would require that in the simpliest case I can overlay circles on the picture by clicking at a certain point of the picture and thereby define the middle of the circle and it then draws a circle with defined radius. Is there a workaround with the normal imagej functions or does anybody know a plugin that would make the job? Thanks and best wishes, daniyard -- View this message in context: http://imagej.1557.x6.nabble.com/draw-circles-with-defined-diameter-according-to-scale-bar-tp5003317.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 |
In reply to this post by Daniyard
Daniyard,
actually the subject of your mail and the text body seem to be somehow different... If you should like to draw defined circles as selections you may use a macro. For example: getCursorLoc(x, y, z, modifiers); d = getNumber( "Diameter", 32 ); run("Specify...", "width=[d] height=[d] x=[x] y=[y] oval centered"); Click on the desired circle center in your image, then start the macro. HTH Herbie __________________________________ On 10.06.13 16:20, Daniyard wrote: > Dear all, > > I am using imagej to analyse EM pictures. Now I would like to count > particles within a defined circular region. This would require that in the > simpliest case I can overlay circles on the picture by clicking at a certain > point of the picture and thereby define the middle of the circle and it then > draws a circle with defined radius. > > Is there a workaround with the normal imagej functions or does anybody know > a plugin that would make the job? > > Thanks and best wishes, > > daniyard > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/draw-circles-with-defined-diameter-according-to-scale-bar-tp5003317.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 |
In reply to this post by Daniyard
hi try this macro
maybe can help u (is an oval) makeOval(774, 528, 1428, 1344); run("Line Width...", "line=10"); run("Draw"); run("Clear Outside"); run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Nothing display clear include summarize record add in_situ"); close(); ________________________________ Da: Daniyard <[hidden email]> A: [hidden email] Inviato: Lunedì 10 Giugno 2013 16:20 Oggetto: draw circles with defined diameter according to scale bar Dear all, I am using imagej to analyse EM pictures. Now I would like to count particles within a defined circular region. This would require that in the simpliest case I can overlay circles on the picture by clicking at a certain point of the picture and thereby define the middle of the circle and it then draws a circle with defined radius. Is there a workaround with the normal imagej functions or does anybody know a plugin that would make the job? Thanks and best wishes, daniyard -- View this message in context: http://imagej.1557.x6.nabble.com/draw-circles-with-defined-diameter-according-to-scale-bar-tp5003317.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 very much for the replies...I will test the macros and see if they will help solve the problem.
Best, Daniyard |
In reply to this post by Daniyard
Dear Daniyard,
The macro below will draw your circular ROIs on left-mouse click. // This macro draws a circle on left-mouse click defining the // centre of the circle. User can set the radius of the circle. // Right-mouse click stops the macro. macro CircleOn_MouseClick{ setOption("DisablePopupMenu", true); getPixelSize(unit, pixelWidth, pixelHeight); setTool("rectangle"); leftButton=16; rightButton=4; radius = 100; Dialog.create("Settings"); Dialog.addNumber("Set radius of circle", radius); Dialog.show(); radius = Dialog.getNumber(); height = 2*pixelHeight*radius; width = 2*pixelWidth*radius; x2=-1; y2=-1; z2=-1; flags2=-1; getCursorLoc(x, y, z, flags); while (flags&rightButton==0){ getCursorLoc(x, y, z, flags); if (flags&leftButton!=0) { if (x!=x2 || y!=y2 || z!=z2 || flags!=flags2) { x = x - width/2; y = y - height/2; makeOval(x, y, width, height); x2=x; y2=y; z2=z; flags2=flags; // Here you can add code to do something } } } } Best wishes Kees Dr Ir K.R. Straatman Senior Experimental Officer Centre for Core Biotechnology Services University of Leicester, UK http://www.le.ac.uk/biochem/microscopy/home.html ImageJ workshops: 29 and 30 July 2013 http://www.le.ac.uk/biochem/microscopy/ImageJ2013.html -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Daniyard Sent: 10 June 2013 15:20 To: [hidden email] Subject: draw circles with defined diameter according to scale bar Dear all, I am using imagej to analyse EM pictures. Now I would like to count particles within a defined circular region. This would require that in the simpliest case I can overlay circles on the picture by clicking at a certain point of the picture and thereby define the middle of the circle and it then draws a circle with defined radius. Is there a workaround with the normal imagej functions or does anybody know a plugin that would make the job? Thanks and best wishes, daniyard -- View this message in context: http://imagej.1557.x6.nabble.com/draw-circles-with-defined-diameter-according-to-scale-bar-tp5003317.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 |
Free forum by Nabble | Edit this page |