public class RoiDrawer extends Object implements JIPipeParameterCollection
ROIListData
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(RoiDrawer other) |
ij.ImagePlus |
draw(ij.ImagePlus reference,
ROIListData roisToDraw,
JIPipeProgressInfo progressInfo) |
static void |
drawLabelOnGraphics(String text,
Graphics2D graphics2D,
double centroidX,
double centroidY,
double magnification,
Color foreground,
Color background,
Font font,
boolean drawBackground)
Draws a label on graphics
|
void |
drawOnProcessor(ROIListData roisToDraw,
ij.process.ColorProcessor processor,
ImageSliceIndex index,
Set<Roi> roisToHighlight)
Draws rois on a processor
|
void |
drawOverlayOnGraphics(ROIListData roisToDraw,
Graphics2D graphics2D,
Rectangle renderArea,
ImageSliceIndex index,
Set<Roi> roisToHighlight,
double magnification)
Draws ROI as overlay.
|
ROIListData |
filterVisibleROI(ROIListData rois,
ImageSliceIndex index)
Uses the current settings to filter ROI based on visibility within the current image index
|
ROIElementDrawingMode |
getDrawFilledOutlineMode() |
RoiLabel |
getDrawnLabel() |
ROIElementDrawingMode |
getDrawOutlineMode() |
EventBus |
getEventBus()
Gets the event bus that posts events about the parameters
|
OptionalColorParameter |
getLabelBackground() |
FontFamilyParameter |
getLabelFontFamily() |
Color |
getLabelForeground() |
int |
getLabelSize() |
double |
getOpacity() |
OptionalColorParameter |
getOverrideFillColor() |
OptionalColorParameter |
getOverrideLineColor() |
OptionalDoubleParameter |
getOverrideLineWidth() |
boolean |
isDrawOver() |
boolean |
isIgnoreC() |
boolean |
isIgnoreT() |
boolean |
isIgnoreZ() |
void |
setDrawFilledOutlineMode(ROIElementDrawingMode drawFilledOutlineMode) |
void |
setDrawnLabel(RoiLabel drawnLabel) |
void |
setDrawOutlineMode(ROIElementDrawingMode drawOutlineMode) |
void |
setDrawOver(boolean drawOver) |
void |
setIgnoreC(boolean ignoreC) |
void |
setIgnoreT(boolean ignoreT) |
void |
setIgnoreZ(boolean ignoreZ) |
void |
setLabelBackground(OptionalColorParameter labelBackground) |
void |
setLabelFontFamily(FontFamilyParameter labelFontFamily) |
void |
setLabelForeground(Color labelForeground) |
boolean |
setLabelSize(int labelSize) |
boolean |
setOpacity(double opacity) |
void |
setOverrideFillColor(OptionalColorParameter overrideFillColor) |
void |
setOverrideLineColor(OptionalColorParameter overrideLineColor) |
void |
setOverrideLineWidth(OptionalDoubleParameter overrideLineWidth) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, isParameterUIVisible, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChange
public RoiDrawer()
public RoiDrawer(RoiDrawer other)
public static void drawLabelOnGraphics(String text, Graphics2D graphics2D, double centroidX, double centroidY, double magnification, Color foreground, Color background, Font font, boolean drawBackground)
text
- the textgraphics2D
- the graphicscentroidX
- the x location (centroid)centroidY
- the y location (centroid)magnification
- the magnificationforeground
- the foregroundbackground
- the backgroundfont
- the fontdrawBackground
- if a background should be drawnpublic void copyFrom(RoiDrawer other)
public EventBus getEventBus()
JIPipeParameterCollection
getEventBus
in interface JIPipeParameterCollection
JIPipeParameterCollection.ParameterChangedEvent
and JIPipeParameterCollection.ParameterStructureChangedEvent
public double getOpacity()
public boolean setOpacity(double opacity)
public ROIElementDrawingMode getDrawOutlineMode()
public void setDrawOutlineMode(ROIElementDrawingMode drawOutlineMode)
public ROIElementDrawingMode getDrawFilledOutlineMode()
public void setDrawFilledOutlineMode(ROIElementDrawingMode drawFilledOutlineMode)
public FontFamilyParameter getLabelFontFamily()
public void setLabelFontFamily(FontFamilyParameter labelFontFamily)
public RoiLabel getDrawnLabel()
public void setDrawnLabel(RoiLabel drawnLabel)
public Color getLabelForeground()
public void setLabelForeground(Color labelForeground)
public OptionalColorParameter getLabelBackground()
public void setLabelBackground(OptionalColorParameter labelBackground)
public int getLabelSize()
public boolean setLabelSize(int labelSize)
public OptionalColorParameter getOverrideFillColor()
public void setOverrideFillColor(OptionalColorParameter overrideFillColor)
public OptionalColorParameter getOverrideLineColor()
public void setOverrideLineColor(OptionalColorParameter overrideLineColor)
public OptionalDoubleParameter getOverrideLineWidth()
public void setOverrideLineWidth(OptionalDoubleParameter overrideLineWidth)
public boolean isDrawOver()
public void setDrawOver(boolean drawOver)
public boolean isIgnoreZ()
public void setIgnoreZ(boolean ignoreZ)
public boolean isIgnoreC()
public void setIgnoreC(boolean ignoreC)
public boolean isIgnoreT()
public void setIgnoreT(boolean ignoreT)
public ij.ImagePlus draw(ij.ImagePlus reference, ROIListData roisToDraw, JIPipeProgressInfo progressInfo)
public void drawOnProcessor(ROIListData roisToDraw, ij.process.ColorProcessor processor, ImageSliceIndex index, Set<Roi> roisToHighlight)
roisToDraw
- the ROIs to drawprocessor
- the target processorindex
- the index of the slice (zero-based)roisToHighlight
- ROIs to highlight (will be drawn again, while other ROIs are toned down)public ROIListData filterVisibleROI(ROIListData rois, ImageSliceIndex index)
rois
- the ROIindex
- the current image indexpublic void drawOverlayOnGraphics(ROIListData roisToDraw, Graphics2D graphics2D, Rectangle renderArea, ImageSliceIndex index, Set<Roi> roisToHighlight, double magnification)
ImageCanvas
(ic) field is setroisToDraw
- the ROI to drawgraphics2D
- the graphicsrenderArea
- area where the ROI are renderedindex
- position of the ROI (zero-based)roisToHighlight
- highlighted ROImagnification
- the magnificationCopyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.