public enum RoiLabel extends Enum<RoiLabel>
Enum Constant and Description |
---|
Centroid |
Index |
Metadata |
Name |
None |
Modifier and Type | Method and Description |
---|---|
String |
createLabel(Roi roi,
int roiIndex)
Generates a string label based on the ROI
|
void |
draw(Graphics2D graphics2D,
Roi roi,
int roiIndex,
Point2D center,
double magnification,
Color foreground,
Color background,
Font font,
boolean drawBackground) |
void |
draw(ij.ImagePlus imp,
ij.process.ImageProcessor ip,
Roi roi,
int roiIndex,
Rectangle r,
Color foreground,
Color background,
Font font,
boolean drawBackground)
Draws a label on an image processor
|
static RoiLabel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RoiLabel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RoiLabel None
public static final RoiLabel Index
public static final RoiLabel Name
public static final RoiLabel Centroid
public static final RoiLabel Metadata
public static RoiLabel[] values()
for (RoiLabel c : RoiLabel.values()) System.out.println(c);
public static RoiLabel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void draw(ij.ImagePlus imp, ij.process.ImageProcessor ip, Roi roi, int roiIndex, Rectangle r, Color foreground, Color background, Font font, boolean drawBackground)
imp
- the imageip
- the target processorroi
- the ROIroiIndex
- the index of the ROIr
- Rectangle where x and y are the centroid (width, height are zero)foreground
- foreground colorbackground
- background colorfont
- the fontdrawBackground
- if a background should be drawnpublic String createLabel(Roi roi, int roiIndex)
roi
- the roiroiIndex
- the index of the roiCopyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.