public class MaskDrawerPlugin2D extends JIPipeImageViewerPlugin2D
Modifier and Type | Class and Description |
---|---|
static class |
MaskDrawerPlugin2D.MaskChangedEvent |
static class |
MaskDrawerPlugin2D.MaskColor |
Modifier and Type | Field and Description |
---|---|
static Stroke |
STROKE_GUIDE_LINE |
Constructor and Description |
---|
MaskDrawerPlugin2D(JIPipeImageViewer viewerPanel) |
Modifier and Type | Method and Description |
---|---|
void |
clearCurrentMask() |
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
|
MaskDrawerPlugin2D.MaskColor |
getCurrentColor() |
ij.process.ImageProcessor |
getCurrentMaskSlice() |
MaskDrawer2DTool |
getCurrentTool() |
Color |
getHighlightColor() |
ij.ImagePlus |
getMask() |
Color |
getMaskColor() |
Function<ij.ImagePlus,ij.ImagePlus> |
getMaskGenerator() |
Ribbon |
getRibbon() |
void |
initializeSettingsPanel(FormPanel formPanel)
Called when the form panel should be recreated
|
void |
installTool(MaskDrawer2DTool tool) |
void |
onImageChanged()
Called when the current image is changed
|
void |
onSliceChanged(boolean deferUploadSlice)
Called when the current slice is changed
|
void |
onToolChanged(ImageViewerPanelCanvas2D.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(MaskDrawerPlugin2D.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, getCurrentSlice, getCurrentSlicePosition, getViewerPanel2D, uploadSliceToCanvas
getCurrentImage, getCurrentImagePlus, getDataSource, getViewerPanel, getWorkbench, onOverlayAdded, onOverlayRemoved, onOverlaysCleared
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
public static final Stroke STROKE_GUIDE_LINE
public MaskDrawerPlugin2D(JIPipeImageViewer viewerPanel)
public void installTool(MaskDrawer2DTool tool)
public Color getHighlightColor()
public void setHighlightColor(Color highlightColor)
public void recalculateMaskPreview()
public void onImageChanged()
JIPipeImageViewerPlugin
onImageChanged
in class JIPipeImageViewerPlugin
public void onSliceChanged(boolean deferUploadSlice)
JIPipeImageViewerPlugin2D
onSliceChanged
in class JIPipeImageViewerPlugin2D
deferUploadSlice
- if true, uploading the slice to the canvas should be deferredpublic void initializeSettingsPanel(FormPanel formPanel)
JIPipeImageViewerPlugin
initializeSettingsPanel
in class JIPipeImageViewerPlugin
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)
JIPipeImageViewerPlugin2D
postprocessDraw
in class JIPipeImageViewerPlugin2D
graphics2D
- the graphicsrenderArea
- the render areasliceIndex
- the index of the slicepublic void postprocessDrawForExport(BufferedImage image, ImageSliceIndex sliceIndex, double magnification)
JIPipeImageViewerPlugin2D
postprocessDrawForExport
in class JIPipeImageViewerPlugin2D
image
- the imagesliceIndex
- the slicemagnification
- the magnificationpublic String getCategory()
JIPipeImageViewerPlugin
getCategory
in class JIPipeImageViewerPlugin
public Icon getCategoryIcon()
JIPipeImageViewerPlugin
getCategoryIcon
in class JIPipeImageViewerPlugin
public MaskDrawerPlugin2D.MaskColor getCurrentColor()
public void setCurrentColor(MaskDrawerPlugin2D.MaskColor currentColor)
public MaskDrawer2DTool getCurrentTool()
public void onToolChanged(ImageViewerPanelCanvas2D.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–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.