Interface ScreenCoordinateListener

  • All Known Implementing Classes:
    PlaneRender_WM, ViewJComponentDTIImage, ViewJComponentEditImage, ViewJComponentPedsAtlasIconImage, ViewJComponentRegistration, ViewJComponentSingleRegistration, ViewJComponentTriImage

    public interface ScreenCoordinateListener
    ScreenCoordinateListener This interface defines functions that convert mouse coordinates to image file coordinates. ViewJComponentEditImage is an example of a ScreenCoordinateListener. Given input mouse position from a MouseEvent: MouseEvent.getX(), MouseEvent.getY(), and the current image slice (in local coordinates or 0 for 2D images) the ScreenCoordinateListener converts the mouse position to image file coordinates. The ScreenCoordinateListener is responsible for canvas zoom, image file resolutions, and image orientation information that is used to convert the input points. All that information is hidden from the calling function.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      WildMagic.LibFoundation.Mathematics.Vector3f fileToScreenVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kFile)
      Converts image file X,Y,Z coordinates into local screen coordinates.
      int getHeight()
      Returns the height of the display canvas.
      float getResolutionX()
      Returns the image resolution factor in the screen x-direction.
      float getResolutionY()
      Returns the image resolution factor in the screen y-direction.
      int getSlice()
      Returns the currently displayed image slice.
      int getWidth()
      Returns the width of the display canvas.
      float getZoomX()
      Returns the image magnification factor in the screen x-direction.
      float getZoomY()
      Returns the image magnification factor in the screen y-direction.
      WildMagic.LibFoundation.Mathematics.Vector3f patientToScreenVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kPt)
      Converts local patient coordinate view (Axial, Coronal, Sagittal) of the image into the screen coordinates.
      boolean screenToFileVOI​(int iX, int iY, int iZ, WildMagic.LibFoundation.Mathematics.Vector3f kVolumePt)
      Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
      WildMagic.LibFoundation.Mathematics.Vector3f screenToFileVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kScreen)
      Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
      boolean screenToFileVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kScreen, WildMagic.LibFoundation.Mathematics.Vector3f kFile)
      Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
      void setCenter​(WildMagic.LibFoundation.Mathematics.Vector3f center)
      Sets the currently displayed image slice.
    • Method Detail

      • fileToScreenVOI

        WildMagic.LibFoundation.Mathematics.Vector3f fileToScreenVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kFile)
        Converts image file X,Y,Z coordinates into local screen coordinates.
        Parameters:
        kFile - image file coordinates.
        Returns:
        local screen coordinates.
      • getHeight

        int getHeight()
        Returns the height of the display canvas.
        Returns:
        height of the display canvas.
      • getResolutionX

        float getResolutionX()
        Returns the image resolution factor in the screen x-direction.
        Returns:
        image resolution factor in the screen x-direction.
      • getResolutionY

        float getResolutionY()
        Returns the image resolution factor in the screen y-direction.
        Returns:
        image resolution factor in the screen y-direction.
      • getSlice

        int getSlice()
        Returns the currently displayed image slice.
        Returns:
        the currently displayed image slice.
      • setCenter

        void setCenter​(WildMagic.LibFoundation.Mathematics.Vector3f center)
        Sets the currently displayed image slice.
        Parameters:
        the - new image slice.
      • getWidth

        int getWidth()
        Returns the width of the display canvas.
        Returns:
        width of the display canvas.
      • getZoomX

        float getZoomX()
        Returns the image magnification factor in the screen x-direction.
        Returns:
        the image magnification factor in the screen x-direction.
      • getZoomY

        float getZoomY()
        Returns the image magnification factor in the screen y-direction.
        Returns:
        the image magnification factor in the screen y-direction.
      • patientToScreenVOI

        WildMagic.LibFoundation.Mathematics.Vector3f patientToScreenVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kPt)
        Converts local patient coordinate view (Axial, Coronal, Sagittal) of the image into the screen coordinates.
        Parameters:
        kPt - local patient (Axial, Coronal, Sagittal) coordinates.
        Returns:
        screen coordinate representation of the input point.
      • screenToFileVOI

        boolean screenToFileVOI​(int iX,
                                int iY,
                                int iZ,
                                WildMagic.LibFoundation.Mathematics.Vector3f kVolumePt)
        Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
        Parameters:
        iX - input X position in local screen coordinates.
        iY - input Y position in local screen coordinates.
        iZ - input slice position in the local image orientation, or z=0 for 2D images.
        kVolumePt - image file coordinates return value.
        Returns:
        returns true if the screen coordinate is clipped (is outside the displayed image space).
      • screenToFileVOI

        WildMagic.LibFoundation.Mathematics.Vector3f screenToFileVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kScreen)
        Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
        Parameters:
        kScreen - input X,Y,Z position in local screen coordinates, where z = local image slice or 0 for 2D images.
        Returns:
        image file coordinates.
      • screenToFileVOI

        boolean screenToFileVOI​(WildMagic.LibFoundation.Mathematics.Vector3f kScreen,
                                WildMagic.LibFoundation.Mathematics.Vector3f kFile)
        Converts local screen coordinates, usually from a MouseEvent, into image file coordinates.
        Parameters:
        kScreen - input X,Y,Z position in local screen coordinates, where z = local image slice or 0 for 2D images.
        kFile - image file coordinates return value.
        Returns:
        true if the screen coordinate is clipped (is outside the displayed image space).