Class MultiDThreePanesCanvas

java.lang.Object
java.awt.Component
java.awt.Canvas
ij.gui.ImageCanvas
sc.fiji.snt.hyperpanes.MultiDThreePanesCanvas
All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, Cloneable, EventListener, Accessible
Direct Known Subclasses:
TracerCanvas

public class MultiDThreePanesCanvas extends ij.gui.ImageCanvas
Canvas for displaying and interacting with multiple planes in 3D space, providing synchronized visualization and navigation across orthogonal projections.
See Also:
  • Field Details

    • owner

      protected PaneOwner owner
    • plane

      protected int plane
    • waitingForRoiDrawing

      protected boolean waitingForRoiDrawing
    • cursorLocked

      protected boolean cursorLocked
  • Constructor Details

    • MultiDThreePanesCanvas

      protected MultiDThreePanesCanvas(ij.ImagePlus imagePlus, PaneOwner owner, int plane)
  • Method Details

    • setZoom

      protected void setZoom(double zoomFactor)
    • drawOverlay

      protected void drawOverlay(Graphics2D g)
    • getCursorPos

      public PointInCanvas getCursorPos()
      Returns:
      the current X,Y position of the mouse cursor
    • getGraphics2D

      public Graphics2D getGraphics2D(Graphics g)
    • triggerZoomEvent

      protected void triggerZoomEvent(boolean in, int off_screen_x, int off_screen_y)
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class ij.gui.ImageCanvas
    • zoomIn

      public void zoomIn(int sx, int sy)
      Overrides:
      zoomIn in class ij.gui.ImageCanvas
    • zoomOut

      public void zoomOut(int sx, int sy)
      Overrides:
      zoomOut in class ij.gui.ImageCanvas
    • drawCrosshairs

      protected void drawCrosshairs(Graphics2D g, double x_on_screen, double y_on_screen)
    • updatePosition

      public void updatePosition(double x, double y, double z)
    • setCrosshairs

      @Deprecated public void setCrosshairs(double x, double y, double z, boolean display)
      Deprecated.
    • updateCursor

      public void updateCursor(double x, double y, double z)
    • scrollTo

      public void scrollTo(int newOffscreenX, int newOffscreenY)
    • myOffScreenX

      public int myOffScreenX(int sx)
      Converts a screen x-coordinate to an offscreen (image) x-coordinate.
      Parameters:
      sx - the screen x coordinate
      Returns:
      the image x coordinate
    • myOffScreenY

      public int myOffScreenY(int sy)
      Converts a screen y-coordinate to an offscreen (image) y-coordinate.
      Parameters:
      sy - the screen y coordinate
      Returns:
      the image y coordinate
    • myOffScreenXD

      public double myOffScreenXD(int sx)
      Converts a screen x-coordinate to a floating-point offscreen (image) x-coordinate.
      Parameters:
      sx - the screen x coordinate
      Returns:
      the image x coordinate
    • myOffScreenYD

      public double myOffScreenYD(int sy)
      Converts a screen y-coordinate to a floating-point offscreen (image) y-coordinate.
      Parameters:
      sy - the screen y coordinate
      Returns:
      the image y coordinate
    • myScreenX

      public int myScreenX(int ox)
      Converts an offscreen (image) x-coordinate to a screen x-coordinate.
      Parameters:
      ox - the image x coordinate
      Returns:
      the screen x coordinate
    • myScreenY

      public int myScreenY(int oy)
      Converts an offscreen (image) y-coordinate to a screen y-coordinate.
      Parameters:
      oy - the image y coordinate
      Returns:
      the screen y coordinate
    • myScreenXD

      public int myScreenXD(double ox)
      Converts a floating-point offscreen (image) x-coordinate to a screen x-coordinate.
      Parameters:
      ox - the image x coordinate
      Returns:
      the screen x coordinate
    • myScreenXDprecise

      public double myScreenXDprecise(double ox)
      Converts an offscreen (image) x-coordinate to a screen x-coordinate with floating-point precision.
      Parameters:
      ox - the image x coordinate
      Returns:
      the screen x coordinate
    • myScreenYD

      public int myScreenYD(double oy)
      Converts a floating-point offscreen (image) x-coordinate to a screen x-coordinate.
      Parameters:
      oy - the image x coordinate
      Returns:
      the screen x coordinate
    • myScreenYDprecise

      public double myScreenYDprecise(double oy)
      Converts an offscreen (image) y-coordinate to a screen y-coordinate with floating-point precision.
      Parameters:
      oy - the image y coordinate
      Returns:
      the screen y coordinate
    • restoreDefaultCursor

      public void restoreDefaultCursor()
    • setCanvasLabel

      public void setCanvasLabel(String label)
      Sets the string to be rendered on canvas' upper left corner.
      Parameters:
      label - the string to be displayed
    • setCanvasLabelBackground

      public void setCanvasLabelBackground(Color color)
      Sets the background color for the canvas label. When non-null, the label is drawn with dark text on the specified background (useful for warnings). When null, the default semi-transparent gray background is used.
      Parameters:
      color - the background color, or null to reset to default
    • getCanvasLabel

      public String getCanvasLabel()
      Returns the string currently rendered on canvas' upper left corner.
      Returns:
      the current label, or null if none
    • setCursorText

      public void setCursorText(String cursorText)
      Sets the string to be appended to the current cursor.
      Parameters:
      cursorText - the string to be displayed around the cursor
    • setAnnotationsColor

      public void setAnnotationsColor(Color color)
    • getAnnotationsColor

      public Color getAnnotationsColor()
    • getViewPort

      public BoundingBox getViewPort()
    • isEventsDisabled

      public boolean isEventsDisabled()
      Returns:
      whether SNT is being notified of mouse/key events
    • disableEvents

      public void disableEvents(boolean disable)
      Sets whether mouse and key events should be waived back to IJ.
      Parameters:
      disable - If true, SNT will not be notified of mouse/keyboard events
    • setLockCursor

      protected void setLockCursor(boolean lock)
    • setDrawCrosshairs

      public void setDrawCrosshairs(boolean drawCrosshairs)