Class TransformedBoxOverlay

    • Constructor Detail

      • TransformedBoxOverlay

        public TransformedBoxOverlay​(TransformedBox bbSource)
    • Method Detail

      • setPerspective

        public void setPerspective​(double perspective)
        Sets the perspective value. perspective < 0 means parallel projection.
        Parameters:
        perspective - the perspective value.
      • showCornerHandles

        public void showCornerHandles​(boolean showCornerHandles)
      • fillIntersection

        public void fillIntersection​(boolean fillIntersection)
      • getFillIntersection

        public boolean getFillIntersection()
      • setIntersectionFillColor

        public void setIntersectionFillColor​(Color intersectionFillColor)
      • setCanvasSize

        public void setCanvasSize​(int width,
                                  int height)
        Description copied from interface: OverlayRenderer
        This is called, when the screen size of the canvas (the component displaying the image and generating mouse events) changes. This can be used to determine scale of overlay or screen coordinates relative to the border.
        Specified by:
        setCanvasSize in interface OverlayRenderer
        Parameters:
        width - the new canvas width.
        height - the new canvas height.
      • boxDisplayMode

        public org.scijava.listeners.ListenableVar<TransformedBoxOverlay.BoxDisplayMode,​org.scijava.listeners.ChangeListener> boxDisplayMode()
        Get/set BoxDisplayMode, which specifies whether to show 3D wireframe box (FULL), or only intersection with viewer plane (SECTION).
      • getHighlightedCornerIndex

        public int getHighlightedCornerIndex()
        Get the index of the highlighted corner (if any).
        Returns:
        corner index or -1 if no corner is highlighted
      • getCornerHighlighter

        public MouseMotionListener getCornerHighlighter()
        Returns a MouseMotionListener that can be installed into a bdv (see ViewerPanel.getDisplay().addHandler(...)). If installed, it will notify a HighlightedCornerListener (see setHighlightedCornerListener(HighlightedCornerListener)) when the mouse is over a corner of the box (with some tolerance)/
        Returns:
        a MouseMotionListener implementing mouse-over for box corners
      • setSourceSize

        public void setSourceSize​(double sourceSize)
        Sets the source size (estimated maximum dimension) in global coordinates. Used for setting up perspective projection.
        Parameters:
        sourceSize - estimated source size in global coordinates