Posted by
jerie on
Jul 06, 2015; 4:43pm
URL: http://imagej.273.s1.nabble.com/Image-analysis-tp5013423p5013438.html
Hi Imre,
On Mon, Jul 6, 2015 at 12:16 PM, ImreBorsi <
[hidden email]> wrote:
> this code works on 1 line !!!
>
> But does not with multiple lines in ROI!
>
> Please help me !!
>
not sure if I understood the issue correctly, I would generate a mask with
odd & even striped rows, same size as your image. Use Process..Image
Calculator AND to generate an image containing signals on even stripes
separated by empty rows. On this image you can use analyze..count
particles. Then invert the mask an repeat.
Another approach (probably slower) would be to copy all rows to a new image
(similar to time-space-plot or kymograph), and place a '0' row between
copied rows. On this image you can again use analyze..count particles.
If that sounds feasible and you need help with implementation, let me know.
Cheers,
Jens
Dr. Jens Rietdorf, visiting scientist @ center for technological
development in health
http://br.linkedin.com/pub/jens-rietdorf/6/4a3/189/On Mon, Jul 6, 2015 at 12:16 PM, ImreBorsi <
[hidden email]> wrote:
> this code works on 1 line !!!
>
> But does not with multiple lines in ROI!
>
> Please help me !!
>
> macro "line [v]"
> {
> run("Interpolate", "interval=1");
> getSelectionCoordinates(x, y);
> for(befi = 0,ai=0,i=0 ;i<x.length; i++)
> {
> ix=round(x[i]);
> iy=round(y[i]);
> if (getPixel(ix,iy) == 0)
> {
> ai++;
> befi++;
> }
> else
> {
> ai=0;
> }
> if (ai == 0 && befi != 0)
> {
> print(befi);
> befi=0;
> }
> }
>
>
>
>
>
> --
> View this message in context:
>
http://imagej.1557.x6.nabble.com/Image-analysis-tp5013423p5013432.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
Jens Rietdorf
Visiting Scientist
Fundação Oswaldo Cruz - Ministério da Saúde, Centro de Desenvolvimento Tecnológico em Saúde (CDTS), Rio de Janeiro, Brasil.