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 Details

  • Constructor Details

    • WandToolEventHandler

      public WandToolEventHandler(qupath.lib.gui.QuPathGUI qupath)
      Constructor.
      Parameters:
      qupath -
  • Method Details

    • wandTypeProperty

      public static ObjectProperty<WandToolEventHandler.WandType> wandTypeProperty()
      Property specifying whether the wand tool should be influenced by pixel values painted on image overlays.
      Returns:
    • wandUseOverlaysProperty

      public static BooleanProperty 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

      public static DoubleProperty 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

      public static DoubleProperty 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:
      createShape in class qupath.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:
      getBrushDiameter in class qupath.lib.gui.viewer.tools.handlers.BrushToolEventHandler
    • createNewAnnotation

      protected qupath.lib.objects.PathObject createNewAnnotation(MouseEvent arg0, double arg1, double arg2)
    • ensureCursorType

      protected void ensureCursorType(Cursor arg0)
    • requestPixelSnapping

      protected boolean requestPixelSnapping()
    • getViewer

      protected qupath.lib.gui.viewer.QuPathViewer getViewer()
    • mouseLocationToImage

      protected Point2D mouseLocationToImage(MouseEvent arg0, boolean arg1, boolean arg2)
    • requestParentClipping

      protected boolean requestParentClipping(MouseEvent arg0)
    • refineROIByParent

      protected qupath.lib.roi.interfaces.ROI refineROIByParent(qupath.lib.roi.interfaces.ROI arg0)
    • refineGeometryByParent

      protected Geometry refineGeometryByParent(Geometry arg0)
    • 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

      public void mouseClicked(MouseEvent arg0)
    • handle

      public void handle(MouseEvent arg0)
      Specified by:
      handle in interface EventHandler<MouseEvent>