Class JFrameHistogram

  • All Implemented Interfaces:
    ViewImageUpdateInterface, java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

    public class JFrameHistogram
    extends javax.swing.JPanel
    implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, ViewImageUpdateInterface, java.awt.event.WindowListener
    Lookup table interface for either grayscale or color (RGB) images. Either one or two images can be combined in a frame, and this LUT interface enables the user to apply a color look-up table to the images. Each image is treated separately, with an individual interface in a separate tabbed pane. The images can be grayscale, color, or a combination (one grayscale, one RGB).
    See Also:
    JPanelHistogram, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ViewJFrameColocalizationEM colEMFrame
      reference to the colocalization frame for updatng the image.
      private ViewJFrameColocalizationRegression colRegFrame
      reference to the colocalization frame for updatng the image.
      private javax.swing.JFrame containingFrame
      frame containing the lut interface (if display in a stand-alone window)
      private javax.swing.JPanel containingPanel
      panel containing the lut interface (used in the stand-alone frame or in an outside frame)
      protected boolean dualImage
      set to true when the lut interface contains two images (imageA and imageB)
      protected ModelImage imageA
      source image A
      protected ModelImage imageB
      source image B
      protected ModelStorageBase LUTa
      lut a
      protected ModelStorageBase LUTb
      lut b
      protected ViewMenuBuilder menuObj
      menu builder
      protected JPanelHistogram panelA
      histogram interface panels for imageA and imageB
      protected JPanelHistogram panelB
      histogram interface panels for imageA and imageB
      private java.awt.Frame parentFrame
      Parent frame of this dialog, usually of type ViewJFrameImage.
      protected ViewJComponentRegistration regComponent
      false = apply algorithm only to VOI regions.
      private static long serialVersionUID  
      protected javax.swing.JTabbedPane tabbedPane
      tabbed pane, each separate tab contains the interface for imageA and imageB
      private boolean useSeparateFrame
      Whether this panel is contained in another frame or forms its own frame
      private javax.swing.JDialog voiDialog
      Dialog that enables the user to choose to apply the lut to the entire image, or voi regions.
      protected boolean wholeImage
      true = apply algorithm to the whole image
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)  
      private void buildMenu​(javax.swing.JFrame frame)
      This method builds a menu which contains the options for opening/saving a LUT or set of transfer functions, closing the LUT, and utilities such as CT presets.
      void closeFrame()
      Closes the stand-alone interface frame.
      void closeImageB()
      Closes imageB and removes the tabbed-pane interface, replacing it with a single interface panel.
      void constructDialog​(boolean separateFrame)
      Creates a dialog to choose if histogram should be over all of image or just VOI regions.
      protected javax.swing.JPanel createPanel()
      Creates the display panel.
      protected void createPanel​(boolean simple)  
      void disposeLocal()
      Removes this from the image display listeners.
      boolean doCalcThresholdVolume()
      Returns true if 'Calculate threshold volume' is selected.
      javax.swing.JPanel getContainingPanel()
      Returns the main interface panel for display in another interface.
      float getLowerThreshold()
      Returns the lower threshold image value for whichever image is current selected.
      JPanelHistogram getSelectedPanel()
      Returns the currently selected interface panel.
      float getUpperThreshold()
      Returns the upper threshold image value for whichever image is current selected.
      void histogramLUT​(boolean entireFlag, boolean separateFrame)
      Creates the user interface for LUT changes.
      void histogramLUT​(boolean entireFlag, boolean separateFrame, boolean simple)  
      boolean isImageASelected()
      Returns whether the imageA LUT panel is currently visible and active.
      boolean isImageBSelected()
      Returns whether the imageB LUT panel is currently visible and active
      boolean isThresholding()
      Returns true if image A or B is in dual threshold inverse mode (for JDialogConvertType input ranges).
      private void processFileMenu​(java.lang.String command)
      Called when the FileMenu is activated.
      private void processUtilitiesMenu​(java.awt.event.ActionEvent event, java.lang.String command)
      Called when the Utilities Menu is activated.
      void redrawFrames()
      Redraws the histogram interface for the currently selected image.
      void resizePanel​(int panelWidth, int frameHeight)
      Resizing the control panel with ViewJFrameVolumeView's frame width and height.
      void setActiveImage​(ModelImage image)
      Sets which image is currently active and makes the corresponding tabbed pane visible.
      void setBlueOn​(boolean isOn, boolean isImageA)
      Sets the blue flag to be on or off.
      void setColocalizationEMFrame​(ViewJFrameColocalizationEM colocalizationEMFrame)
      Called from ViewJFrameColocalizationEM.
      void setColocalizationRegFrame​(ViewJFrameColocalizationRegression colocalizationRegFrame)
      Called from ViewJFrameColocalizationRegression.
      void setGreenOn​(boolean isOn, boolean isImageA)
      Sets the green flag to be on or off.
      void setImageB​(ModelImage image, ModelStorageBase LUT)
      Sets the imageB for the LUT interface.
      void setImages​(ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)  
      void setLUT​(JPanelHistogram panel, ModelStorageBase LUT)
      Sets the LUT for the input panel.
      void setLUTA​(ModelStorageBase LUT)
      Set LUTa
      void setLUTB​(ModelStorageBase LUT)
      Set LUTb
      void setRedOn​(boolean isOn, boolean isImageA)
      Sets the red flag to be on or off.
      void setSlice​(int slice)
      setSlice.
      void setTimeSlice​(int tSlice)
      setTimeSlice.
      void setTransferFunctionA​(TransferFunction txFunction)
      Set the transfer function for imageA.
      void setTransferFunctionB​(TransferFunction txFunction)
      Set the transfer function for imageA.
      void stateChanged​(javax.swing.event.ChangeEvent event)  
      void updateFrames​(boolean flag)  
      boolean updateImageExtents()
      This methods calls the componentImage's REPAINT method to redraw the screen.
      boolean updateImages()
      This methods calls the componentImage's REPAINT method to redraw the screen.
      boolean updateImages​(boolean flag)
      This methods calls the componentImage's update method to redraw the screen.
      boolean updateImages​(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
      This methods calls the componentImage's update method to redraw the screen.
      void updateInterpolation()
      updates the interpolation mode for the images.
      void updateRealTime​(boolean updateRealTime)
      Updates the interface behavior when the user choses to update in real-time or on mouse release.
      void windowActivated​(java.awt.event.WindowEvent arg0)  
      void windowClosed​(java.awt.event.WindowEvent arg0)  
      void windowClosing​(java.awt.event.WindowEvent arg0)  
      void windowDeactivated​(java.awt.event.WindowEvent arg0)  
      void windowDeiconified​(java.awt.event.WindowEvent arg0)  
      void windowIconified​(java.awt.event.WindowEvent arg0)  
      void windowOpened​(java.awt.event.WindowEvent arg0)  
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • imageA

        protected ModelImage imageA
        source image A
      • imageB

        protected ModelImage imageB
        source image B
      • wholeImage

        protected boolean wholeImage
        true = apply algorithm to the whole image
      • parentFrame

        private java.awt.Frame parentFrame
        Parent frame of this dialog, usually of type ViewJFrameImage.
      • voiDialog

        private javax.swing.JDialog voiDialog
        Dialog that enables the user to choose to apply the lut to the entire image, or voi regions.
      • containingFrame

        private javax.swing.JFrame containingFrame
        frame containing the lut interface (if display in a stand-alone window)
      • containingPanel

        private javax.swing.JPanel containingPanel
        panel containing the lut interface (used in the stand-alone frame or in an outside frame)
      • dualImage

        protected boolean dualImage
        set to true when the lut interface contains two images (imageA and imageB)
      • tabbedPane

        protected javax.swing.JTabbedPane tabbedPane
        tabbed pane, each separate tab contains the interface for imageA and imageB
      • panelA

        protected JPanelHistogram panelA
        histogram interface panels for imageA and imageB
      • panelB

        protected JPanelHistogram panelB
        histogram interface panels for imageA and imageB
      • useSeparateFrame

        private boolean useSeparateFrame
        Whether this panel is contained in another frame or forms its own frame
    • Constructor Detail

      • JFrameHistogram

        public JFrameHistogram​(java.awt.Frame theParentFrame,
                               ModelImage imA,
                               ModelImage imB,
                               ModelStorageBase _LUTa,
                               ModelStorageBase _LUTb)
        Creates the JFrameHistogram class. Initializes the images and LUTs, does not create the interface until the constructDialog() function is called, which asks the user if the luts should be applied to the VOI region or to the entire image, or until the histogramLUT() function is called to create the frame and interface panels.
        Parameters:
        theParentFrame -
        imA - imageA
        imB - imageB
        _LUTa - lutA (either ModelLUT or ModelRGB)
        _LUTb - lutb (either ModelLUT or ModelRGB)
      • JFrameHistogram

        public JFrameHistogram​(java.awt.Frame theParentFrame,
                               ViewJComponentRegistration _regComponent,
                               ModelImage imA,
                               ModelImage imB,
                               ModelStorageBase _LUTa,
                               ModelStorageBase _LUTb)
        Creates the JFrameHistogram class. Initializes the images and LUTs, does not create the interface until the constructDialog() function is called, which asks the user if the luts should be applied to the VOI region or to the entire image, or until the histogramLUT() function is called to create the frame and interface panels.
        Parameters:
        theParentFrame -
        _regComponent - registration component image to update on lut changes.
        imA - imageA
        imB - imageB
        _LUTa - lutA (either ModelLUT or ModelRGB)
        _LUTb - lutb (either ModelLUT or ModelRGB)
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • closeFrame

        public void closeFrame()
        Closes the stand-alone interface frame.
      • closeImageB

        public void closeImageB()
        Closes imageB and removes the tabbed-pane interface, replacing it with a single interface panel.
      • constructDialog

        public void constructDialog​(boolean separateFrame)
        Creates a dialog to choose if histogram should be over all of image or just VOI regions.
      • disposeLocal

        public void disposeLocal()
        Removes this from the image display listeners. Removes and deletes the interface panels.
      • doCalcThresholdVolume

        public boolean doCalcThresholdVolume()
        Returns true if 'Calculate threshold volume' is selected.
        Returns:
        true if 'Calculate threshold volume' is selected, false otherwise.
      • getContainingPanel

        public javax.swing.JPanel getContainingPanel()
        Returns the main interface panel for display in another interface.
        Returns:
        the main interface panel for display in another interface.
      • getLowerThreshold

        public float getLowerThreshold()
        Returns the lower threshold image value for whichever image is current selected.
        Returns:
        the lower threshold image value for whichever image is current selected.
      • getSelectedPanel

        public JPanelHistogram getSelectedPanel()
        Returns the currently selected interface panel.
        Returns:
        the currently selected interface panel.
      • getUpperThreshold

        public float getUpperThreshold()
        Returns the upper threshold image value for whichever image is current selected.
        Returns:
        the upper threshold image value for whichever image is current selected.
      • histogramLUT

        public void histogramLUT​(boolean entireFlag,
                                 boolean separateFrame)
        Creates the user interface for LUT changes. The entieFlag indicates if the entire image is to be used in the histogram calculation and LUT change, or if only the VOI regions are to be used. The separateFrame flag indicates if the interface is to be displayed in a stand-along window or inside another outside interface.
        Parameters:
        entireFlag - when true apply the LUT to the entire image, when false apply to VOI regions only.
        separateFrame - when true create and display the LUT interface in a separate, stand-alone window, when false create the interface for display in another outside frame or panel.
      • histogramLUT

        public void histogramLUT​(boolean entireFlag,
                                 boolean separateFrame,
                                 boolean simple)
      • isImageASelected

        public boolean isImageASelected()
        Returns whether the imageA LUT panel is currently visible and active.
        Returns:
        whether the imageA LUT panel is currently visible and active.
      • isImageBSelected

        public boolean isImageBSelected()
        Returns whether the imageB LUT panel is currently visible and active. *
        Returns:
        whether the imageB LUT panel is currently visible and active.
      • isThresholding

        public boolean isThresholding()
        Returns true if image A or B is in dual threshold inverse mode (for JDialogConvertType input ranges).
        Returns:
        boolean is dual threshold inverse mode.
      • redrawFrames

        public void redrawFrames()
        Redraws the histogram interface for the currently selected image.
      • resizePanel

        public void resizePanel​(int panelWidth,
                                int frameHeight)
        Resizing the control panel with ViewJFrameVolumeView's frame width and height.
        Parameters:
        panelWidth - panel width.
        frameHeight - parent frame height.
      • setActiveImage

        public void setActiveImage​(ModelImage image)
        Sets which image is currently active and makes the corresponding tabbed pane visible.
        Parameters:
        image - the image to set as currently active.
      • setBlueOn

        public void setBlueOn​(boolean isOn,
                              boolean isImageA)
        Sets the blue flag to be on or off.
        Parameters:
        isOn - flag, either on or off.
        isImageA - when true apply to imageA, when false apply to imageB.
      • setColocalizationEMFrame

        public void setColocalizationEMFrame​(ViewJFrameColocalizationEM colocalizationEMFrame)
        Called from ViewJFrameColocalizationEM. Enables LUT changes to be applied to that frame.
        Parameters:
        colocalizationEMFrame -
      • setColocalizationRegFrame

        public void setColocalizationRegFrame​(ViewJFrameColocalizationRegression colocalizationRegFrame)
        Called from ViewJFrameColocalizationRegression. Enables LUT changes to be applied to that frame.
        Parameters:
        colocalizationEMFrame -
      • setGreenOn

        public void setGreenOn​(boolean isOn,
                               boolean isImageA)
        Sets the green flag to be on or off.
        Parameters:
        isOn - flag, either on or off.
        isImageA - when true apply to imageA, when false apply to imageB.
      • setImageB

        public void setImageB​(ModelImage image,
                              ModelStorageBase LUT)
        Sets the imageB for the LUT interface. If the interface is not currently a dual-panel interface, it is re-created with the tabbed pane and two interface panels.
        Parameters:
        image -
        LUT -
      • setLUT

        public void setLUT​(JPanelHistogram panel,
                           ModelStorageBase LUT)
        Sets the LUT for the input panel.
        Parameters:
        panel - the panel to set the LUT for.
        LUT - the new LUT.
      • setLUTA

        public void setLUTA​(ModelStorageBase LUT)
        Set LUTa
        Parameters:
        LUT -
      • setLUTB

        public void setLUTB​(ModelStorageBase LUT)
        Set LUTb
        Parameters:
        LUT -
      • setRedOn

        public void setRedOn​(boolean isOn,
                             boolean isImageA)
        Sets the red flag to be on or off.
        Parameters:
        isOn - flag, either on or off.
        isImageA - when true apply to imageA, when false apply to imageB.
      • setTransferFunctionA

        public void setTransferFunctionA​(TransferFunction txFunction)
        Set the transfer function for imageA.
        Parameters:
        txFunction -
      • setTransferFunctionB

        public void setTransferFunctionB​(TransferFunction txFunction)
        Set the transfer function for imageA.
        Parameters:
        txFunction -
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent event)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
      • updateFrames

        public void updateFrames​(boolean flag)
        Parameters:
        flag -
      • updateImageExtents

        public boolean updateImageExtents()
        Description copied from interface: ViewImageUpdateInterface
        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
        Returns:
        boolean confirming successful update
      • updateImages

        public boolean updateImages()
        Description copied from interface: ViewImageUpdateInterface
        This methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Returns:
        boolean confirming successful update
      • updateImages

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

        public boolean updateImages​(ModelLUT LUTa,
                                    ModelLUT LUTb,
                                    boolean flag,
                                    int interpMode)
        Description copied from interface: ViewImageUpdateInterface
        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
        flag - forces show to re import image and calc. java image
        interpMode - image interpolation method (Nearest or Smooth)
        Returns:
        boolean confirming a successful update
      • updateInterpolation

        public void updateInterpolation()
        updates the interpolation mode for the images.
      • updateRealTime

        public void updateRealTime​(boolean updateRealTime)
        Updates the interface behavior when the user choses to update in real-time or on mouse release.
        Parameters:
        updateRealTime -
      • windowActivated

        public void windowActivated​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowActivated in interface java.awt.event.WindowListener
      • windowClosed

        public void windowClosed​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowClosed in interface java.awt.event.WindowListener
      • windowClosing

        public void windowClosing​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
      • windowDeactivated

        public void windowDeactivated​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowDeactivated in interface java.awt.event.WindowListener
      • windowDeiconified

        public void windowDeiconified​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowDeiconified in interface java.awt.event.WindowListener
      • windowIconified

        public void windowIconified​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowIconified in interface java.awt.event.WindowListener
      • windowOpened

        public void windowOpened​(java.awt.event.WindowEvent arg0)
        Specified by:
        windowOpened in interface java.awt.event.WindowListener
      • buildMenu

        private void buildMenu​(javax.swing.JFrame frame)
        This method builds a menu which contains the options for opening/saving a LUT or set of transfer functions, closing the LUT, and utilities such as CT presets.
      • createPanel

        protected javax.swing.JPanel createPanel()
        Creates the display panel. If there are two images the panel contains a tabbed pane with the two interfaces panels. If there is only one image the panel contains just the interface.
        Returns:
        the new display panel.
      • createPanel

        protected void createPanel​(boolean simple)
      • processFileMenu

        private void processFileMenu​(java.lang.String command)
        Called when the FileMenu is activated. Processes the commands from the file menu.
        Parameters:
        command - the file menu command.
      • processUtilitiesMenu

        private void processUtilitiesMenu​(java.awt.event.ActionEvent event,
                                          java.lang.String command)
        Called when the Utilities Menu is activated. Processes the commands from the utilities menu.
        Parameters:
        command - the utilities menu command.