|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uthscsa.ric.mango.MangoROI
public class MangoROI
MangoROI contains all of the ROI data associated with a viewer. Methods are provided to access and replace ROI data stored as area masks, line shapes, and points.
Field Summary | |
---|---|
static int |
SLICE_DIRECTION_AXIAL
|
static int |
SLICE_DIRECTION_CORONAL
|
static int |
SLICE_DIRECTION_SAGITTAL
|
Constructor Summary | |
---|---|
protected |
MangoROI(ROIMaskManager rm,
ShapesManager[] sm,
ShapesSpecialManager[] ssm,
PointsManager pm,
PointsSpecialManager psm)
|
Method Summary | |
---|---|
void |
addImmutablePoint(Coordinate point,
Color color)
Adds a point that cannot be moved by the user and can only be removed programatically. |
Shape |
addImmutableShape(int sliceDirection,
int slice,
Shape shape,
Color color,
Stroke stroke)
Adds a shape that cannot be edited by the user and can only be removed programatically. |
Shape |
addImmutableStaticShape(int sliceDirection,
Shape shape,
Color color,
Stroke stroke)
Adds a shape that cannot be edited by the user, exists simultaneously on all slices, and can only be removed programatically. |
void |
addPoint(Coordinate point,
int color)
Adds a point. |
void |
addROIMaskValue(int xLoc,
int yLoc,
int zLoc,
byte roiVal)
Adds an ROI value at a specified XYZ index coordinate. |
Shape |
addShape(int sliceDirection,
int slice,
int color,
Shape shape)
Add a shape of a specified color within a slice. |
void |
addSpecialPoint(Coordinate point,
Color color)
Adds a point that can be moved by the user but can only be removed programatically. |
Shape |
addSpecialShape(int sliceDirection,
int slice,
Color color,
Shape shape,
Stroke stroke)
Adds a shape that can be edited by the user but can only be removed programatically. |
Coordinate[] |
getPoints(int color)
Gets all points of a specified color. |
ByteBuffer |
getROIMaskBuffer()
Returns the ROI work buffer, for use with advanced methods. |
byte |
getROIMaskValue(int xLoc,
int yLoc,
int zLoc)
Gets an ROI value at a specified XYZ index coordinate. |
byte |
getROISelectedMask()
Returns the "selected" state of the ROI mask. |
byte |
getROIUsedMask()
Returns the "used" state of the ROI mask. |
Shape[] |
getShapes(int sliceDirection,
int slice,
int color)
Gets all shapes of a specified color within a slice. |
Coordinate[] |
getSpecialPoints(Color color)
Gets all special points of a specified color. |
Shape[] |
getSpecialShapes(int sliceDirection,
int slice,
Color color)
Gets all special shapes of a specified color within a slice. |
void |
removePoint(Coordinate point,
int color)
Removes a point. |
void |
removeShape(int sliceDirection,
Shape shape)
Remove a shape. |
void |
removeSpecialPoint(Coordinate point,
Color color)
Removes a special point. |
void |
removeSpecialShape(int sliceDirection,
Shape shape)
Remove a special shape. |
void |
replaceROIMaskValue(int xLoc,
int yLoc,
int zLoc,
byte roiVal)
Replace an ROI value at a specified XYZ index coordinate. |
void |
roiMaskOperationCompleted()
Notifies ROI manager that an ROI operation has been performed. |
void |
roiMaskOperationCompleted(String des)
Notifies ROI manager that an ROI operation has been performed. |
void |
setPointHighlightState(Coordinate point,
Color color,
boolean highlight)
Sets the highlight state of a special point. |
void |
setShapeHighlightState(int sliceDirection,
Shape shape,
boolean highlight)
Sets the highlight state of a special shape. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SLICE_DIRECTION_AXIAL
public static final int SLICE_DIRECTION_CORONAL
public static final int SLICE_DIRECTION_SAGITTAL
Constructor Detail |
---|
protected MangoROI(ROIMaskManager rm, ShapesManager[] sm, ShapesSpecialManager[] ssm, PointsManager pm, PointsSpecialManager psm)
Method Detail |
---|
public void replaceROIMaskValue(int xLoc, int yLoc, int zLoc, byte roiVal)
xLoc
- the X indexyLoc
- the Y indexzLoc
- the Z indexroiVal
- the value to writepublic void addROIMaskValue(int xLoc, int yLoc, int zLoc, byte roiVal)
xLoc
- the X indexyLoc
- the Y indexzLoc
- the Z indexroiVal
- the value to addpublic byte getROIMaskValue(int xLoc, int yLoc, int zLoc)
xLoc
- the X indexyLoc
- the Y indexzLoc
- the Z index
public Shape addShape(int sliceDirection, int slice, int color, Shape shape)
sliceDirection
- axial, coronal, or sagittalslice
- the slice indexcolor
- the color valueshape
- the shape to addpublic Shape addSpecialShape(int sliceDirection, int slice, Color color, Shape shape, Stroke stroke)
sliceDirection
- axial, coronal, or sagittalslice
- the slice indexcolor
- the color valueshape
- the shape to addpublic Shape addImmutableShape(int sliceDirection, int slice, Shape shape, Color color, Stroke stroke)
sliceDirection
- axial, coronal, or sagittalslice
- the slice indexshape
- the shape to addcolor
- the color valuestroke
- the shape line stylepublic Shape addImmutableStaticShape(int sliceDirection, Shape shape, Color color, Stroke stroke)
sliceDirection
- axial, coronal, or sagittalshape
- the shape to addcolor
- the color valuestroke
- the shape line stylepublic void removeShape(int sliceDirection, Shape shape)
sliceDirection
- axial, coronal, or sagittalshape
- the shape to removepublic void removeSpecialShape(int sliceDirection, Shape shape)
sliceDirection
- axial, coronal, or sagittalshape
- the shape to removepublic Shape[] getShapes(int sliceDirection, int slice, int color)
sliceDirection
- axial, coronal, or sagittalslice
- the slice indexcolor
- the color value
public Shape[] getSpecialShapes(int sliceDirection, int slice, Color color)
sliceDirection
- axial, coronal, or sagittalslice
- the slice indexcolor
- the color value
public void setShapeHighlightState(int sliceDirection, Shape shape, boolean highlight)
sliceDirection
- axial, coronal, or sagittalshape
- the shape to changehighlight
- true, to set as highlightedpublic void addPoint(Coordinate point, int color)
point
- the point to addcolor
- the color valuepublic void addSpecialPoint(Coordinate point, Color color)
point
- the point to addcolor
- the color valuepublic void addImmutablePoint(Coordinate point, Color color)
point
- the point to addcolor
- the color valuepublic void removePoint(Coordinate point, int color)
point
- the point to removecolor
- the color valuepublic void removeSpecialPoint(Coordinate point, Color color)
point
- the point to removecolor
- the color valuepublic void setPointHighlightState(Coordinate point, Color color, boolean highlight)
point
- the point to changecolor
- the color valuehighlight
- true, to set as highlightedpublic Coordinate[] getPoints(int color)
color
- the color value
public Coordinate[] getSpecialPoints(Color color)
color
- the color value
public void roiMaskOperationCompleted()
public void roiMaskOperationCompleted(String des)
des
- a short description of the operationpublic byte getROIUsedMask()
public byte getROISelectedMask()
public ByteBuffer getROIMaskBuffer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |