registration
Class LocatedCircle

java.lang.Object
  |
  +--registration.LocatedCircle

public class LocatedCircle
extends java.lang.Object

This is a circle located in an image and is used by circle finding algorithms.

See Also:
(c) 1999-2002 Michael Abramoff. All rights reserved.

Field Summary
protected  float confidence
           
protected  float radius
           
protected  float x
           
protected  float y
           
 
Constructor Summary
LocatedCircle(double x, double y, double radius)
          Create new HoughCircle.
LocatedCircle(double x, double y, double radius, double confidence)
          Create new HoughCircle.
 
Method Summary
 void drawCenter(ij.process.ImageProcessor ip)
          Draws the center on an ImageProcessor.
 void drawOutline(ij.ImagePlus imp)
          Returns a circle containing the circumference as a Roi.
 ij.process.ImageProcessor getCircleCentersImageProcessor(ij.ImagePlus imp, java.util.Vector circles)
          Make an overlay over an image imp indicating all the centers anf the circles.
 double getConfidence()
           
 float[] getMask(int width, int height)
          Make a mask that masks this circle.
static float[] getMask(LocatedCircle c, float[] reference, int width)
          Create a mask for the field of view c
 double getRadius()
           
 ij.gui.OvalRoi getRoi(int width, int height)
          Get an ImageJ OvalRoi corresponding to this circle.
 double getX()
           
 double getY()
           
 void setRadius(double radius)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

protected float x

y

protected float y

radius

protected float radius

confidence

protected float confidence
Constructor Detail

LocatedCircle

public LocatedCircle(double x,
                     double y,
                     double radius,
                     double confidence)
Create new HoughCircle.

LocatedCircle

public LocatedCircle(double x,
                     double y,
                     double radius)
Create new HoughCircle.
Method Detail

getX

public double getX()

getY

public double getY()

getConfidence

public double getConfidence()

getRadius

public double getRadius()

setRadius

public void setRadius(double radius)

drawOutline

public void drawOutline(ij.ImagePlus imp)
Returns a circle containing the circumference as a Roi.

drawCenter

public void drawCenter(ij.process.ImageProcessor ip)
Draws the center on an ImageProcessor.

getRoi

public ij.gui.OvalRoi getRoi(int width,
                             int height)
Get an ImageJ OvalRoi corresponding to this circle. Because of a bug in ImageJ, make sure the Roi does not extend beyond the image boundaries (width and height).
Parameters:
width -  
height - the width and height of the image beyound which the Roi cannot extend.

getCircleCentersImageProcessor

public ij.process.ImageProcessor getCircleCentersImageProcessor(ij.ImagePlus imp,
                                                                java.util.Vector circles)
Make an overlay over an image imp indicating all the centers anf the circles.
Parameters:
imp - the original image.
circles - a Vector of HougCircles containg the circle parameters.

getMask

public float[] getMask(int width,
                       int height)
Make a mask that masks this circle. All pixels in the mask tha are in the circle are 1, all outside the circle are 0.
Parameters:
width - the width of the mask.
height - the height of the mask.
Returns:
a float[] containing the mask bytes.

getMask

public static float[] getMask(LocatedCircle c,
                              float[] reference,
                              int width)
Create a mask for the field of view c
Parameters:
c - a LocatedCircle with information of the center and diameter of the FOV.
Returns:
a float[] mask with 0 for non-valid, 1 for valid pixels.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object