|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xinapse.multisliceimage.roi.ROI
com.xinapse.multisliceimage.roi.Marker
com.xinapse.multisliceimage.roi.Text
public class Text
A Class for putting text on an image.
| Field Summary |
|---|
| Fields inherited from class com.xinapse.multisliceimage.roi.Marker |
|---|
DEFAULT_SIZE |
| Fields inherited from class com.xinapse.multisliceimage.roi.ROI |
|---|
handles, PREFERENCES_NODE_NAME, XTOKEN, YTOKEN |
| Constructor Summary | |
|---|---|
Text(double x,
double y)
Creates a new Text roi at the given (x, y) coordinate. |
|
Text(double x,
double y,
ROIState state)
Creates a new Text ROI at the given (x, y) coordinate, and sets the state of the ROI. |
|
Text(java.awt.geom.Point2D.Double pt)
Creates a new Text ROI at the given point. |
|
| Method Summary | |
|---|---|
Text |
clone()
Returns a clone of this ROI. |
boolean |
draw(java.awt.Graphics g,
java.awt.Rectangle visibleRectangle,
int imageDrawCols,
int imageDrawRows,
int xOffset,
int yOffset,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
boolean drawAnnotation)
Draws this ROI if it needs to be be drawn on screen. |
void |
drawInOrthoView(java.awt.Image orthoView,
javax.vecmath.Point3f orthoViewPosition,
javax.media.j3d.Transform3D imageToViewTx,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
boolean filled)
Draws this ROI on top of an orthogonal view of an image. |
static javax.swing.Icon |
getButtonIcon()
Returns an Icon that can be used for a button to create this type of ROI. |
java.awt.Color |
getColor()
Returns the java.awt.Color in which this Text ROI should be drawn. |
ROI |
getCopy()
Returns a copy of this ROI. |
static ROICreateDialog |
getCreateDialog(CanAddROIToFrame listener)
Returns a JDialog that can be used to create Text ROIs. |
static InteractionType |
getCreateInteractionType()
Returns the type of interaction needed to create a Text ROI. |
java.lang.String |
getDescription()
Return a description of this type of ROI. |
static ROI |
getInstance(java.awt.geom.Point2D point,
boolean pixelSnap,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
byte userColour,
ROIState state)
Create a Text ROI at a point on an image. |
static java.lang.String |
getName()
Returns a descriptive name for this type of ROI. |
int |
hashCode()
Returns a hash code value for this Marker ROI. |
boolean |
selectDeselect(java.awt.Point point,
boolean editMode,
boolean showDeleted,
int nAlreadySelected)
Selects or deselects an ROI after a user click at the point. |
| Methods inherited from class com.xinapse.multisliceimage.roi.Marker |
|---|
add, contains, dilate, equals, exclusiveOr, flipHorizontal, flipVertical, getBoundingRectangle, getFeret, getPerimeter, getSquareArea, getStats, getX, getY, intersect, intersects, move, set, set, subtract, toString |
| Methods inherited from class com.xinapse.multisliceimage.roi.ROI |
|---|
add, addMorphological, clearDeletionHistory, clearStats, dilate, getAnnotation, getBoundingRectangle, getCachedStatistics, getClasses, getDisplayedBounds2D, getDisplayedBounds2D, getDisplayedRoiArea, getFeret, getHandles, getHandleUnderPoint, getImageSource, getPixelValue, getROIs, getROIs, getROIs, getSlice, getState, getStats, getStats, getTextColor, getTextFontSize, getUserColour, isDeleted, isEditable, isReloaded, isSelected, join, main, markDeleted, mmPosToPix, moveROIs, pixPosToMm, printStats, setAnnotation, setCreationHistory, setSlice, setState, setTextColor, setTextSize, setUserColour, subtract, write, write |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Text(java.awt.geom.Point2D.Double pt)
pt - the location of the Text ROI.
public Text(double x,
double y)
x - the x location of the text.y - the y location of the text.
public Text(double x,
double y,
ROIState state)
x - the x location of the text.y - the y location of the text.state - the ROIState of the text.| Method Detail |
|---|
public static InteractionType getCreateInteractionType()
public static ROI getInstance(java.awt.geom.Point2D point,
boolean pixelSnap,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
byte userColour,
ROIState state)
throws ROIException
point - the point on the image in pixel coordinates.pixelSnap - true if pixel snap is turned on.nCols - the number of columns in the image.nRows - the number of rows in the image.pixelXSize - the width of an image pixel in mm.pixelYSize - the height of an image pixel in mm.state - the ROIState of this ROI on creation.
ROIException
public boolean draw(java.awt.Graphics g,
java.awt.Rectangle visibleRectangle,
int imageDrawCols,
int imageDrawRows,
int xOffset,
int yOffset,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
boolean drawAnnotation)
Marker
draw in class Markerg - the graphics context for the drawing operation.visibleRectangle - the part of the image that can be seen on-screen.imageDrawCols - width of the area in which this portion of the image is to be drawn.imageDrawRows - height of the area in which this portion of the image is to be drawn.xOffset - a horizontal offset for drawing operations.yOffset - a vertical offset for drawing operations.nCols - the number of columns in the image on which this ROI is defined.nRows - the number of rows in the image on which this ROI is defined.pixelXSize - pixel width for the image on which this ROI is defined.pixelYSize - pixel height for the image on which this ROI is defined.drawAnnotation - a flag to indicate whether annotation should be drawn.
public void drawInOrthoView(java.awt.Image orthoView,
javax.vecmath.Point3f orthoViewPosition,
javax.media.j3d.Transform3D imageToViewTx,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
boolean filled)
ROI
drawInOrthoView in class MarkerorthoView - the java.awt.Image into which the ROI is to be drawn.orthoViewPosition - the coordinates (col, row, slice position) of the orthogonal view
in the original image.imageToViewTx - the Transform3D that maps original image pixel coordinates
to pixel coordinates in the orthogonal view.nCols - the number of columns in the original image.nRows - the number of rows in the original image.nSlices - the number of slices in the original image.pixelXSize - the pixel width in the original image.pixelYSize - the pixel height in the original image.filled - whether the ROI should be drawn filled (effective only for ROIs that
enclose an area).
public boolean selectDeselect(java.awt.Point point,
boolean editMode,
boolean showDeleted,
int nAlreadySelected)
ROI
selectDeselect in class Markerpoint - the Point at which the user has clicked.editMode - true if the tool working with ROIs is in edit mode;
false if it is in view mode.showDeleted - true if the tool working with ROIs is set to show deleted ROIs;
false if it is not.nAlreadySelected - the number of ROIs already selected. This determines the exact
selection/deselection behaviour.
public java.awt.Color getColor()
getColor in class ROIpublic static ROICreateDialog getCreateDialog(CanAddROIToFrame listener)
listener - the CanAddROIToFrame to which the ROI will be added when
the Add button of the Dialog is clicked.public int hashCode()
hashCode in class Markerpublic ROI getCopy()
ROI
getCopy in class Markerpublic java.lang.String getDescription()
ROI
getDescription in class Markerpublic static java.lang.String getName()
public static javax.swing.Icon getButtonIcon()
public Text clone()
ROI
clone in class Marker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||