|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectij.gui.Roi
ij.gui.Line
public class Line
This class represents a straight line selection.
Field Summary | |
---|---|
int |
x1
|
int |
x2
|
int |
y1
|
int |
y2
|
Fields inherited from class ij.gui.Roi |
---|
clipboard, clipHeight, clipWidth, clipX, clipY, constrain, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, ic, imp, LINE, MOVING, NORMAL, oldHeight, oldWidth, oldX, oldY, OVAL, pasteMode, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, TRACED_ROI, type, updateFullWindow, xMax, yMax |
Constructor Summary | |
---|---|
Line(int ox,
int oy,
ImagePlus imp)
Creates a new user-generated straight line selection. |
|
Line(int ox1,
int oy1,
int ox2,
int oy2,
ImagePlus imp)
Creates a new straight line selection using the specified starting and ending offscreen coordinates. |
Method Summary | |
---|---|
boolean |
contains(int x,
int y)
|
void |
draw(java.awt.Graphics g)
Draws this line in the image. |
void |
drawPixels()
|
double |
getLength()
Returns the length of this line. |
double[] |
getPixels()
Returns the pixel values along this line. |
double |
getRawLength()
Returns the length of this line in pixels. |
static int |
getWidth()
|
protected void |
grow(int xend,
int yend)
|
void |
nudgeCorner(int key)
Nudge end point of line by one pixel. |
static void |
setWidth(int w)
|
Methods inherited from class ij.gui.Roi |
---|
abortPaste, clone, endPaste, getAngle, getBoundingRect, getColor, getMask, getState, getType, handleMouseDown, handleMouseDrag, handleMouseUp, nudge, setColor, setImage, setLocation, setPasteMode, showStatus, toString, updateClipRect |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int x1
public int y1
public int x2
public int y2
Constructor Detail |
---|
public Line(int ox, int oy, ImagePlus imp)
public Line(int ox1, int oy1, int ox2, int oy2, ImagePlus imp)
Method Detail |
---|
protected void grow(int xend, int yend)
grow
in class Roi
public void draw(java.awt.Graphics g)
draw
in class Roi
public double getLength()
getLength
in class Roi
public double getRawLength()
public double[] getPixels()
public void drawPixels()
drawPixels
in class Roi
public boolean contains(int x, int y)
contains
in class Roi
public static int getWidth()
public static void setWidth(int w)
public void nudgeCorner(int key)
nudgeCorner
in class Roi
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |