Class ViewJFramePlotterView

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

    public class ViewJFramePlotterView
    extends ViewJFrameBase

    Title: ViewJFramePlotterView

    Description: The plotter render view frame. The plotter render views images based on each slice intensity values. Component surface created from a 2D image. The intensity values are mapped like a relief map, with higher intensities making peaks and lower intensities forming valleys. A quad mesh is used to create the three-dimensional map. The same LUT from the image is used to colors the vertices of the quad mesh.

    Author:
    Matthew J. McAuliffe, Ph.D.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  ViewJFramePlotterView.TabbedItem
      Item to hold tab name and corresponding panel.
      • Nested classes/interfaces inherited from class javax.swing.JFrame

        javax.swing.JFrame.AccessibleJFrame
      • Nested classes/interfaces inherited from class java.awt.Frame

        java.awt.Frame.AccessibleAWTFrame
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      Calls various methods depending on the action.
      private void buildCameraPanel()
      Build the camera snap shot panel.
      protected javax.swing.JMenuBar buildMenu()
      Builds menu.
      private void buildMousePanel()
      Build the mouse recorder panel.
      private void buildSurfaceBoxPanel()
      Build the options panel.
      private void buildToolBar()
      Builds the toolbar for the volume render frame.
      private void buildViewPanel()
      Build the view control panel.
      protected void configureFrame()
      Constructs main frame structures for 3 images.
      void disposeLocal​(boolean flag)
      Dispose memory.
      protected void finalize()
      Cleans up memory from gc.
      ViewControlsImage getControls()
      DOCUMENT ME!
      ModelImage getImageA()
      DOCUMENT ME!
      ModelImage getImageB()
      DOCUMENT ME!
      protected void init()
      Initialize the the frame layout.
      void insertTab​(java.lang.String _name, javax.swing.JPanel _panel)
      Insert the new tab into the current visible tab list.
      void removeControls()
      DOCUMENT ME!
      void setActiveImage​(int active)
      DOCUMENT ME!
      void setAlphaBlend​(int value)
      DOCUMENT ME!
      void setControls()
      DOCUMENT ME!
      void setEnabled​(boolean flag)
      DOCUMENT ME!
      void setImageB​(ModelImage imageB)
      DOCUMENT ME!
      void setLUTa​(ModelLUT LUT)
      Accessor that sets the LUT.
      void setPaintBitmapSwitch​(boolean flag)
      DOCUMENT ME!
      void setRGBTA​(ModelRGB RGBT)
      Sets the RGB table for ARGB image A.
      void setRGBTB​(ModelRGB RGBT)
      DOCUMENT ME!
      void setSlice​(int slice)
      Funcions do nothing, but extends ViewJFrameBase.
      void setTimeSlice​(int slice)
      DOCUMENT ME!
      void setTitle()
      DOCUMENT ME!
      boolean updateImageExtents()
      DOCUMENT ME!
      boolean updateImages()
      Update images in surface render, raycast render and shearwarp render.
      boolean updateImages​(boolean forceShow)
      This methods calls corresponding render to update images without LUT changes.
      boolean updateImages​(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
      This methods calls corresponding render to update images with LUT changes.
      void windowClosing​(java.awt.event.WindowEvent event)
      Closes window and disposes of frame and component.
      • Methods inherited from class javax.swing.JFrame

        addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Frame

        addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.awt.MenuContainer

        getFont, postEvent
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • config

        protected java.awt.GraphicsConfiguration config
        Configuration param, which will pass down to each render's constructor.
      • serif12

        protected java.awt.Font serif12
        Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      • serif12B

        protected java.awt.Font serif12B
        Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      • cameraPanel

        private javax.swing.JPanel cameraPanel
        DOCUMENT ME!
      • imagePanel

        private javax.swing.JPanel imagePanel
        The image panel to hold one Canvas3D.
      • itemLine

        private javax.swing.JCheckBoxMenuItem itemLine
        Image line mode check box.
      • mousePanel

        private javax.swing.JPanel mousePanel
        DOCUMENT ME!
      • openingMenuBar

        private javax.swing.JMenuBar openingMenuBar
        Menu bar.
      • panelToolbar

        private javax.swing.JPanel panelToolbar
        Toolbar panel.
      • plotterRender

        private SurfacePlotter plotterRender
        Surface plotter view.
      • raisedbevel

        private javax.swing.border.Border raisedbevel
        Panel Border view.
      • loweredbevel

        private javax.swing.border.Border loweredbevel
        Panel Border view.
      • compound

        private javax.swing.border.Border compound
        Panel Border view.
      • screenWidth

        private int screenWidth
        Screen width, screen height.
      • screenHeight

        private int screenHeight
        Screen width, screen height.
      • sliderControlPanel

        private javax.swing.JPanel sliderControlPanel
        DOCUMENT ME!
      • surfaceBoxPanel

        private javax.swing.JPanel surfaceBoxPanel
        DOCUMENT ME!
      • surTabVector

        private java.util.Vector surTabVector
        DOCUMENT ME!
      • tabbedPane

        private javax.swing.JTabbedPane tabbedPane
        The main tabbed pane in the volume view frame.
      • tabVector

        private java.util.Vector tabVector
        For each render, use the vector to store the currently active tabs.
      • viewPanel

        private javax.swing.JPanel viewPanel
        Control panel for the surface renderer.
    • Constructor Detail

      • ViewJFramePlotterView

        public ViewJFramePlotterView​(ModelImage _imageA,
                                     ModelLUT _LUTa,
                                     int slice)
        The frame the rendering the plotter view of images. The plotter renderer view images based on the image intensity values.
        Parameters:
        _imageA - ModelImage source model images
        _LUTa - ModelLUT image LUT table
        slice - int slice number
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Calls various methods depending on the action.
        • Surface - opens the surface dialog
        • View - opens the view control dialog
        • Mouse - opens the mouse recorder dialog
        • About - displays a message about this renderer
        • Exit - sets variables to null and disposes of this frame
        • X, Y, Z checkboxes - toggles the appropriate image planes on or off
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Specified by:
        actionPerformed in class ViewJFrameBase
        Parameters:
        event - Event that triggered function.
      • disposeLocal

        public void disposeLocal​(boolean flag)
        Dispose memory.
        Parameters:
        flag - DOCUMENT ME!
      • insertTab

        public void insertTab​(java.lang.String _name,
                              javax.swing.JPanel _panel)
        Insert the new tab into the current visible tab list.
        Parameters:
        _name - String Tab name.
        _panel - JPanel Control panel.
      • setActiveImage

        public void setActiveImage​(int active)
        DOCUMENT ME!
        Specified by:
        setActiveImage in class ViewJFrameBase
        Parameters:
        active - DOCUMENT ME!
      • setAlphaBlend

        public void setAlphaBlend​(int value)
        DOCUMENT ME!
        Specified by:
        setAlphaBlend in class ViewJFrameBase
        Parameters:
        value - DOCUMENT ME!
      • setEnabled

        public void setEnabled​(boolean flag)
        DOCUMENT ME!
        Specified by:
        setEnabled in class ViewJFrameBase
        Parameters:
        flag - DOCUMENT ME!
      • setLUTa

        public void setLUTa​(ModelLUT LUT)
        Accessor that sets the LUT.
        Overrides:
        setLUTa in class ViewJFrameBase
        Parameters:
        LUT - the LUT
      • setPaintBitmapSwitch

        public void setPaintBitmapSwitch​(boolean flag)
        DOCUMENT ME!
        Specified by:
        setPaintBitmapSwitch in class ViewJFrameBase
        Parameters:
        flag - DOCUMENT ME!
      • setRGBTA

        public void setRGBTA​(ModelRGB RGBT)
        Sets the RGB table for ARGB image A.
        Specified by:
        setRGBTA in class ViewJFrameBase
        Parameters:
        RGBT - DOCUMENT ME!
      • setSlice

        public void setSlice​(int slice)
        Funcions do nothing, but extends ViewJFrameBase.
        Parameters:
        slice - DOCUMENT ME!
      • setTimeSlice

        public void setTimeSlice​(int slice)
        DOCUMENT ME!
        Parameters:
        slice - DOCUMENT ME!
      • updateImages

        public boolean updateImages()
        Update images in surface render, raycast render and shearwarp render.
        Returns:
        boolean boolean confirming successful update
      • updateImages

        public boolean updateImages​(boolean forceShow)
        This methods calls corresponding render to update images without LUT changes.
        Parameters:
        forceShow - forces show to reimport image and calc. java image
        Returns:
        boolean confirming successful update
      • updateImages

        public boolean updateImages​(ModelLUT LUTa,
                                    ModelLUT LUTb,
                                    boolean forceShow,
                                    int interpMode)
        This methods calls corresponding render to update images with LUT changes.
        Parameters:
        LUTa - LUT used to update imageA
        LUTb - LUT used to update imageB
        forceShow - forces show to reimport image and calc. java image
        interpMode - image interpolation method (Nearest or Smooth)
        Returns:
        boolean confirming successful update
      • windowClosing

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

        protected javax.swing.JMenuBar buildMenu()
        Builds menu.
        Returns:
        DOCUMENT ME!
      • configureFrame

        protected void configureFrame()
        Constructs main frame structures for 3 images.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Cleans up memory from gc.
        Overrides:
        finalize in class ViewJFrameBase
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • init

        protected void init()
        Initialize the the frame layout.
      • buildCameraPanel

        private void buildCameraPanel()
        Build the camera snap shot panel.
      • buildMousePanel

        private void buildMousePanel()
        Build the mouse recorder panel.
      • buildSurfaceBoxPanel

        private void buildSurfaceBoxPanel()
        Build the options panel.
      • buildToolBar

        private void buildToolBar()
        Builds the toolbar for the volume render frame.
      • buildViewPanel

        private void buildViewPanel()
        Build the view control panel.