|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectij.gui.Roi
turboRegPointHandler
class turboRegPointHandler
This class implements the graphic interactions when dealing with landmarks.
| Field Summary | |
|---|---|
private static int |
CROSS_HALFSIZE
The drawn landmarks fit in a 11x11 matrix. |
private int |
currentPoint
|
private static double |
GOLDEN_RATIO
The golden ratio mathematical constant determines where to put the initial landmarks. |
private boolean |
interactive
|
static int |
MAGNIFIER
The magnifying tool is set in eleventh position to be coherent with ImageJ. |
static int |
MOVE_CROSS
The moving tool is set in second position to be coherent with the PointPicker_ plugin. |
static int |
NUM_POINTS
The number of points we are willing to deal with is at most 4. |
private java.awt.Point[] |
point
|
private double[][] |
precisionPoint
|
private java.awt.Color[] |
spectrum
|
private boolean |
started
|
private int |
transformation
|
| Fields inherited from class ij.gui.Roi |
|---|
ANGLE, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, imp, instanceColor, LINE, mag, MOVING, MOVING_HANDLE, name, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, OVAL, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, TRACED_ROI, type, updateFullWindow, xMax, yMax |
| Constructor Summary | |
|---|---|
turboRegPointHandler(double[][] precisionPoint,
int transformation)
Keep a local copy of the points and of the transformation. |
|
turboRegPointHandler(ij.ImagePlus imp,
int transformation)
Keep a local copy of the ImagePlus object. |
|
| Method Summary | |
|---|---|
void |
draw(java.awt.Graphics g)
Draw the landmarks. |
private void |
drawArcs(java.awt.Graphics g)
|
private void |
drawHorizon(java.awt.Graphics g)
|
int |
findClosest(int x,
int y)
Set the current point as that which is closest to (x, y). |
java.awt.Point |
getPoint()
Return the current point as a Point object. |
double[][] |
getPoints()
Return all landmarks as an array double[transformation / 2][2],
except for a rigid-body transformation for which the array has size
double[3][2]. |
void |
movePoint(int x,
int y)
Modify the location of the current point. |
void |
setCurrentPoint(int currentPoint)
Set a new current point. |
void |
setPoints(double[][] precisionPoint)
Set new position for all landmarks, without clipping. |
private void |
setSpectrum()
|
void |
setTransformation(int transformation)
Reset the landmarks to their initial position for the given transformation. |
| Methods inherited from class ij.gui.Roi |
|---|
abortPaste, clone, contains, drawPixels, drawPixels, endPaste, equals, getAngle, getBoundingRect, getBounds, getColor, getCurrentPasteMode, getFeretsDiameter, getInstanceColor, getLength, getMask, getName, getPasteMode, getPolygon, getState, getType, getTypeAsString, grow, handleMouseDown, handleMouseDrag, handleMouseUp, isArea, isHandle, isLine, isVisible, mouseDownInHandle, moveHandle, nudge, nudgeCorner, setColor, setImage, setInstanceColor, setLineWidth, setLocation, setName, setPasteMode, setStroke, showStatus, startPaste, toString, update, updateClipRect |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAGNIFIER
public static final int MOVE_CROSS
PointPicker_ plugin.
public static final int NUM_POINTS
4.
turboRegDialog.transformation,
Constant Field Valuesprivate static final int CROSS_HALFSIZE
private static final double GOLDEN_RATIO
private final java.awt.Point[] point
private final java.awt.Color[] spectrum
private double[][] precisionPoint
private int transformation
private int currentPoint
private boolean interactive
private boolean started
| Constructor Detail |
|---|
public turboRegPointHandler(double[][] precisionPoint,
int transformation)
public turboRegPointHandler(ij.ImagePlus imp,
int transformation)
ImagePlus object. Set the
landmarks to their initial position for the given transformation.
imp - ImagePlus object.transformation - Transformation code.turboRegDialog.restoreAll()| Method Detail |
|---|
public void draw(java.awt.Graphics g)
draw in class ij.gui.Roig - Graphics environment.
public int findClosest(int x,
int y)
x - Horizontal coordinate in canvas units.y - Vertical coordinate in canvas units.public java.awt.Point getPoint()
Point object.
public double[][] getPoints()
double[transformation / 2][2],
except for a rigid-body transformation for which the array has size
double[3][2].
public void movePoint(int x,
int y)
x - Desired new horizontal coordinate in canvas units.y - Desired new vertical coordinate in canvas units.public void setCurrentPoint(int currentPoint)
currentPoint - New current point index.public void setPoints(double[][] precisionPoint)
precisionPoint - New coordinates in canvas units.public void setTransformation(int transformation)
transformation - Transformation code.private void drawArcs(java.awt.Graphics g)
private void drawHorizon(java.awt.Graphics g)
private void setSpectrum()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||