Class ViewJComponentTriImage

All Implemented Interfaces:
PaintGrowListener, ScreenCoordinateListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, EventListener

public class ViewJComponentTriImage extends ViewJComponentEditImage implements MouseWheelListener, KeyListener, ScreenCoordinateListener
One of the component images that make up the triplanar view (AXIAL, SAGITTAL, and CORONAL views).

Notes:
The protractor does not show up in ViewJComponentEditImage because it is not registered. If newVOI is hit, then the VOI must be registered for the points to show up in EditImage.

For the ViewJFrameTriImage addPoint command, that the ViewJComponentEditImage mode is set to DEFAULT while the ViewJComponentTriImage mode is set to POINT_VOI. For the Protractor command, the ViewJComponentTriImage mode is set to PROTRACTOR while the ViewJComponentEditImage mode is set to DEFAULT. For the Line command, the ViewJComponentTriImage mode is set to LINE while the ViewJComponentEditImage mode is set to DEFAULT. For the ViewJFrameTriImage center command, the ViewJComponentEditImage mode is set to DEFAULT while the ViewJComponentTriImage mode is set to CENTER_VOI. For the boundingBox command, the ViewJComponentEdit image mode is set to DEFAULT while the ViewJComponentTriImage mode is set to CUBE_BOUNDS. For the traverse command, both EditImage and TriImage have their modes set to DEFAULT. NEW_VOI, PAINT_VOI, DROPPER_PAINT, ERASER_PAINT, and PAINT_CAN are set in both EditImage and TriImage.

