Package qupath.process.gui
Class WandToolEventHandler
java.lang.Object
qupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
qupath.process.gui.WandToolEventHandler
- All Implemented Interfaces:
EventListener,EventHandler<MouseEvent>
public class WandToolEventHandler
extends qupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
Wand tool, which acts rather like the brush - except that it expands regions
(sometimes rather too eagerly?) based upon local pixel values.
-
Property Summary
PropertiesTypePropertyDescriptionstatic DoublePropertyProperty representing the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.static DoublePropertyProperty representing the Gaussian sigma value used to smooth the image when applying the wand.Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.static BooleanPropertyProperty specifying whether the wand tool should be influenced by pixel values painted on image overlays. -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumEnum reflecting different color images that may be used by the Wand tool. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected qupath.lib.objects.PathObjectcreateNewAnnotation(MouseEvent arg0, double arg1, double arg2) protected GeometrycreateShape(MouseEvent e, double x, double y, boolean useTiles, Geometry addToShape) protected voidensureCursorType(Cursor arg0) protected doubleDon't actually need the diameter for calculations here, but it's helpful for setting the cursorprotected qupath.lib.objects.PathObjectprotected qupath.lib.gui.viewer.QuPathViewerstatic doubleQuery the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.static doubleQuery the Gaussian sigma value used to smooth the image when applying the wand.static booleanQuery whether the wand tool should be influenced by pixel values painted on image overlays.voidhandle(MouseEvent arg0) voidmouseClicked(MouseEvent arg0) protected Point2DmouseLocationToImage(MouseEvent arg0, boolean arg1, boolean arg2) protected Geometryprotected qupath.lib.roi.interfaces.ROIrefineROIByParent(qupath.lib.roi.interfaces.ROI arg0) protected booleanprotected booleanprotected voidstatic voidsetWandSensitivity(double sensitivity) Set the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.static voidsetWandSigmaPixels(double sigma) Set the Gaussian sigma value used to smooth the image when applying the wand.static voidsetWandUseOverlays(boolean useOverlays) Set whether the wand tool should be influenced by pixel values painted on image overlays.protected voidupdatingConstrainingObjects(qupath.lib.gui.viewer.QuPathViewer arg0, double arg1, double arg2, Collection<qupath.lib.objects.PathObject> arg3) static DoublePropertyProperty representing the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.static DoublePropertyProperty representing the Gaussian sigma value used to smooth the image when applying the wand.Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.static BooleanPropertyProperty specifying whether the wand tool should be influenced by pixel values painted on image overlays.Methods inherited from class qupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
createNewROI, getGeometryFactory, getRequestedCursor, isSubtractMode, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, preferReturnToMove
-
Property Details
-
wandType
Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.- See Also:
-
wandUseOverlays
Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.- See Also:
-
wandSigmaPixels
Property representing the Gaussian sigma value used to smooth the image when applying the wand.- See Also:
-
wandSensitivity
Property representing the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.- See Also:
-
-
Constructor Details
-
WandToolEventHandler
public WandToolEventHandler(qupath.lib.gui.QuPathGUI qupath) Constructor.- Parameters:
qupath-
-
-
Method Details
-
wandTypeProperty
Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.- Returns:
-
wandUseOverlaysProperty
Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.- Returns:
- See Also:
-
getWandUseOverlays
public static boolean getWandUseOverlays()Query whether the wand tool should be influenced by pixel values painted on image overlays.If false, only RGB values of the underlying image will be used.
- Returns:
-
setWandUseOverlays
public static void setWandUseOverlays(boolean useOverlays) Set whether the wand tool should be influenced by pixel values painted on image overlays. If false, only RGB values of the underlying image will be used.- Parameters:
useOverlays-
-
wandSigmaPixelsProperty
Property representing the Gaussian sigma value used to smooth the image when applying the wand.- Returns:
- See Also:
-
getWandSigmaPixels
public static double getWandSigmaPixels()Query the Gaussian sigma value used to smooth the image when applying the wand.- Returns:
-
setWandSigmaPixels
public static void setWandSigmaPixels(double sigma) Set the Gaussian sigma value used to smooth the image when applying the wand.- Parameters:
sigma-
-
wandSensitivityProperty
Property representing the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.- Returns:
- See Also:
-
getWandSensitivity
public static double getWandSensitivity()Query the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.- Returns:
-
setWandSensitivity
public static void setWandSensitivity(double sensitivity) Set the wand sensitivity value, which influences how similar local intensity values must be for the wand region growing.- Parameters:
sensitivity-
-
createShape
protected Geometry createShape(MouseEvent e, double x, double y, boolean useTiles, Geometry addToShape) - Overrides:
createShapein classqupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
-
getBrushDiameter
protected double getBrushDiameter()Don't actually need the diameter for calculations here, but it's helpful for setting the cursor- Overrides:
getBrushDiameterin classqupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
-
createNewAnnotation
protected qupath.lib.objects.PathObject createNewAnnotation(MouseEvent arg0, double arg1, double arg2) -
ensureCursorType
-
requestPixelSnapping
protected boolean requestPixelSnapping() -
getViewer
protected qupath.lib.gui.viewer.QuPathViewer getViewer() -
mouseLocationToImage
-
requestParentClipping
-
refineROIByParent
protected qupath.lib.roi.interfaces.ROI refineROIByParent(qupath.lib.roi.interfaces.ROI arg0) -
refineGeometryByParent
-
updatingConstrainingObjects
protected void updatingConstrainingObjects(qupath.lib.gui.viewer.QuPathViewer arg0, double arg1, double arg2, Collection<qupath.lib.objects.PathObject> arg3) -
resetConstrainingObjects
protected void resetConstrainingObjects() -
getCurrentParent
protected qupath.lib.objects.PathObject getCurrentParent() -
mouseClicked
-
handle
- Specified by:
handlein interfaceEventHandler<MouseEvent>
-