|
|||||||||
| 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.IrregularROI
com.xinapse.multisliceimage.roi.ContourROI
public class ContourROI
A class for edge detection and contour following. A ContourROI is an IrregularROI formed by contour following, at a certain intensity level on an image slice. The intensity level can be retrieved from the ContourROI using its getLevel() method.
The points that form the vertices of a contour are always on the boundaries between pixels (of the image on which the contour was formed).
A contour may be formed on any type of image. For colour images (PixelDataType.RGB_BY_PLANE, PixelDataType.RGB_INTERLACED, PixelDataType.COLOURPACKED) contouring is performed on the luminance value (= (0.299 * Red) + (0.587 * Green) + (0.114 * Blue)). For PixelDataType.COMPLEX images, contouring is performed on the real part, imaginary part, magnitude or phase of the image, depending on the ComplexMode argument to the contouring method.
| Field Summary | |
|---|---|
static int |
SEARCH_SIZE
The size of the area of pixels to search for the maximum gradient. |
| Fields inherited from class com.xinapse.multisliceimage.roi.IrregularROI |
|---|
nPoints, POINTSTOKEN, xpts, ypts |
| Fields inherited from class com.xinapse.multisliceimage.roi.ROI |
|---|
handles, PREFERENCES_NODE_NAME, XTOKEN, YTOKEN |
| Method Summary | |
|---|---|
static javax.swing.Icon |
getButtonIcon()
Returns an Icon that can be used for a button to create this type of ROI. |
static InteractionType |
getCreateInteractionType()
Returns the type of interaction needed to create a ContouredROI. |
java.lang.String |
getDescription()
Return a description of this type of ROI. |
static java.util.List<ContourROI> |
getInstances(java.lang.Object pixels,
PixelDataType dataType,
ComplexMode complexMode,
BitSet mask,
int slice,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
byte userColour,
double level,
IntensityRelation intensityRelation,
boolean pixelSnap,
boolean snapCentre)
Returns a java.util.List of ContourROIs that form all the contours at a certain intensity level on a slice of pixels. |
static java.util.List<ROI> |
getInstances(javax.vecmath.Point3i startPoint,
ContourMode contourMode,
double level,
IntensityRelation intensityRelation,
boolean threeDEdgeDetection,
boolean threeDPropagation,
int plusMinusSlices,
java.lang.Object pixels,
PixelDataType dataType,
ComplexMode complexMode,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
byte userColour,
boolean pixelSnap,
boolean snapCentre,
ContourWorker contourWorker)
Create a ContourROI by contouring from a start point on the image. |
double |
getLevel()
Returns the intensity level that this ContourROI followed. |
static java.lang.String |
getName()
Returns the name of the type of ROI. |
static void |
main(java.lang.String[] args)
Run the self-test on this class. |
| Methods inherited from class com.xinapse.multisliceimage.roi.IrregularROI |
|---|
clone, closestPoints, contains, deleteVertex, dilate, draw, drawInOrthoView, equals, erasePoints, flipHorizontal, flipVertical, getCentre, getCopy, getFeret, getFollowingHandle, getNPoints, getPerimeter, getPrecedingHandle, getTheta, getVertex, getVertexHandles, getVertices, hashCode, insertTwoVertices, intersects, join, makeConvex, move, move, moveVertex, selfIntersects, set, setTheta, setVertex, setVertices, setVertices, setVertices, setVertices, toString |
| Methods inherited from class com.xinapse.multisliceimage.roi.ROI |
|---|
add, add, addMorphological, clearDeletionHistory, clearStats, dilate, exclusiveOr, getAnnotation, getBoundingRectangle, getBoundingRectangle, getCachedStatistics, getClasses, getColor, getDisplayedBounds2D, getDisplayedBounds2D, getDisplayedRoiArea, getFeret, getHandles, getHandleUnderPoint, getImageSource, getPixelValue, getROIs, getROIs, getROIs, getSlice, getState, getStats, getStats, getStats, getTextColor, getTextFontSize, getUserColour, intersect, isDeleted, isEditable, isReloaded, isSelected, join, markDeleted, mmPosToPix, moveROIs, pixPosToMm, printStats, selectDeselect, setAnnotation, setCreationHistory, setSlice, setState, setTextColor, setTextSize, setUserColour, subtract, subtract, write, write |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.xinapse.multisliceimage.roi.StretchableROI |
|---|
getDisplayedBounds2D |
| Field Detail |
|---|
public static final int SEARCH_SIZE
| Method Detail |
|---|
public double getLevel()
public static InteractionType getCreateInteractionType()
public static java.util.List<ROI> getInstances(javax.vecmath.Point3i startPoint,
ContourMode contourMode,
double level,
IntensityRelation intensityRelation,
boolean threeDEdgeDetection,
boolean threeDPropagation,
int plusMinusSlices,
java.lang.Object pixels,
PixelDataType dataType,
ComplexMode complexMode,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
byte userColour,
boolean pixelSnap,
boolean snapCentre,
ContourWorker contourWorker)
throws ROIException,
CancelledException
startPoint - the starting location (mouse click point, in image pixel coordinates)
within the image slice from which edge detection or contour following is initiated.contourMode - the ContourMode for finding the start point of the contour.level - the intensity level.intensityRelation - the intensity relationship between the contoured feature
and the background.threeDEdgeDetection - whether edge detection should be in 3-D.threeDPropagation - whether contour propagation should be in 3-D.plusMinusSlices - for 3-D propagation, the maximum number of slices either side
of the seed slice to propagate.pixels - the arrays of image intensity values.dataType - the PixelDataType of the image pixels.complexMode - the ComplexMode for contouring on Complex images.nCols - the number of columns in the image.nRows - the number of rows in the image.nSlices - the number of slices in the image.pixelXSize - the width of an image pixel.pixelYSize - the height of an image pixel.pixelZSize - the depth of an image pixel.userColour - an index into the palette of user-defined ROI colours.pixelSnap - whether to snap the contours to the nearest pixel corners/centres.snapCentre - if true, snap to the centre of pixels; if false snap to the corners.contourWorker - if non-null, a check is made of contourWorker to see if
creation of contours has been cancelled. Cancellation causes a
com.xinapse.util.CancelledException to be thrown.
ROIException - if contour following fails.
CancelledException - if contouring is cancelled by the user, or programmatically.
public static java.util.List<ContourROI> getInstances(java.lang.Object pixels,
PixelDataType dataType,
ComplexMode complexMode,
BitSet mask,
int slice,
int nCols,
int nRows,
float pixelXSize,
float pixelYSize,
byte userColour,
double level,
IntensityRelation intensityRelation,
boolean pixelSnap,
boolean snapCentre)
pixels - the 1-D array of pixels representing a 2- or more dimensional raster
of intensities.dataType - the PixelDataType of the image pixels.complexMode - the ComplexMode for contouring on Complex images.mask - a binary mask of pixels to be considered for contouring.slice - the image slice on which the contours will be formed.nCols - the number of columns in the image.nRows - the number of rows in the image.pixelXSize - the width of an image pixel.pixelYSize - the height of an image pixel.userColour - an index into the palette of user-defined ROI colours.level - the intensity level of the contours.intensityRelation - the intensity relationship between the contoured feature
and the background.
public java.lang.String getDescription()
ROI
getDescription in class IrregularROIpublic static java.lang.String getName()
public static void main(java.lang.String[] args)
args - the program arguments. The first argument should be the name of an image for which
contours will be created. Contour will only be created for the first slice of the image.
The second argument should be the name of an ROI file for the ContourROIs created.public static javax.swing.Icon getButtonIcon()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||