public class MaskDrawerPlugin extends ImageViewerPanelPlugin
Modifier and Type | Class and Description |
---|---|
static class |
MaskDrawerPlugin.MaskChangedEvent |
static class |
MaskDrawerPlugin.MaskColor |
Modifier and Type | Field and Description |
---|---|
static Stroke |
STROKE_GUIDE_LINE |
Constructor and Description |
---|
MaskDrawerPlugin(ImageViewerPanel viewerPanel) |
Modifier and Type | Method and Description |
---|---|
void |
clearCurrentMask() |
void |
createPalettePanel(FormPanel formPanel)
Called when the form panel should be recreated
|
String |
getCategory()
The tool panel category where this tool is shown
|
Icon |
getCategoryIcon()
The icon for the category if a new one must be created
|
MaskDrawerPlugin.MaskColor |
getCurrentColor() |
ij.process.ImageProcessor |
getCurrentMaskSlice() |
MaskDrawerTool |
getCurrentTool() |
Color |
getHighlightColor() |
ij.ImagePlus |
getMask() |
Color |
getMaskColor() |
Function<ij.ImagePlus,ij.ImagePlus> |
getMaskGenerator() |
Ribbon |
getRibbon() |
void |
installTool(MaskDrawerTool tool) |
void |
onImageChanged()
Called when the current image is changed
|
void |
onSliceChanged(boolean deferUploadSlice)
Called when the current slice is changed
|
void |
onToolChanged(ImageViewerPanelCanvas.ToolChangedEvent event) |
void |
postprocessDraw(Graphics2D graphics2D,
Rectangle renderArea,
ImageSliceIndex sliceIndex)
Called after the image has been drawn after the image has been drawn
|
void |
postprocessDrawForExport(BufferedImage image,
ImageSliceIndex sliceIndex,
double magnification)
Called while exporting the image slice.
|
void |
recalculateMaskPreview() |
void |
setCurrentColor(MaskDrawerPlugin.MaskColor currentColor) |
void |
setHighlightColor(Color highlightColor) |
void |
setMask(ij.ImagePlus mask) |
void |
setMaskColor(Color maskColor) |
void |
setMaskGenerator(Function<ij.ImagePlus,ij.ImagePlus> maskGenerator) |
beforeDraw, draw, getCurrentImage, getCurrentSlice, getCurrentSlicePosition, getViewerPanel, getWorkbench, uploadSliceToCanvas
public static final Stroke STROKE_GUIDE_LINE
public MaskDrawerPlugin(ImageViewerPanel viewerPanel)
public void installTool(MaskDrawerTool tool)
public Color getHighlightColor()
public void setHighlightColor(Color highlightColor)
public void recalculateMaskPreview()
public void onImageChanged()
ImageViewerPanelPlugin
onImageChanged
in class ImageViewerPanelPlugin
public void onSliceChanged(boolean deferUploadSlice)
ImageViewerPanelPlugin
onSliceChanged
in class ImageViewerPanelPlugin
deferUploadSlice
- if true, uploading the slice to the canvas should be deferredpublic void createPalettePanel(FormPanel formPanel)
ImageViewerPanelPlugin
createPalettePanel
in class ImageViewerPanelPlugin
formPanel
- the form panelpublic Ribbon getRibbon()
public ij.ImagePlus getMask()
public void setMask(ij.ImagePlus mask)
public ij.process.ImageProcessor getCurrentMaskSlice()
public void clearCurrentMask()
public void postprocessDraw(Graphics2D graphics2D, Rectangle renderArea, ImageSliceIndex sliceIndex)
ImageViewerPanelPlugin
postprocessDraw
in class ImageViewerPanelPlugin
graphics2D
- the graphicsrenderArea
- the render areasliceIndex
- the index of the slicepublic void postprocessDrawForExport(BufferedImage image, ImageSliceIndex sliceIndex, double magnification)
ImageViewerPanelPlugin
postprocessDrawForExport
in class ImageViewerPanelPlugin
image
- the imagesliceIndex
- the slicemagnification
- the magnificationpublic String getCategory()
ImageViewerPanelPlugin
getCategory
in class ImageViewerPanelPlugin
public Icon getCategoryIcon()
ImageViewerPanelPlugin
getCategoryIcon
in class ImageViewerPanelPlugin
public MaskDrawerPlugin.MaskColor getCurrentColor()
public void setCurrentColor(MaskDrawerPlugin.MaskColor currentColor)
public MaskDrawerTool getCurrentTool()
public void onToolChanged(ImageViewerPanelCanvas.ToolChangedEvent event)
public Color getMaskColor()
public void setMaskColor(Color maskColor)
public Function<ij.ImagePlus,ij.ImagePlus> getMaskGenerator()
public void setMaskGenerator(Function<ij.ImagePlus,ij.ImagePlus> maskGenerator)
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.