Author:
William Gandler
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • SUPERIOR_EDGE

      public static final int SUPERIOR_EDGE
      AC-PC: Superior Edge reference point. Used for conversions by the dialogs that create new AC-PC images.
      See Also:
    • POSTERIOR_MARGIN

      public static final int POSTERIOR_MARGIN
      AC-PC: Posterior Margin reference point. Used for conversions by the dialogs that create new AC-PC images.
      See Also:
    • INFERIOR_EDGE

      public static final int INFERIOR_EDGE
      AC-PC: Inferior Edge reference point. Used for conversions by the dialogs that create new AC-PC images.
      See Also:
    • FIRST_PT

      public static final int FIRST_PT
      AC-PC: First midsagittal reference point. Used for conversions by the dialogs that create new AC-PC images.
      See Also:
    • ANOTHER_PT

      public static final int ANOTHER_PT
      AC-PC: Another midsagittal reference point. Used for conversions by the dialogs that create new AC-PC images.
      See Also:
    • ANTERIOR_PT

      public static final int ANTERIOR_PT
      Talairach: Anterior reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • POSTERIOR_PT

      public static final int POSTERIOR_PT
      Talairach: Posterior reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • SUPERIOR_PT

      public static final int SUPERIOR_PT
      Talairach: Superior reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • INFERIOR_PT

      public static final int INFERIOR_PT
      Talairach: Inferior reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • LEFT_PT

      public static final int LEFT_PT
      Talairach: Left reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • RIGHT_PT

      public static final int RIGHT_PT
      Talairach: Right reference point. Used for conversions by the dialogs that create new Talairach images.
      See Also:
    • dragCenterPt

      protected boolean dragCenterPt
      DOCUMENT ME!
    • axisLabels

      private final String[][] axisLabels
      Labels for the axes:.
    • cornerCropPt

      private final WildMagic.LibFoundation.Mathematics.Vector3f[] cornerCropPt
      Crop Bounding Box Corners in Screen Coordinates:.
    • cropColor

      private final Color[] cropColor
      Crop Bounding Box Colors:.
    • cropPoints

      private final WildMagic.LibFoundation.Mathematics.Vector2f[] cropPoints
      Crop Bounding Box in Screen Coordinates:.
    • crosshairPt

      private final WildMagic.LibFoundation.Mathematics.Vector3f crosshairPt
      The x and y coordinate of the cursor position in screen space of this component.
    • doCenter

      private boolean doCenter
      Whether to show the center of rotation point in the volume and allow the user to change it. doCenter is set true by center command and set false by DEFAULT and CUBE_BOUNDS modes.
    • dragBBpt

      private int dragBBpt
      DOCUMENT ME!
    • hasOrientation

      private boolean hasOrientation
      true if the imageActive has an orientation, false if imageActive is of FileInfoBase.UNKNOWN_ORIENT.
    • horizontalTalGridPts

      private int[] horizontalTalGridPts
      DOCUMENT ME!
    • localImageExtents

      private int[] localImageExtents
      imageActive extents in the local (Patient) coordinate system:.
    • m_kLocalCropLower

      private final WildMagic.LibFoundation.Mathematics.Vector3f m_kLocalCropLower
      Lower Crop Bounding Box in Patient Coordinates:.
    • m_kLocalCropUpper

      private final WildMagic.LibFoundation.Mathematics.Vector3f m_kLocalCropUpper
      Upper Crop Bounding Box in Patient Coordinates:.
    • m_kVolumePoint

      private WildMagic.LibFoundation.Mathematics.Vector3f m_kVolumePoint
      Cursor 3D point in FileCoordinates.
    • res

      private float[] res
      Reordered resolutions according to orientation. See ModelStorageBase.getResolutions( int index, int orientation ). The orientation parameter may be either: FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL for oriented slices, or FileInfoBase.UNKNOWN_ORIENT for the default slice orientation.
    • showAxes

      protected boolean showAxes
      If true, show XY, XZ, or ZY orientation axes in a corner of the component.
    • showBoundingRect

      protected boolean showBoundingRect
      Specifies whether the user wants to show the cropping / paint bounds rectangle.
    • showCrosshairs

      protected boolean showCrosshairs
      If true, show crosshairs indicating the currently position within the component.
    • showTalairachGrid

      protected boolean showTalairachGrid
      Whether to show the talairach grid on the component.
    • showTalairachGridmarkers

      protected boolean showTalairachGridmarkers
      Whether to show the talairach gridmarkers on the component.
    • talairachMajorLineColor

      private final Color talairachMajorLineColor
      DOCUMENT ME!
    • talairachMinorLineColor

      private final Color talairachMinorLineColor
      DOCUMENT ME!
    • triImageFrame

      protected final ViewJFrameTriImage triImageFrame
      The tri image frame of which this object is a component.
    • verticalTalGridPts

      private int[] verticalTalGridPts
      DOCUMENT ME!
    • voiProtractor

      private VOIProtractor voiProtractor
      The protractor VOI.
    • xColor

      private final Color[] xColor
      color of the crosshairs.
    • yColor

      private final Color[] yColor
      DOCUMENT ME!
    • zColor

      private final Color[] zColor
      DOCUMENT ME!
    • crosshairPixelGap

      private int crosshairPixelGap
      the gap (in one direction) between the center of the crosshair and the actual crosshair line
    • axisOrientation

      private int[] axisOrientation
    • xCursorAdjustment

      private int xCursorAdjustment
    • yCursorAdjustment

      private int yCursorAdjustment
  • Constructor Details

    • ViewJComponentTriImage

      public ViewJComponentTriImage(ViewJFrameBase _frame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, int[] pixelBuffer, float zoom, int[] extents, boolean logMagDisplay, int _orientation)
      The TriImage component constructor. Sets up the initial slice to show, the placement of the crosshairs, updates the position labels, and the bounding box locations.

      Note that reordering occurs in paintBuffer and pixBuffer, but reordering does not occur in imageBuffer. Thus, for the ZY orientation in hasOrientation imageDim.width and imageDim.height are swapped in paintBuffer and pixBuffer, but not in imageBuffer.

      Parameters:
      _frame - frame where component will be displayed
      _imageA - Model of the image that will be displayed
      _LUTa - LUT used to display imageA
      imgBufferA - storage buffer used to display imageA
      _imageB - Model of the image that will be displayed
      _LUTb - LUT used to display imageB
      imgBufferB - storage buffer used to display imageB
      pixelBuffer - storage buffer used to build a displayable image
      zoom - initial magnification of the image
      extents - initial display dimensions of the image
      logMagDisplay - display log magnitude of the image
      _orientation - display orientation of the image
  • Method Details

    • clearProtractor

      public void clearProtractor()
    • computeTalairachVoxelPosition

      public void computeTalairachVoxelPosition(int x, int y)
      Computes the talairach grid voxel from a screen coordinate. Also updates the talairach voxel label in the tri-planar frame.
      Parameters:
      x - screen x
      y - screen y
    • displayAxes

      public void displayAxes(boolean doShowAxes)
      Sets whether axes (either anatomical or x,y,z if no orientation info) are shown or not in one of the corners of the component.
      Parameters:
      doShowAxes - whether to show the axes
    • displayXHairs

      public void displayXHairs(boolean doShowCrosshairs)
      Sets whether or not crosshairs are shown in the images.
      Parameters:
      doShowCrosshairs - whether to show the tri-image crosshairs
    • disposeLocal

      public void disposeLocal(boolean flag)
      Sets all variables to null, disposes, and garbage collects (sometimes).
      Overrides:
      disposeLocal in class ViewJComponentEditImage
      Parameters:
      flag - if true garbage collector should be called.
    • getCenter

      public WildMagic.LibFoundation.Mathematics.Vector3f getCenter()
      Returns the current center point in FileCoordinates:
      Returns:
      DOCUMENT ME!
    • getCrosshairPoint

      public WildMagic.LibFoundation.Mathematics.Vector2f getCrosshairPoint()
      Returns the current cross hair position in screen coordinates.
      Returns:
      crosshairPt, the current cross-hair position in screen coordinates
    • getExtents

      public int[] getExtents()
      Returns the extents of the tri planar component (in the component's order, not the image volume's).
      Returns:
      the extents of the tri image component
    • getResolutions

      public float[] getResolutions()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getScreenCoordinates

      public WildMagic.LibFoundation.Mathematics.Vector2f getScreenCoordinates(WildMagic.LibFoundation.Mathematics.Vector3f point3d)
      Accepts a point in volume space and converts it to screen space.
      Parameters:
      point3d - Point3D the point in volume space
      Returns:
      Point
    • getTheta

      public double getTheta()
      Accessor that returns the protractor angle.
      Returns:
      the protractor angle
    • getProtractorCommonVertex

      public WildMagic.LibFoundation.Mathematics.Vector3f getProtractorCommonVertex()
    • getVolumePosition

      public final Point3D getVolumePosition(int x, int y, int z)
      Translate a point on the x-y tri-image component into image volume space. Assumes input parameters have zoom and voxel resolution already factored out.
      Parameters:
      x - x value of the point within the component
      y - y value of the point within the component
      z - the z coordinate ( usually == slice ) (the out-of-component dimension)
      Returns:
      the point translated into the image volume
    • getVolumePosition

      public final WildMagic.LibFoundation.Mathematics.Vector3f getVolumePosition(float x, float y, float z)
      Translate a point on the x-y tri-image component into image volume space. Assumes input parameters have zoom and voxel resolution already factored out.
      Parameters:
      x - x value of the point within the component
      y - y value of the point within the component
      z - the z coordinate ( usually == slice ) (the out-of-component dimension)
      Returns:
      the point translated into the image volume
    • getXSliceHairColor

      public Color getXSliceHairColor()
      Get the color for the crosshairPt.X crosshair.
      Returns:
      the x crosshair color
    • getYSliceHairColor

      public Color getYSliceHairColor()
      Get the color for the ySlice crosshair.
      Returns:
      the y crosshair color
    • getZSliceHairColor

      public Color getZSliceHairColor()
      Get the color for the zSlice crosshair.
      Returns:
      the z crosshair color
    • isShowBoundingRect

      public boolean isShowBoundingRect()
      Returns whether the bounding rectangle should be drawn.
      Returns:
      whether the bounding rectangle should be drawn
    • keyPressed

      public void keyPressed(KeyEvent e)
      keyReleased event method for KeyListener.
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - KeyEvent
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • makeProtractor

      public void makeProtractor()
      Constructs and initializes one of the 3 protractors, depending on which component this is.
    • mouseClicked

      public void mouseClicked(MouseEvent mouseEvent)
      When an image is double-clicked with the right-mouse button, the slice of the parent image is updated to match the current volume slice.
      Specified by:
      mouseClicked in interface MouseListener
      Overrides:
      mouseClicked in class ViewJComponentEditImage
      Parameters:
      mouseEvent - mouse event
    • mouseDragged

      public void mouseDragged(MouseEvent mouseEvent)
      A mouse-dragged event.
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggered function
    • mouseEntered

      public void mouseEntered(MouseEvent mouseEvent)
      Mouse entry handler: tells the parent tri-image frame about the current component orientation.
      Specified by:
      mouseEntered in interface MouseListener
      Overrides:
      mouseEntered in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggers this function
    • mouseExited

      public void mouseExited(MouseEvent mouseEvent)
      Mouse exit handler: repaints the image to get rid of the cursor if we are in a mode that custom draws the mouse cursor.
      Specified by:
      mouseExited in interface MouseListener
      Overrides:
      mouseExited in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggered function
    • mouseMoved

      public void mouseMoved(MouseEvent mouseEvent)
      A mouse event. If the mode is level set, draws level sets as user moves mouse. Otherwise, changes the cursor depending on where the mouse is in relation to the VOI.
      Specified by:
      mouseMoved in interface MouseMotionListener
      Overrides:
      mouseMoved in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggered the function
    • mousePressed

      public void mousePressed(MouseEvent mouseEvent)
      A mouse-pressed event. Sets the mode of the program depending on the cursor mode. If the mode is move, activates the contour or line and enables the delete button.
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggered this function
    • mouseReleased

      public void mouseReleased(MouseEvent mouseEvent)
      A mouse-released event. This function sets up and draws the VOI according to the mode.
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class ViewJComponentEditImage
      Parameters:
      mouseEvent - event that triggered this function
    • mouseWheelMoved

      public void mouseWheelMoved(MouseWheelEvent event)
      Mouse wheel movement handler, used to change the displayed slice in the component.
      Specified by:
      mouseWheelMoved in interface MouseWheelListener
      Overrides:
      mouseWheelMoved in class ViewJComponentEditImage
      Parameters:
      event - the mouse wheel rotation event
    • nearBoundsPoint

      public boolean nearBoundsPoint(int mouseX, int mouseY, int boundsX, int boundsY)
      Returns true if mouse point is close to bounds point.
      Parameters:
      mouseX - the x component of the mouse click within the component
      mouseY - the y component of the mouse click within the component
      boundsX - the x component of the bounds point to check against
      boundsY - the y component of the bounds point to check against
      Returns:
      true if mouse point is close to bounds point
    • paintComponent

      public void paintComponent(Graphics graphics)
      Paints the image, optionally draws the axis, the center of rotation point, the talairach grid, etc., and calls drawSelf for all VOIs.
      Overrides:
      paintComponent in class ViewJComponentEditImage
      Parameters:
      graphics - graphics to draw with
    • removeReference

      public boolean removeReference(String label)
      Remove a talairach / ACPC reference point.
      Parameters:
      label - the label of the reference point to remove
      Returns:
      true if the requested reference point was found and removed
    • setCenter

      public void setCenter(int i, int j, int k)
      setCenter, sets the crosshairPt and the local copies of the volumePosition (in FileCoordinates and PatientCoordinates).
      Parameters:
      i - FileCoordinates
      j - FileCoordinates
      k - FileCoordinates
    • setCrop

      public void setCrop(WildMagic.LibFoundation.Mathematics.Vector3f lower, WildMagic.LibFoundation.Mathematics.Vector3f upper)
      Sets the crop volume.
      Parameters:
      lower - the lower corner of the crop volume in FileCoordinates
      upper - the upper corner of the crop volume in FileCoordinates
    • setCrosshairPixelGap

      public void setCrosshairPixelGap(int newGap)
      Sets the pixel gap to be used by the crosshair (in one direction away from the center)
      Parameters:
      newGap - the new gap value
    • setCursorMode

      public void setCursorMode(int newMode)
      DOCUMENT ME!
      Overrides:
      setCursorMode in class ViewJComponentEditImage
      Parameters:
      newMode - DOCUMENT ME!
    • setDoCenter

      public void setDoCenter(boolean doCenter)
      Sets whether the center of rotation point should be displayed and the user should be allowed to change it.
      Parameters:
      doCenter - whether the center of rotation point should be displayed and the user should be allowed to change it
    • setReferenceXY

      public void setReferenceXY(int pointType, WildMagic.LibFoundation.Mathematics.Vector3f pt)
      Set a talairach / ACPC reference point.
      Parameters:
      pointType - the reference point type
      pt - the point position (in image volume space)
    • setShowBoundingRect

      public void setShowBoundingRect(boolean flag)
      Sets whether the bounding rectangle should be drawn.
      Parameters:
      flag - whether the bounding rectangle should be drawn
    • setXSliceHairColor

      public void setXSliceHairColor(Color c)
      Change the color for the x crosshair.
      Parameters:
      c - the new crosshair color
    • setYSliceHairColor

      public void setYSliceHairColor(Color c)
      Change the color for the y crosshair.
      Parameters:
      c - the new crosshair color
    • setZoom

      public void setZoom(float zX, float zY)
      sets the screen scale variable when setZoom is called:
      Overrides:
      setZoom in class ViewJComponentBase
      Parameters:
      zX - new zoom factor in X
      zY - new zoom factor in Y
    • setZSliceHairColor

      public void setZSliceHairColor(Color c)
      Change the color for the z crosshair.
      Parameters:
      c - the new crosshair color
    • show

      public boolean show(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, int _interpMode)
      DOCUMENT ME!
      Parameters:
      tSlice - DOCUMENT ME!
      _LUTa - DOCUMENT ME!
      _LUTb - DOCUMENT ME!
      forceShow - DOCUMENT ME!
      _interpMode - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • showTalairachGrid

      public void showTalairachGrid(boolean doShowTalairachGrid)
      Sets whether or not lines dividing the Talairach regions are shown.
      Parameters:
      doShowTalairachGrid - whether to show the talairach region grid
    • showTalairachGridmarkers

      public void showTalairachGridmarkers(boolean doShowTalairachGridmarkers)
      Sets whether the talairach grid markers will be displayed.
      Parameters:
      doShowTalairachGridmarkers - boolean show talairach grid markers
    • update

      public void update(Graphics g)
      Calls paintComponent - reduces flicker.
      Overrides:
      update in class ViewJComponentBase
      Parameters:
      g - graphics to draw with
    • updateCrosshairPosition

      public void updateCrosshairPosition(int x, int y)
      Changes the crosshair coordinate (screen coordinate) that this component should display.
      Parameters:
      x - which x screen coordinate to show
      y - which y screen coordinate to show
      See Also:
      • invalid reference
        #xSlice
      • invalid reference
        #ySlice
      • invalid reference
        #zSlice
    • finalize

      protected void finalize() throws Throwable
      Clean up memory used by the component.
      Overrides:
      finalize in class ViewJComponentEditImage
      Throws:
      Throwable - if there is a problem encountered during memory clean-up
      See Also:
    • makePaintImage

      protected void makePaintImage(int[] paintImageBuffer, BitSet paintBitmap, int slice, ViewJFrameBase frame, boolean b2D)
      This method creates a buffer that will be used to make an image of the painted area on-screen.
      Overrides:
      makePaintImage in class ViewJComponentBase
      Parameters:
      paintImageBuffer - int[] the buffer to fill that will make the paint image
      paintBitmap - the bit map representing the painted pixels
      slice - the current slice to paint if this is a 3D image
      frame - the ViewJFrameBase containing the painted component.
      b2D - when true this is a 2D image component, when false it is greater than 2D
    • updatePaintBitmap

      protected void updatePaintBitmap(boolean paintPixels, int x, int y)
      Updates the image volume's paint bitmap based on the current position of the mouse in the component, called after a mouse action indicates the user wants part of the image either painted or erased.
      Parameters:
      paintPixels - if true, the pixels under the paint brush should be painted. if false, they are cleared of any paint
      x - the x position of the mouse, adjusted for zoom and resolutions
      y - the y position of the mouse, adjusted for zoom and resolutions
    • cornerToCrop

      private void cornerToCrop()
      Creates the four corners of the crop bounding box, based on the two corner crop points:
    • drawAxes

      private void drawAxes(Graphics2D offscreenGraphics2d)
      Convenience method called by paintComponent(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawBoundingRect

      private void drawBoundingRect(Graphics graphics)
      Draws the cropping rectangle.
      Parameters:
      graphics - the graphics object to draw with
    • drawCenterMark

      private void drawCenterMark(Graphics2D offscreenGraphics2d)
      Convenience method called by paintComponent(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawCrosshairLines

      private void drawCrosshairLines(Graphics2D offscreenGraphics2d)
      Convenience method called by drawCrosshairsXY(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawCrosshairs

      private void drawCrosshairs(Graphics2D offscreenGraphics2d)
      Draws the crosshairs for this oriented tri-planar component.
      Parameters:
      offscreenGraphics2d - the graphics context to draw with
    • drawCrosshairStubs

      private void drawCrosshairStubs(Graphics2D offscreenGraphics2d)
      Convenience method called by drawCrosshairs. Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawTalairachGrid_AXIAL

      private void drawTalairachGrid_AXIAL(Graphics2D offscreenGraphics2d)
      Convenience method called by paintComponent(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawTalairachGrid_CORONAL

      private void drawTalairachGrid_CORONAL(Graphics2D offscreenGraphics2d)
      Convenience method called by paintComponent(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • drawTalairachGrid_SAGITTAL

      private void drawTalairachGrid_SAGITTAL(Graphics2D offscreenGraphics2d)
      Convenience method called by paintComponent(). Inserted here for simplicity's sake.
      Parameters:
      offscreenGraphics2d - Graphics2D
    • getDashedStroke

      private BasicStroke getDashedStroke()
      Builds the dashed stroke used to render the minor talairach grid lines.
      Returns:
      the BasicStroke object used to render the minor talairach grid lines
    • showUsingOrientation

      private boolean showUsingOrientation(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, int _interpMode)
      For generating the display of 1 or 2 RGB images.
      Parameters:
      tSlice - t (time) slice to show
      _LUTa - DOCUMENT ME!
      _LUTb - DOCUMENT ME!
      forceShow - forces this method to import image and recalculate java image
      _interpMode - DOCUMENT ME!
      Returns:
      boolean to indicate if the show was successful
    • updateCrop

      private void updateCrop(int index, WildMagic.LibFoundation.Mathematics.Vector2f mousePoint)
      Updates the crop bounding volume when a point on the crop bounding box is dragged with the mouse. Converts the mousePoint to the crop corners, converts from Screen space to PatientCoordinates (ScreenToLocal), then converts from PatientCoordinates to FileCoordinates and passes the new crop volume information to the ViewJFrameTriImage container class.
      Parameters:
      index - the index of the bounding box that changed
      mousePoint - the screen-space coordinats of the changed bounding box point.
    • updateSlice

      private void updateSlice(int newSlice)
      updates the slice value when the wheel is moved or the page_up, page_down keys are pressed. Does bounds checking and comparison with the current slice value. Sets the new position and updates the triImageFrame.
      Parameters:
      newSlice - the new slice value
    • screenToFile

      public boolean screenToFile(int iX, int iY, int iZ, WildMagic.LibFoundation.Mathematics.Vector3f kVolumePt)
      Overrides:
      screenToFile in class ViewJComponentEditImage
    • screenToFile

      public boolean screenToFile(WildMagic.LibFoundation.Mathematics.Vector3f kScreen, WildMagic.LibFoundation.Mathematics.Vector3f kFile)
      Overrides:
      screenToFile in class ViewJComponentEditImage
    • upSlice

      public WildMagic.LibFoundation.Mathematics.Vector3f upSlice()
      Increments the current slice in local coordinates and returns the new position in the view-independent file coordinates.
      Overrides:
      upSlice in class ViewJComponentEditImage
      Returns:
    • downSlice

      public WildMagic.LibFoundation.Mathematics.Vector3f downSlice()
      Decrements the current slice in local coordinates and returns the new position in the view-independent file coordinates.
      Overrides:
      downSlice in class ViewJComponentEditImage
      Returns: