|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectij.gui.Roi
bunwarpj.PointHandler
public class PointHandler
Class to deal with handle points in bUnwarpJ: here we have the methods to paint the landmarks and the masks.
| Field Summary | |
|---|---|
private static int |
CROSS_HALFSIZE
constant to keep half of the cross size |
private int |
currentPoint
current point |
private MainDialog |
dialog
pointer to the main bUnwarpJ dialog |
private float |
hue
hue for assigning new color ([0.0-1.0]) |
private ij.ImagePlus |
imp
pointer to the image representation |
private java.util.Vector<java.awt.Color> |
listColors
|
private java.util.Vector<java.awt.Point> |
listMaskPoints
list of points in the mask |
private java.util.Vector<java.awt.Point> |
listPoints
list of points |
private Mask |
mask
pointer to the mask |
private boolean |
maskClosed
flat to check if the mask is closed or not |
private int |
numPoints
number of points |
private PointAction |
pa
pointer to the point actions |
private float |
saturation
saturation for assigning new color ([0.5-1.0]) |
private boolean |
started
start flag |
private PointToolbar |
tb
pointer to the point toolbar |
| Fields inherited from class ij.gui.Roi |
|---|
ANGLE, asp_bk, aspect, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, defaultFillColor, displayList, fillColor, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, instanceColor, LINE, lineWidth, mag, MOVING, MOVING_HANDLE, name, nonScalable, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, outlineColor, OVAL, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, stroke, TRACED_ROI, type, updateFullWindow, xMax, yMax |
| Constructor Summary | |
|---|---|
PointHandler(ij.ImagePlus imp)
Constructor without graphical capabilities, create an instance of PointHandler. |
|
PointHandler(ij.ImagePlus imp,
PointToolbar tb,
Mask mask,
MainDialog dialog)
Constructor with graphical capabilities, create an instance of PointHandler. |
|
| Method Summary | |
|---|---|
void |
addMaskPoint(int x,
int y)
Add a point to the mask. |
void |
addPoint(int x,
int y)
Add a point to the list of points. |
boolean |
canAddMaskPoints()
Check if it is possible to add points to the mask. |
void |
clearMask()
Remove all the elements of the mask. |
void |
closeMask(int tool)
Close mask. |
void |
draw(java.awt.Graphics g)
Draw the landmarks and mask. |
int |
findClosest(int x,
int y)
Find the the closest point to a certain point from the list of points. |
int |
getCurrentPoint()
Get current point index. |
java.awt.Point |
getPoint()
Get the current point in the list of points. |
PointAction |
getPointAction()
Get point action. |
java.util.Vector<java.awt.Point> |
getPoints()
Get the list of points. |
void |
killListeners()
Kill listeners. |
void |
movePoint(int x,
int y)
Move the current point into a new position. |
void |
nextPoint()
Increase the current point index one position in the list. |
void |
removePoint()
Remove the current point. |
void |
removePoint(int k)
Remove one specific point. |
void |
removePoints()
Remove all points in the mask. |
void |
setCurrentPoint(int currentPoint)
Set the current point. |
void |
setSecondaryPointHandler(ij.ImagePlus secondaryImp,
PointHandler secondaryPh)
Set the secondary point handler. |
void |
setTestSourceSet(int set)
Set the set of test for the source. |
void |
setTestTargetSet(int set)
Set the set of test for the target. |
| Methods inherited from class ij.gui.Roi |
|---|
abortPaste, clone, contains, copyAttributes, drawDisplayList, drawPixels, drawPixels, endPaste, equals, getAngle, getBoundingRect, getBounds, getColor, getConvexHull, getCurrentPasteMode, getDefaultFillColor, getFeretsDiameter, getFeretValues, getFillColor, getFloatPolygon, getLength, getLineColor, getLineWidth, getMask, getName, getPasteMode, getPolygon, getState, getStroke, getType, getTypeAsString, grow, handleMouseDown, handleMouseDrag, handleMouseUp, isArea, isHandle, isLine, isVisible, mouseDownInHandle, moveHandle, nudge, nudgeCorner, setColor, setDefaultFillColor, setFillColor, setImage, setInstanceColor, setLineColor, setLineWidth, setLocation, setName, setNonScalable, setPasteMode, setStroke, showStatus, startPaste, toString, update, updateClipRect |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final int CROSS_HALFSIZE
private final java.util.Vector<java.awt.Color> listColors
private final java.util.Vector<java.awt.Point> listPoints
private int currentPoint
private int numPoints
private boolean started
private final java.util.Vector<java.awt.Point> listMaskPoints
private boolean maskClosed
private ij.ImagePlus imp
private PointAction pa
private PointToolbar tb
private Mask mask
private MainDialog dialog
private float hue
private float saturation
| Constructor Detail |
|---|
public PointHandler(ij.ImagePlus imp,
PointToolbar tb,
Mask mask,
MainDialog dialog)
imp - pointer to the imagetb - pointer to the toolbarmask - pointer to the maskdialog - pointer to the bUnwarpJ dialogpublic PointHandler(ij.ImagePlus imp)
imp - image| Method Detail |
|---|
public void addMaskPoint(int x,
int y)
x - x- point coordinatey - y- point coordinate
public void addPoint(int x,
int y)
x - x- point coordinatey - y- point coordinatepublic boolean canAddMaskPoints()
public void clearMask()
public void closeMask(int tool)
tool - option to invert or not the maskpublic void draw(java.awt.Graphics g)
draw in class ij.gui.Roig - graphic element
public int findClosest(int x,
int y)
x - x- point coordinatey - y- point coordinate
public java.awt.Point getPoint()
public PointAction getPointAction()
public int getCurrentPoint()
public java.util.Vector<java.awt.Point> getPoints()
public void killListeners()
public void movePoint(int x,
int y)
x - x-coordinate of the new positiony - y-coordinate of the new positionpublic void nextPoint()
public void removePoint()
public void removePoint(int k)
k - index of the point to be removedpublic void removePoints()
public void setCurrentPoint(int currentPoint)
currentPoint - new current point indexpublic void setTestSourceSet(int set)
set - number of source setpublic void setTestTargetSet(int set)
set - number of target set
public void setSecondaryPointHandler(ij.ImagePlus secondaryImp,
PointHandler secondaryPh)
secondaryImp - pointer to the secondary imagesecondaryPh - secondary point handler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||