|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.image.Roi
public class Roi
Field Summary | |
---|---|
java.awt.Color |
color
color to display the ROI if enabled |
int |
roiCode
code for type of ROI. |
static int |
roiIDctr
Unique ROI ID that is used to generate a unqiue ROI each time the constructor is called. |
java.lang.String |
roiName
name of ROI if not null |
boolean |
showRoiFlag
Flag indicating that the Roi is to be displayed. |
int |
x1
ROI ULHC X coordinate |
int |
x2
ROI LRHC X cooreinate |
int |
y1
ROI ULHC Y coordinate |
int |
y2
ROI LRHC Y coordinate |
Constructor Summary | |
---|---|
Roi()
Roi() - Creates a new instance of Roi with null values. |
|
Roi(int x1,
int y1,
int x2,
int y2,
java.lang.String roiName,
int roiCode)
Roi() - creates a new instance of Roi |
|
Roi(int x1,
int y1,
int x2,
int y2,
java.lang.String roiName,
int roiCode,
java.awt.Color color,
boolean showRoiFlag)
Roi() - creates a new instance of Roi |
|
Roi(java.lang.String roiName)
Roi() - creates a new instance of Roi. |
|
Roi(java.lang.String roiName,
int roiCode)
Roi() - creates a new instance of Roi |
|
Roi(java.lang.String roiName,
int roiCode,
boolean showRoiFlag)
Roi() - creates a new instance of Roi |
Method Summary | |
---|---|
void |
clear()
clear() - clear ROI by setting all coordinates to -1 |
java.lang.String |
getROIStr()
getROIstr() - get the ROI printable string |
boolean |
isValid()
isValid() - test if the ROI is well defined such that all entries are < 0 and (x1 < = x2) and (y1 < = y2). |
boolean |
isValid(int x1,
int y1,
int x2,
int y2)
isValid() - test if these coordinates are a valid region |
boolean |
isXYinROI(int x,
int y)
isXYinROI() - test if XY is in the valid ROI region |
void |
setLRHC(int x2,
int y2)
setLRHC() - set the Lower Right Hand Corner of Region of Interest |
void |
setROI(int x1,
int y1,
int x2,
int y2)
setROI() - set the Region of Interest. |
void |
setROI(Roi srcRoi)
setROI() - set the ROI from another ROI srcRoi if it exists. |
void |
setRoiCode(int roiCode)
setRoiCode() - set the ROI code |
void |
setRoiDisplay(boolean showRoiFlag)
setRoiDisplay() - set the ROI flag for display the Roi. |
void |
setRoiName(java.lang.String roiName)
setRoiName() - set the ROI name |
void |
setULHC(int x1,
int y1)
setULHC() - set the Upper Left Hand Corner of Region of Interest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int roiIDctr
public java.lang.String roiName
public int roiCode
public java.awt.Color color
public boolean showRoiFlag
public int x1
public int y1
public int x2
public int y2
Constructor Detail |
---|
public Roi(int x1, int y1, int x2, int y2, java.lang.String roiName, int roiCode)
x1
- is upper left hand corner X coordinatey1
- is upper left hand corner Y coordinatex2
- is lower right hand corner X coordinatey2
- is lower right hand corner X coordinateroiName
- - optional name of ROI, else nullroiCode
- - type of ROIpublic Roi(int x1, int y1, int x2, int y2, java.lang.String roiName, int roiCode, java.awt.Color color, boolean showRoiFlag)
x1
- is upper left hand corner X coordinatey1
- is upper left hand corner Y coordinatex2
- is lower right hand corner X coordinatey2
- is lower right hand corner X coordinateroiName
- - optional name of ROI, else nullroiCode
- - type of ROIcolor
- - color of ROI if neededshowRoiFlag
- - to enable the display of this ROIpublic Roi(java.lang.String roiName, int roiCode)
roiName
- - optional name of ROI, else nullroiCode
- - type of ROIpublic Roi(java.lang.String roiName, int roiCode, boolean showRoiFlag)
roiName
- - optional name of ROI, else nullroiCode
- - type of ROIshowRoiFlag
- - to enable the display of this ROIpublic Roi(java.lang.String roiName)
roiName
- - optional name of ROI, else nullpublic Roi()
Method Detail |
---|
public void setRoiName(java.lang.String roiName)
public void setRoiCode(int roiCode)
public void setRoiDisplay(boolean showRoiFlag)
public void clear()
public boolean isValid()
public boolean isValid(int x1, int y1, int x2, int y2)
x1
- is upper left hand corner X coordinatey1
- is upper left hand corner Y coordinatex2
- is lower right hand corner X coordinatey2
- is lower right hand corner X coordinate
public boolean isXYinROI(int x, int y)
x
- - to testy
- - to test
public void setULHC(int x1, int y1)
x1
- is upper left hand corner X coordinatey1
- is upper left hand corner Y coordinatepublic void setLRHC(int x2, int y2)
x2
- is lower right hand corner X coordinatey2
- is lower right hand corner X coordinatey
- public void setROI(int x1, int y1, int x2, int y2)
x1
- is upper left hand corner X coordinatey1
- is upper left hand corner Y coordinatex2
- is lower right hand corner X coordinatey2
- is lower right hand corner X coordinatepublic void setROI(Roi srcRoi)
srcRoi
- source ROI to copypublic java.lang.String getROIStr()
E.g., "ROI(cw,1)[5:519, 40:506]" "ROI(wedge cw,2)[5:519, 5:36]"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |