Login  Register

Re: tube diameter

Posted by Rotella, Anthony M. (GRC)[] on Aug 08, 2007; 9:00pm
URL: http://imagej.273.s1.nabble.com/tube-diameter-tp3698688p3698692.html

Paxton,

        I must be confused about your problem. If you know that the
radius value will be the biggest value in the map, then doesn't this
work :

function findRadius(){
        radius = -1;
        for(c = 0; c < getWidth(); c++)
                for(r = 0; r < getHeight(); r++){
                         if (getPixel(c,r) > radius)
                                radius = getPixel(c,r); }
        return radius;
}

Tony

       

>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On
>Behalf Of Paxton Provitera
>Sent: Wednesday, August 08, 2007 3:46 PM
>To: [hidden email]
>Subject: tube diameter
>
>Hi.
>I have images that I have thresholded and then run through
>Process>Binary>Distance Map.
>
>The images are of tubes in which I would like to extract the
>radius value (or the largest and center value given by the
>distance map).
>
>The images vary in size but are mostly 640x480.
>From the following example pixel values I want to extract only
>the value of
>6:
>
>
>Sample pixel values from a distance map image:
>
>0 0 0 0 0 0 1 2 3 4 5 6 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 1 2 3
>4 5 6 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 6 5 4 3
>2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 6 5 4 3 2 1 0 0 0 0 0
>0 0 0 0 0 0 0 1 2 3 4 5 6 6 5 4 3 2 1 0 0 0
>
>I've been stuck on some algorithm to extract the relevant information.
>Thanks for any help on this.
>
>-Paxton
>