Class ViewJFrameImage

All Implemented Interfaces:
VOIManagerInterfaceListener, ViewImageUpdateInterface, ViewOpenFrameInterface, ActionListener, ComponentListener, KeyListener, MouseListener, MouseMotionListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants
Direct Known Subclasses:
ViewJFrameFastMarching2, ViewJFrameFastMarching3

Makes a frame and put a single image component into it.
Version:
1.0 Sept 28, 1998
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      protected static final int xScreen
      Width of the display screen.
    • yScreen

      protected static final int yScreen
      Height of the display screen.
    • componentImage

      protected ViewJComponentEditImage componentImage
      Object where DICOM image, ... is converted and displayed as a Java image
    • controls

      protected ViewControlsImage controls
      Reference to the toolbars located in the controls object.
    • heightResFactor

      protected float heightResFactor
      Storage for correction parameters where datasets have non isotropic values.
    • imageBufferA

      protected float[] imageBufferA
      Buffer used to store image intensities the presently viewed slice of image A.
    • imageBufferB

      protected float[] imageBufferB
      Buffer used to store image intensities the presently viewed slice of image B.
    • infoDialogA

      protected JDialogImageInfo infoDialogA
      reference to the JDialogImageInfo for updating slice/resolutions.
    • infoDialogB

      protected JDialogImageInfo infoDialogB
      DOCUMENT ME!
    • logMagDisplay

      protected boolean logMagDisplay
      Flag indicating whether or not that the image should be displayed in Log scale. Used primarily for displaying the FFT of an image.
    • nImage

      protected int nImage
      Number of slices in a 3D dataset.
    • nTImage

      protected int nTImage
      Number of time sequences in a 4D dataset.
    • pixBuffer

      protected int[] pixBuffer
      Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data. The ARGB values are generated by using the imageA intensities as a index into a LUT.
    • pixBufferB

      protected int[] pixBufferB
      Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data. The ARGB values are generated by using the imageB intensities as a index into a LUT.
    • resols

      protected float[] resols
      Storage of the image voxel resolutions. One resolution value per dimension.
    • scrollPane

      protected JScrollPane scrollPane
      The scrollPane where the image is displayed.
    • units

      protected int[] units
      Storage of the resolution units of measure. For example, mm, cm, inches ...
    • widthResFactor

      protected float widthResFactor
      Storage for correction parameters where datasets have non isotropic values.
    • windowLevel

      protected JDialogWinLevel[] windowLevel
      Reference to the two window and level dialogs where [0] is for imageA, [1] for imageB.
    • zoom

      protected float zoom
      Defaults magnification of image to 1.
    • colorChooser

      private ViewJColorChooser colorChooser
      Reference to the color chooser.
    • doOrients

      private final boolean doOrients
      DOCUMENT ME!
      See Also:
    • doOrigins

      private final boolean doOrigins
      When loading an image into B slot, should origins and orients be matched?
      See Also:
    • gridOptions

      private JDialogGridOptions gridOptions
      Only want one gridoptions dialog per jframeimage.
    • isShiftDown

      private boolean isShiftDown
      boolean indicating if shift button is down.
    • paintBrushLocked

      private boolean paintBrushLocked
      used in conjuction with the above variable, stating that the paint brush has been changed but will change back to previous.
    • quickPaintBrushIndex

      private int quickPaintBrushIndex
      DOCUMENT ME!
    • zoomDialog

      private JDialogZoom zoomDialog
      Reference to the magnification tool.
    • dpDialog

      private JDialogDataProvenance dpDialog
      Data provenance dialog
    • multipaintDialog

      protected JDialogMultiPaint multipaintDialog
      reference to the JDialogMultiPaint for shortcuts
    • VOIGroup

      protected ButtonGroup VOIGroup
    • voiMenu

      protected JMenu voiMenu
    • voiManager

      protected VOIManagerInterface voiManager
    • prostateAAMClassification

      private JDialogAAMClassification prostateAAMClassification
    • prostateML

      private JDialogAAMplusSVM prostateML
  • Constructor Details

    • ViewJFrameImage

      public ViewJFrameImage(ModelImage _imageA)
      Makes a frame and puts an image into it. Image will be centered on screen.
      Parameters:
      _imageA - ModelImage - first image to display
    • ViewJFrameImage

      public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa)
      Makes a frame and puts an image into it. Image will be centered on screen.
      Parameters:
      _imageA - ModelImage - first image to display
      LUTa - LUT of the imageA (if null grayscale LUT is constructed)
    • ViewJFrameImage

      public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, Dimension loc)
      Makes a frame and puts an image component into it.
      Parameters:
      _imageA - First image to display
      LUTa - LUT of the imageA (if null grayscale LUT is constructed)
      loc - location where image should be initially placed
    • ViewJFrameImage

      public ViewJFrameImage(ModelImage _imageA, ModelImage _imageB)
      Makes a frame and puts an image component into it, does not display the frame through ViewJFrameImage's init() method.
      Parameters:
      _imageA - First image to display
      _imageB - Second image to display
    • ViewJFrameImage

      public ViewJFrameImage(ModelImage _imageA, ModelLUT LUTa, Dimension loc, boolean logMagDisplay)
      Makes a frame and puts an image component into it.
      Parameters:
      _imageA - First image to display
      LUTa - LUT of the imageA (if null grayscale LUT is constructed)
      loc - location where image should be initially placed
      logMagDisplay - Display log magnitude of image
    • ViewJFrameImage

      public ViewJFrameImage(ModelSimpleImage simpleImage, String name)
      Constructs a ModelSimpleImage VJF
      Parameters:
      simpleImage -
      name -
  • Method Details

    • about

      public void about()
      Makes an aboutDialog box and displays information of the image plane presently being displayed.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      calls various methods depending on the action.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class ViewJFrameBase
      Parameters:
      event - event that triggered function
    • close

      public void close()
      Closes window and disposes of frame and component.
      Overrides:
      close in class ViewJFrameBase
    • close

      public void close(boolean closeAll, boolean recordScriptAction)
      Closes window and disposes of frame and component.
    • removeComponentListener

      public void removeComponentListener()
    • removeMouseMotionListener

      public void removeMouseMotionListener()
    • removeWindowListener

      public void removeWindowListener()
    • removeMouseListener

      public void removeMouseListener()
    • removeKeyListener

      public void removeKeyListener()
    • collapseAlltoSinglePaint

      public void collapseAlltoSinglePaint(boolean showProgressBar)
      This method is provided for the user to convert a masked area back to a painted area. It only affects those areas that were masked with the intensity value that is currently active.
      Parameters:
      showProgressBar - DOCUMENT ME!
    • componentResized

      public void componentResized(ComponentEvent event)
      Resizes frame and all components.
      Specified by:
      componentResized in interface ComponentListener
      Overrides:
      componentResized in class ViewJFrameBase
      Parameters:
      event - event that triggered function
    • decSlice

      public void decSlice()
      Decreases the slice to be displayed by one and updates title frame.
    • decSliceEyeTracker

      public void decSliceEyeTracker()
    • doLinkedScrolling

      public void doLinkedScrolling(int offset)
    • enableImageB

      public void enableImageB(boolean enable)
      Quick and simple way for ViewJFrameBase to tell the ViewJFrameImage it created to set the menu (right now only for 2Dimensional) for image B.
      Parameters:
      enable - whether to enable the imageB related menu items
    • changeMenuEnables

      public void changeMenuEnables()
      Routine to enable some menu items and disable othter menu items when the dimensionality or type of the image is changed.
    • finalize

      public void finalize() throws Throwable
      Cleans memory.
      Overrides:
      finalize in class ViewJFrameBase
      Throws:
      Throwable - the Exception raised by this method
    • getActiveImage

      public ModelImage getActiveImage()
      Returns the reference to the currently active image.
      Specified by:
      getActiveImage in interface VOIManagerInterfaceListener
      Returns:
      the active image
    • getAlphaBlend

      public float getAlphaBlend()
      Returns the alphaBlend value for blending between imageA and imageB.
      Overrides:
      getAlphaBlend in class ViewJFrameBase
      Returns:
      the alphaBlend value for blending between imageA and imageB
    • getComponentImage

      public ViewJComponentEditImage getComponentImage()
      Returns the reference to the component image.
      Returns:
      component image
    • getControls

      public ViewControlsImage getControls()
      Get control widgets (toolbars, sliders) for the image frame.
      Specified by:
      getControls in class ViewJFrameBase
      Returns:
      the controls for this image frame
    • getFrameHeight

      public int getFrameHeight()
      Return the height that the frame should have.
      Returns:
      the frame's height
    • getFrameSize

      public Dimension getFrameSize()
      Return the preferred size for the frame.
      Returns:
      the size the frame should be
    • getFrameSize

      public Dimension getFrameSize(Dimension size)
      Return the preferred size for the frame.
      Parameters:
      size - if non-null, its dimensions are changed to the size the frame should be
      Returns:
      the size the frame should be
    • getFrameWidth

      public int getFrameWidth()
      Return the width that the frame should have.
      Returns:
      the frame's width
    • getImageA

      public ModelImage getImageA()
      Returns the reference to imageA.
      Specified by:
      getImageA in class ViewJFrameBase
      Returns:
      image
    • getImageB

      public ModelImage getImageB()
      Returns the reference to imageB.
      Specified by:
      getImageB in class ViewJFrameBase
      Returns:
      imageB
    • getViewMenuBar

      public ViewMenuBar getViewMenuBar()
      Returns:
      menuBarMaker
    • getJMenuBar

      public JMenuBar getJMenuBar()
      Overrides:
      getJMenuBar in class JFrame
      Returns:
      menuBar
    • getRegisteredFramedImages

      public Vector<ModelImage> getRegisteredFramedImages(ModelImage activeImage)
      Returns the Vector of Registered Framed Images that are of the same number of dimensions as the active image and same extents for dimesions 3, 4, and 5.
      Returns:
      Vector
    • getRegisteredFramedImages4D3D

      public Vector<ModelImage> getRegisteredFramedImages4D3D(ModelImage activeImage)
      If active image is 4D, this returns all 3d images that have same x,y,and z dimensionality as the 4d image
      Returns:
      Vector
    • getRegisteredFramedImagesSize

      public int getRegisteredFramedImagesSize()
      Returns the size of the RegisteredFramedImages Vector.
      Returns:
      size of the Vector
    • getRGBTA

      public ModelRGB getRGBTA()
      Gets the RGB LUT table for ARGB image A.
      Overrides:
      getRGBTA in class ViewJFrameBase
      Returns:
      RGBT the new RGB LUT to be applied to the image
    • getRGBTB

      public ModelRGB getRGBTB()
      Gets the RGB LUT table for ARGB image B.
      Overrides:
      getRGBTB in class ViewJFrameBase
      Returns:
      RGBT the new RGB LUT to be applied to the image
    • getScrollPane

      public JScrollPane getScrollPane()
      DOCUMENT ME!
      Returns:
      JScrollPane
    • getScrollPaneSize

      public Dimension getScrollPaneSize(Dimension size)
      Return the preferred size for the component image scroll pane.
      Parameters:
      size - if non-null, its dimensions are changed to the size the scroll pane should be
      Returns:
      the size the scroll pane should be
    • getViewableSlice

      public int getViewableSlice()
      Get the top-most slice.
      Returns:
      returns the slice which is currently displayed
    • getViewableTimeSlice

      public int getViewableTimeSlice()
      Gets the current Time slice which is being viewed.
      Returns:
      int the current time slice
    • handleMaskToPaint

      public boolean handleMaskToPaint(boolean showProgressBar)
      This method is provided for the user to convert a masked area back to a painted area. It only affects those areas that were masked with the intensity value that is currently active.
      Parameters:
      showProgressBar - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • incSlice

      public void incSlice()
      Increases the slice to be displayed by one and updates title frame.
    • incSliceEyeTracker

      public void incSliceEyeTracker()
    • initExtentsVariables

      public void initExtentsVariables(ModelImage img)
      Initializes the variables based on the image extents. (i.e. number of slices, number of time slices, the initial z-slice, etc.
      Parameters:
      img - the image to set the extent variables for
    • keyPressed

      public void keyPressed(KeyEvent e)
      ********************************************************************* **************************** Key Events *** **************************.*********************************************************************
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyReleased

      public void keyReleased(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyTyped

      public void keyTyped(KeyEvent e)
      DOCUMENT ME!
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      DOCUMENT ME!
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - DOCUMENT ME!
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      DOCUMENT ME!
      Specified by:
      mouseDragged in interface MouseMotionListener
      Parameters:
      e - DOCUMENT ME!
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      DOCUMENT ME!
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      event - DOCUMENT ME!
    • mouseExited

      public void mouseExited(MouseEvent event)
      DOCUMENT ME!
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      event - DOCUMENT ME!
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      DOCUMENT ME!
      Specified by:
      mouseMoved in interface MouseMotionListener
      Parameters:
      e - DOCUMENT ME!
    • mousePressed

      public void mousePressed(MouseEvent event)
      DOCUMENT ME!
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - DOCUMENT ME!
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      DOCUMENT ME!
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - DOCUMENT ME!
    • openFrame

      public ViewJFrameImage openFrame(ModelImage image)
      ViewOpenFrameInterface function to create a new frame from a result image (jdialog produced)
      Specified by:
      openFrame in interface ViewOpenFrameInterface
    • printImage

      public void printImage()
      Method to send an image to the printer.
    • removeControls

      public void removeControls()
      Removes the menu and controls of the main frame so that a new frame can load the main frame with the proper controls. Since the controls point to this particular image, when we remove the controls, turn off the highlight box.
      Specified by:
      removeControls in class ViewJFrameBase
      See Also:
    • saveImageInfo

      public void saveImageInfo()
      Saves the image info; need to do before saving image.
    • setActiveImage

      public void setActiveImage(int active)
      Sets the active image for drawing VOIs. VOIs are only drawn in the active image. In addition, algorithms are executed on the active window.
      Specified by:
      setActiveImage in interface VOIManagerInterfaceListener
      Specified by:
      setActiveImage in class ViewJFrameBase
      Parameters:
      active - IMAGE_A or IMAGE_B
    • setAlphaBlend

      public void setAlphaBlend(int value)
      Sets the alpha blending of parameter for two image displaying.
      Specified by:
      setAlphaBlend in class ViewJFrameBase
      Parameters:
      value - amount [0,100] that is the percentage of Image A to be displayed
    • setAndLoad

      public boolean setAndLoad(ModelImage image2load)
      DOCUMENT ME!
      Parameters:
      image2load - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setAndLoad

      public boolean setAndLoad(ModelImage image2load, boolean doOrigins, boolean doOrients, double defaultValue, double defaultRed, double defaultGreen, double defaultBlue)
      DOCUMENT ME!
      Parameters:
      image2load - DOCUMENT ME!
      doOrigins - DOCUMENT ME!
      doOrients - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setControls

      public void setControls()
      Sets the menu and controls (i.e. toolbars) of the main frame! This puts the menus and controls needed to controls the operations of this frame. Different image frames have different menu and controls. Notify this componentImage that it needs to display highlight box, notifying user that this componentImage is the image being controlled
      Specified by:
      setControls in class ViewJFrameBase
      See Also:
    • setEnabled

      public void setEnabled(boolean flag)
      Controls whether or not the images/VOIs of the frame can be modified.
      Specified by:
      setEnabled in class ViewJFrameBase
      Parameters:
      flag - if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
    • setImageB

      public void setImageB(ModelImage _imageB)
      Sets the reference to imageB.
      Specified by:
      setImageB in class ViewJFrameBase
      Parameters:
      _imageB - image to set the frame to
    • setLUTa

      public void setLUTa(ModelLUT LUT)
      Sets the LUT for image A.
      Overrides:
      setLUTa in class ViewJFrameBase
      Parameters:
      LUT - the LUT
    • setLUTb

      public void setLUTb(ModelLUT LUT)
      Sets the LUT for image B.
      Overrides:
      setLUTb in class ViewJFrameBase
      Parameters:
      LUT - the LUT
    • setOutputWindowBox

      public void setOutputWindowBox(boolean isShown)
      Updates the checkbox to show whether or not the output window is currently displayed.
      Parameters:
      isShown - boolean is the output window shown
    • setPaintBitmapSwitch

      public void setPaintBitmapSwitch(boolean paintBitmapSwitch)
      When switching the active image, copy the paintBitmap of the previous active image into the paintBitmap of the new active image.
      Specified by:
      setPaintBitmapSwitch in class ViewJFrameBase
      Parameters:
      paintBitmapSwitch - if true do not getMask on a setActiveImage command
    • setRGBTA

      public void setRGBTA(ModelRGB RGBT)
      Sets the RGB LUT table for ARGB image A.
      Specified by:
      setRGBTA in class ViewJFrameBase
      Parameters:
      RGBT - the new RGB LUT to be applied to the image
    • setRGBTB

      public void setRGBTB(ModelRGB RGBT)
      Sets the RGB LUT table for ARGB image B.
      Specified by:
      setRGBTB in class ViewJFrameBase
      Parameters:
      RGBT - the new RGB LUT to be applied to the image
    • setShiftDown

      public void setShiftDown(boolean isShiftDown)
      DOCUMENT ME.*
      Parameters:
      isShiftDown - DOCUMENT ME!
    • setSlice

      public void setSlice(int slice)
      Sets the slice to be displayed and updates title frame.
      Specified by:
      setSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - indicates image slice to be displayed
    • setSlice

      public void setSlice(int slice, boolean updateLinkedImages)
      DOCUMENT ME!
      Parameters:
      slice - DOCUMENT ME!
      updateLinkedImages - DOCUMENT ME!
    • setTimeSlice

      public void setTimeSlice(int slice)
      Sets the slice to be displayed and updates title frame.
      Specified by:
      setTimeSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - indicates image time-slice (4th dimension) to be displayed
    • setTimeSlice

      public void setTimeSlice(int slice, boolean checkScroll)
      Sets the slice to be displayed and updates title frame.
      Parameters:
      slice - indicates image time-slice (4th dimension) to be displayed
      whether - linked images should change their linked image sets
    • setTitle

      public void setTitle()
      Sets the title of the frame with the image name and the slice location.
      Specified by:
      setTitle in class ViewJFrameBase
    • setZoomB

      public boolean setZoomB()
      Sets the magnification of Image B. Allocates the image buffers so that it can be displayed properly.
      Returns:
      true if setting the zoom on imageB was successful
    • setZoomDialogNull

      public void setZoomDialogNull()
      Sets the magnification dialog to null.
    • showEditImageInfo

      public void showEditImageInfo()
      DOCUMENT ME!
    • stateChanged

      public void stateChanged(ChangeEvent event)
      DOCUMENT ME!
      Specified by:
      stateChanged in interface ChangeListener
      Overrides:
      stateChanged in class ViewJFrameBase
      Parameters:
      event - DOCUMENT ME!
    • triPlanarClosing

      public void triPlanarClosing()
      DOCUMENT ME!
    • updateFrame

      public void updateFrame(float sX, float sY)
      Updates the this frame's size the components sizes. If the magnified image fits into the frame that will fit into the screen then frame and image are sized appropriately. If the frame, to fit the image, exceeds the screen size the frame remains the same size and the image magnified and placed in the scroll pane.
      Parameters:
      sX - zoom in the x dimension
      sY - zoom in the y dimension
    • updateFrame

      public void updateFrame(float sX, float sY, int x, int y)
      public void updateFrame(float xZoom, float yZoom, int x, int y) This method is called when the user is zooming in or out.
      Parameters:
      sX - float zoom in the x dimension
      sY - float zoom in the y dimension
      x - int X-pixel the user wants to zoom around
      y - int Y-pixel the user wants to zoom around
    • updateImageExtents

      public boolean updateImageExtents()
      This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.
      Specified by:
      updateImageExtents in interface ViewImageUpdateInterface
      Specified by:
      updateImageExtents in class ViewJFrameBase
      Returns:
      whether the image extents update was successful
      See Also:
    • updateImages

      public boolean updateImages()
      This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(boolean forceShow)
      This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Parameters:
      forceShow - forces show to re import image and calc. java image
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(boolean forceShow, int interpMode)
      This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
      Parameters:
      forceShow - forces show to re import image and calc. java image
      interpMode -
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
      This methods calls the componentImage's update method to redraw the screen.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Parameters:
      LUTa - LUT used to update imageA
      LUTb - LUT used to update imageB
      forceShow - forces show to re import image and calc. java image
      interpMode - image interpolation method (Nearest or Smooth)
      Returns:
      boolean confirming successful update
    • updateMenubar

      public void updateMenubar()
      This method updates the menubar; ie: after an image has been opened.
    • updateWinLevel

      public void updateWinLevel(int min, int max)
      Update the window level sliders from the CT preset dialog.
      Parameters:
      min - min value.
      max - max value.
    • windowClosing

      public void windowClosing(WindowEvent event)
      Closes window and disposes of frame and component.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class ViewJFrameBase
      Parameters:
      event - Event that triggered function
    • createBuffers

      protected int[] createBuffers() throws OutOfMemoryError
      Create the buffers for imageA and imageB.
      Returns:
      the extents of the buffers
      Throws:
      OutOfMemoryError - if enough memory cannot be allocated for this method
    • getActiveImageInfoDialog

      protected JDialogImageInfo getActiveImageInfoDialog()
      Returns a reference to the image info dialog for the active image. Image A and image B have references to their individual dialogs.
      Returns:
      a reference to the image info dialog for the active image
    • getImageInfoDialogB

      protected JDialogImageInfo getImageInfoDialogB()
      Returns the image info dialog for image B.
      Returns:
      the image info dialog for image B
    • getScrollPaneHeight

      protected int getScrollPaneHeight()
      Get the height of the scroll pane holding the component image.
      Returns:
      the height of the component image scroll pane
    • getScrollPaneSize

      protected Dimension getScrollPaneSize()
      Get the size of the scroll pane holding the component image.
      Returns:
      the size of the component image scroll pane
    • getScrollPaneWidth

      protected int getScrollPaneWidth()
      Get the width of the scroll pane holding the component image.
      Returns:
      the width of the component image scroll pane
    • initLUT

      protected void initLUT() throws OutOfMemoryError
      Creates and initializes the LUT for the first image (imageA) if it hasn't been already.
      Throws:
      OutOfMemoryError - if enough memory cannot be allocated for this method
    • initResolutions

      public void initResolutions()
      Initializes the resolutions and units from the image.
    • initZoom

      public void initZoom()
      Initializes the zoom variables for the first image (imageA).
    • makeTitle

      protected String makeTitle()
      Constructs the title of the frame with the image name and the slice location.
      Returns:
      the image frame title
    • testParameter

      protected boolean testParameter(String str, double minValue, double maxValue)
      Tests that the entered parameter is in range.
      Parameters:
      str - the value entered by the user
      minValue - the minimum value this variable may be set to
      maxValue - the maximum value this variable may be set to
      Returns:
      boolean result of test
    • updateHistoLUTFrame

      @Deprecated protected void updateHistoLUTFrame(int imageAorB)
      Deprecated.
      Displays histoLUT frame for a gray scale image.
      Parameters:
      imageAorB - whether to show the IMAGE_A, IMAGE_B or IMAGE_A_B lut frame
    • updateHistoLUTFrame

      @Deprecated protected void updateHistoLUTFrame(int imageAorB, ViewJComponentEditImage compImg)
      Deprecated.
      Displays histoLUT frame for a gray scale image.
      Parameters:
      imageAorB - whether to show the IMAGE_A, IMAGE_B or IMAGE_A_B lut frame
      compImg - the component image with the image histogram frames to update
    • updateHistoRGBFrame

      @Deprecated protected void updateHistoRGBFrame(int imageAorB)
      Deprecated.
      Displays histoRGB frame for an RGB image.
      Parameters:
      imageAorB - indicates whether to show IMAGE_A, IMAGE_B or IMAGE_A_B (both).
    • updateHistoRGBFrame

      @Deprecated protected void updateHistoRGBFrame(int imageAorB, ViewJComponentEditImage compImg)
      Deprecated.
      Displays histoRGB frame for an RGB image.
      Parameters:
      imageAorB - indicates whether to show IMAGE_A, IMAGE_B or IMAGE_A_B (both).
      compImg - the component image with the image histogram frames to update
    • adjustScrollbars

      private void adjustScrollbars(int x, int y)
      DOCUMENT ME!
      Parameters:
      x - int
      y - int
    • computeIdealWindowSize

      protected void computeIdealWindowSize()
      private void computeIdealWindowSize() This method will enlarge or shrink the window size in response to the componentImage being zoomed. It will only resize the window to IMAGE_SCREEN_RATIO of the screen size, in this case 3/5. If the image is zoomed past that size, scrollbars are added. If the user has dragged the window to a size larger than 3/5 of screen size, I assume he wants it that way and the window will not be resized in that case upon zoom-in.
    • init

      private void init(ModelLUT LUTa, Dimension loc, boolean logMagDisplay) throws OutOfMemoryError
      Initializes the frame and variables.
      Parameters:
      LUTa - LUT of the imageA (if null grayscale LUT is constructed)
      loc - location where image should be initially placed
      logMagDisplay - a boolean indicating if the log magnitude of image should be displayed.
      Throws:
      OutOfMemoryError - if enough memory cannot be allocated for the GUI
    • initComponentImage

      protected void initComponentImage(int[] extents) throws OutOfMemoryError
      Creates and initializes the component image for the given image.
      Parameters:
      extents - the image dimensionality.
      Throws:
      OutOfMemoryError - if enough memory cannot be allocated for this method
    • isMultipleImages

      private boolean isMultipleImages()
      Helper method to establish if there are other images so that a dialog can be created. Used by registration methods, load frame, etc.
      Returns:
      true if there are images to operate on.
    • isMultipleSameSizeImages

      private boolean isMultipleSameSizeImages(boolean isForCalculator)
      Helper method to establish if there are images of the same dimensionality so that a dialog can be created. Used by image calculator, concat, etc.
      Parameters:
      isForCalculator - whether this call is being done before using the image calculator
      Returns:
      true if there are images to operate on.
    • propagatePaintToAllSlices

      private void propagatePaintToAllSlices()
      DOCUMENT ME!
    • propagatePaintToNextSlice

      private void propagatePaintToNextSlice()
      DOCUMENT ME!
    • propagatePaintToPreviousSlice

      private void propagatePaintToPreviousSlice()
      DOCUMENT ME!
    • checkForActiveVOIs

      private boolean checkForActiveVOIs()
    • convertVOITBI

      private void convertVOITBI()
    • surfaceReconstructionTBI

      private void surfaceReconstructionTBI()
    • saveMergedVOIs

      private void saveMergedVOIs()
      This method merges the 3 axial, sagittal, coronal VOIs and save them into one cloudy points file. This function is used by the prostate surface reconstruction analysis.
    • reconstructSurfaceFromVOIs

      private void reconstructSurfaceFromVOIs()
      Reconstruct the prostate surface from the coarse VOIs cloudy points.
    • saveProstateFeatures

      private void saveProstateFeatures()
    • saveProstateFeatures2D

      private void saveProstateFeatures2D()
    • saveProstateBoundaryFeature

      private void saveProstateBoundaryFeature()
    • testProstateFeatures2D

      private void testProstateFeatures2D()
    • testProstateFeatures

      public void testProstateFeatures()
    • testProstateFeaturesClassification

      private void testProstateFeaturesClassification()
    • testProstateFeaturesTrain

      private void testProstateFeaturesTrain()
    • testProstateBoundaryFeatureTrain

      private void testProstateBoundaryFeatureTrain()
    • generateAtlasImage

      private void generateAtlasImage()
      Read the 3D atlas images directory, convert each 3D image to 2D slices based atlas. And save the final 2D slice and corresponding VOIs to specified atlas directory.
    • generateEndingSlices

      private void generateEndingSlices()
    • aamGroups

      private void aamGroups()
    • aamGroupRename

      private void aamGroupRename()
    • aamClassification

      private void aamClassification()
    • deepCNNTrain

      private void deepCNNTrain()
    • deepCNNTest

      private void deepCNNTest()
    • deepCNNConvert

      private void deepCNNConvert()
    • deepKneesAtlas

      private void deepKneesAtlas()
    • deepKneesMap

      private void deepKneesMap()
    • deepCNNMap

      private void deepCNNMap()
    • hedCNNMap

      private void hedCNNMap()
    • aamMLClassification

      private void aamMLClassification()
    • extractCEFeature

      private void extractCEFeature()
    • loadProstateMask

      private void loadProstateMask()
    • prostateSemiAutoBSplineFuzzyC

      private void prostateSemiAutoBSplineFuzzyC()
    • prostateSemiAutoBSpline

      private void prostateSemiAutoBSpline()
    • initVOI

      protected void initVOI()
      Initialize the 3D VOI interface.
    • getCenterPt

      public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()
      Specified by:
      getCenterPt in interface VOIManagerInterfaceListener
    • getFrame

      public JFrame getFrame()
      Specified by:
      getFrame in interface VOIManagerInterfaceListener
    • getVOIManager

      public VOIManagerInterface getVOIManager()
      Specified by:
      getVOIManager in interface VOIManagerInterfaceListener
    • PointerActive

      public void PointerActive(boolean bActive)
      Specified by:
      PointerActive in interface VOIManagerInterfaceListener
    • PropDown

      public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive)
      Specified by:
      PropDown in interface VOIManagerInterfaceListener
    • PropUp

      public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive)
      Specified by:
      PropUp in interface VOIManagerInterfaceListener
    • create3DVOI

      public void create3DVOI(boolean bIntersection)
      Specified by:
      create3DVOI in interface VOIManagerInterfaceListener
    • setActiveImage

      public void setActiveImage(ModelImage kImage)
      Specified by:
      setActiveImage in interface VOIManagerInterfaceListener
    • setCenter

      public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
      Specified by:
      setCenter in interface VOIManagerInterfaceListener
    • setCursor

      public void setCursor(Cursor kCursor)
      Specified by:
      setCursor in interface VOIManagerInterfaceListener
      Overrides:
      setCursor in class Window
    • setModified

      public void setModified()
      Specified by:
      setModified in interface VOIManagerInterfaceListener
    • updateData

      public void updateData()
      Specified by:
      updateData in interface VOIManagerInterfaceListener
    • getActiveLUT

      public ModelLUT getActiveLUT()
      Specified by:
      getActiveLUT in interface VOIManagerInterfaceListener
    • getActiveRGB

      public ModelRGB getActiveRGB()
      Specified by:
      getActiveRGB in interface VOIManagerInterfaceListener
    • setPaintMask

      public void setPaintMask(BitSet mask)
      Specified by:
      setPaintMask in interface VOIManagerInterfaceListener
    • paintToShortMask

      public void paintToShortMask()
      Specified by:
      paintToShortMask in interface VOIManagerInterfaceListener
    • paintToUbyteMask

      public void paintToUbyteMask()
      Specified by:
      paintToUbyteMask in interface VOIManagerInterfaceListener
    • maskToPaint

      public void maskToPaint()
      Specified by:
      maskToPaint in interface VOIManagerInterfaceListener
    • getFrameLandMarkPoints

      public int[] getFrameLandMarkPoints()
      Get the frame four corner landmark points.
      Returns:
      landmark points result[0] = startX; result[1] = startY; result[2] = endX; result[3] = endY;
    • addSphereVOIs

      public void addSphereVOIs(VOI annotations)
      Specified by:
      addSphereVOIs in interface VOIManagerInterfaceListener