|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLandmark
public class Landmark
Landmark class supports landmark data structures and operations. Landmarks are numbered internally [0:51] and vlsually as overlays by the ImageScroller.drawLandmarksTextInImage() method as [A:Z,a:z] and are display as "+letter" in the selected landmark color. They are used by the warping transforms (AffineWarp, etc).
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker
Field Summary | |
---|---|
static java.awt.Color[] |
colorLM
|
private static Flicker |
flk
|
static java.awt.Font[] |
fontLM
color of the landmark |
(package private) static java.awt.Font |
lmsFont
font for drawing LMS overlay |
static int |
maxLMS
max # of landmarks allowed |
(package private) static int |
MAXLMS
3 for affine, but 10x10 for warp |
static java.lang.String[] |
nameLM
font of the landmark |
static int |
nLM
highest landmark # |
static int[] |
ox1
X coordinates in left output image 1 |
static int[] |
ox2
X coordinates in right output image 2 |
static int[] |
oy1
Y coordinates in left output image 1 |
static int[] |
oy2
Y coordinates in right output image 2 |
private static Util |
util
|
static int[] |
x1
X coordinates in left input image 1 |
static int[] |
x2
X coordinates in right input image 2 |
static int |
xLM1a
|
static int |
xLM1b
|
static int |
xLM1c
|
static int |
xLM2a
|
static int |
xLM2b
|
static int |
xLM2c
|
static int[] |
y1
Y coordinates in left input image 1 |
static int[] |
y2
Y coordinates in right input image 2 |
static int |
yLM1a
|
static int |
yLM1b
|
static int |
yLM1c
|
static int |
yLM2a
|
static int |
yLM2b
|
static int |
yLM2c
|
Constructor Summary | |
---|---|
Landmark(Flicker flkS,
java.awt.Font lmsFontUse,
int maxLMSuse)
Landmark() - Constructor. |
Method Summary | |
---|---|
static boolean |
addDemoLandmarks(int nPairs)
addDemoLandmarks() - add 3 or 6 demo landmark pairs but only for |
boolean |
addLandmark()
addLandmark() - "Add LM" add temporary landmarks to landmark list If exist in both I1 and I2 images into permanent landmarks and indicate in images push landmark. |
static void |
clean()
clean() - reinitialize the landmarks data structures |
void |
deleteLandmark()
deleteLandmark() - "Delete LM" undo the last landmark if any |
int |
deleteLastLandmark()
deleteLastLandmark() - delete last landmark |
(package private) java.lang.String |
getStateStr()
getStateStr() - get this landmark state as a string |
float |
landmarkSimilarity()
landmarkSimilarity() - compute landmark similarity for >=3 LMs. |
static int |
pushLandmark(int x1d,
int y1d,
int x2d,
int y2d)
pushLandmark() - push (x1,y1,x2,y2) and return nLM. |
(package private) void |
readState()
readState() - Read state from .flk startup state file. |
static void |
setColorAll(java.awt.Color color)
setColorAll() - set the landmark color for all landmarks |
void |
showLandmarkSimilarity()
showLandmarkSimilarity() - show landmark similarity for >=3 LMs |
static void |
updateScrollers()
updateScrollers() - update LM in both siCanvases and repaint. |
(package private) void |
writeState(java.lang.StringBuffer sBuf)
writeState() - Write this landmark state to string buffer sBuf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Flicker flk
private static Util util
static final int MAXLMS
public static int xLM1a
public static int yLM1a
public static int xLM2a
public static int yLM2a
public static int xLM1b
public static int yLM1b
public static int xLM2b
public static int yLM2b
public static int xLM1c
public static int yLM1c
public static int xLM2c
public static int yLM2c
static java.awt.Font lmsFont
public static int maxLMS
public static int nLM
public static int[] x1
public static int[] y1
public static int[] x2
public static int[] y2
public static int[] ox1
public static int[] oy1
public static int[] ox2
public static int[] oy2
public static java.awt.Color[] colorLM
public static java.awt.Font[] fontLM
public static java.lang.String[] nameLM
Constructor Detail |
---|
public Landmark(Flicker flkS, java.awt.Font lmsFontUse, int maxLMSuse)
flk
- is main classlmsFont
- is font to use for all landmarksmaxLMS
- is max # of landmarks will ever use.
if maxLMS==0, use MAXLMSMethod Detail |
---|
public static void clean()
public static void setColorAll(java.awt.Color color)
public static void updateScrollers()
public static int pushLandmark(int x1d, int y1d, int x2d, int y2d)
x1d
- coordinate image 1y1d
- coordinate image 1x2d
- coordinate image 2y2d
- coordinate image 2
public int deleteLastLandmark()
public float landmarkSimilarity()
Similarity is defined as Sqrt( |sum(LSQerr(x1,y1))-sum(LSQerr(x2,y2))| )
public void showLandmarkSimilarity()
public boolean addLandmark()
public void deleteLandmark()
void readState()
void writeState(java.lang.StringBuffer sBuf)
iName
- of the image to read (e.g., "I1", or "I2")sBuf
- is the string buffer to write to.java.lang.String getStateStr()
iData
- is the image data to usefileName
- associated with the iData
public static boolean addDemoLandmarks(int nPairs)
nPairs
- # of landmark pairs to add if the I1,I2 images are
the demo plasmaH/L gels 3 landmarks
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |