|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.Point2D
java.awt.geom.Point2D.Double
de.unihalle.informatik.MiToBo.segmentation.snakes.datatypes.MTBSnakePoint2D
public class MTBSnakePoint2D
Class to implement 2D snake points with a special structure: (snake points means control points of the snake, on which the snake energy is calculated and optimized) - every snake point has an old index (position) within the snake, if the point does not exists before, the old index is set to -1 by default - every snake point has a Point2D.Double object for point coordinates
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
---|
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Field Summary | |
---|---|
protected int |
oldId
Old index (position) of the point within the snake. |
private static long |
serialVersionUID
|
Fields inherited from class java.awt.geom.Point2D.Double |
---|
x, y |
Constructor Summary | |
---|---|
MTBSnakePoint2D()
Standard constructor to create a new SnakePoint2D |
|
MTBSnakePoint2D(double _x,
double _y)
Constructor to create a new SnakePoint2D with x- and y-coordinates for the point. |
|
MTBSnakePoint2D(java.awt.geom.Point2D.Double p)
Constructor to create a new SnakePoint2D from the specified Point2D.Double object. |
Method Summary | |
---|---|
MTBSnakePoint2D |
clone()
Override java.lang.Object.clone() to create and return a copy of this object. |
int |
getOldId()
Get previous index of snake point from the previous snake. |
void |
setLocation(double _x,
double _y)
Overwrites Java Point2D method. |
void |
setLocation(double _x,
double _y,
int _oldId)
Sets the location of this SnakePoint2D to the specified double coordinates. |
void |
setLocation(java.awt.geom.Point2D.Double p,
int _oldId)
Sets the location of this SnakePoint2D to the same coordinates as the specified Point2D.Double object. |
void |
setLocation(java.awt.geom.Point2D p)
Overwrites Java Point2D method. |
void |
setOldId(int _oldId)
Set old index of current snake point within the snake. |
Methods inherited from class java.awt.geom.Point2D.Double |
---|
getX, getY, toString |
Methods inherited from class java.awt.geom.Point2D |
---|
distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int oldId
private static final long serialVersionUID
Constructor Detail |
---|
public MTBSnakePoint2D()
public MTBSnakePoint2D(double _x, double _y)
_x
- x-coordinate of the snake point_y
- y-coordinate of the snake pointpublic MTBSnakePoint2D(java.awt.geom.Point2D.Double p)
p
- Point2D.Double object with coordinates for new 2D snake pointMethod Detail |
---|
public MTBSnakePoint2D clone()
clone
in class java.awt.geom.Point2D
public int getOldId()
public void setLocation(double _x, double _y)
setLocation
in class java.awt.geom.Point2D.Double
public void setLocation(double _x, double _y, int _oldId)
_x
- new x-coordinate of the current 2D snake point_y
- new y-coordinate of the current 2D snake point_oldId
- old index of the point within the snakepublic void setLocation(java.awt.geom.Point2D.Double p, int _oldId)
p
- 2D point with new coordinates for the current 2D snake point_oldId
- old index of the point within the snakepublic void setLocation(java.awt.geom.Point2D p)
setLocation
in class java.awt.geom.Point2D
public void setOldId(int _oldId)
_oldId
- old index of the point point in the previous snake
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |