Class JPanelBrainSurfaceFlattener_WM

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gov.nih.mipav.view.renderer.WildMagic.brainflattenerview_WM.JPanelBrainSurfaceFlattener_WM
All Implemented Interfaces:
ViewImageUpdateInterface, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelBrainSurfaceFlattener_WM extends JPanel implements ActionListener, ViewImageUpdateInterface
See Also:
  • Field Details

    • serialVersionUID

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

      protected JPanel mainPanel
      The main control.
    • serif12

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

      protected Font serif12B
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
    • OKButton

      protected JButton OKButton
      OK button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.
    • cancelButton

      protected JButton cancelButton
      Cancel button is used on most dialogs. Defining it in the base allows default actions if the user presses return and the button is in focus.
    • m_bFileLoaded

      private boolean m_bFileLoaded
      Set to true when a surface has been loaded
    • m_bFirstSurface

      private boolean m_bFirstSurface
      Causes the surface LUT to be calculated for the first time.
    • m_iGridY

      private int m_iGridY
      Keeps track of the user-interface position in the main panel.
    • m_kDisablePick

      private JRadioButton m_kDisablePick
      Enable/disable correspondence picking
    • m_kDisplayButtonGroup

      private ButtonGroup m_kDisplayButtonGroup
      ButtonGroup for the plane/surface display selection.
    • m_kDisplayPlane

      private JRadioButton m_kDisplayPlane
      Toggle displaying the plane on/off
    • m_kDisplaySphere

      private JRadioButton m_kDisplaySphere
      Toggle displaying the sphere on/off
    • m_kLatLonLines

      private JCheckBox m_kLatLonLines
      Toggle display of latitude/longitude lines on/off.
    • m_kLUTa

      private ModelLUT m_kLUTa
      Color LUT based on Volume Data
    • m_kLUTImageA

      private ModelImage m_kLUTImageA
      Volume data for LUT
    • m_kNumLatText

      private JTextField m_kNumLatText
      Text box for entering the number of latitude lines.
    • m_kNumLonText

      private JTextField m_kNumLonText
      Text box for entering the number of longitude lines.
    • m_kPanelBrainsurfaceFlattenerLUT

      private JFrameHistogram m_kPanelBrainsurfaceFlattenerLUT
      LUT Panel based on surface curvature.
    • m_kPickButtonGroup

      private ButtonGroup m_kPickButtonGroup
      Picking button group -- switch between picking correspondence points and the puncture triangle.
    • m_kPickCorrespondence

      private JRadioButton m_kPickCorrespondence
      Correspondence point picking.
    • m_kPickPuncture

      private JRadioButton m_kPickPuncture
      Puncture triangle picking.
    • m_kTriangleMesh

      private WildMagic.LibGraphics.SceneGraph.TriMesh m_kTriangleMesh
      Brain Surface TriMesh
    • m_kView

      private CorticalAnalysisRender m_kView
      Brain Surface Renderer.
    • scroller

      private JScrollPane scroller
      The scroll pane holding the panel content. Useful when the screen is small.
    • m_kInsidePanel

      private JPanel m_kInsidePanel
      Panel container.
    • m_kVolumeViewer

      private VolumeTriPlanarInterface m_kVolumeViewer
      Parent user-interface frame.
  • Constructor Details

    • JPanelBrainSurfaceFlattener_WM

      public JPanelBrainSurfaceFlattener_WM(CorticalAnalysisRender kView, VolumeTriPlanarInterface kParent)
      Create the control-panel for the brainsurfaceFlattener interface:
      Parameters:
      kView - the engine behind the brainsurfaceFlattener and one of the parent frames affected by the interface
      kParentFrame - the parent frame for the panel, contains the surfaceRenderer, where the brain model is displayed
  • Method Details

    • buildTitledBorder

      public static TitledBorder buildTitledBorder(String title)
      Builds a titled border with the given title, an etched border, and the proper font and color. Changed to public static member so that it can be used for other JPanels not inherited from this base class.
      Parameters:
      title - Title of the border
      Returns:
      The titled border.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • displayCorticalAnalysis

      public WildMagic.LibGraphics.SceneGraph.Node displayCorticalAnalysis(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
      Parameters:
      kMesh -
      Returns:
      Scene-graph node containing the TriMesh lat/lon lines.
    • disposeLocal

      public void disposeLocal()
      Memory cleanup.
    • getImageA

      public ModelImage getImageA()
      Return ModelImage A.
      Returns:
      ModelImage A.
    • getImageB

      public ModelImage getImageB()
      Return ModelImage B.
      Returns:
      ModelImage B.
    • getMainPanel

      public JPanel getMainPanel()
      Return the main control panel.
      Returns:
      JPanel the main control panel
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resizing the control panel.
      Parameters:
      panelWidth - int width
      frameHeight - int height
    • setSlice

      public void setSlice(int slice)
      Description copied from interface: ViewImageUpdateInterface
      setSlice.
      Specified by:
      setSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - Current slice
    • setTimeSlice

      public void setTimeSlice(int tSlice)
      Description copied from interface: ViewImageUpdateInterface
      setTimeSlice.
      Specified by:
      setTimeSlice in interface ViewImageUpdateInterface
      Parameters:
      tSlice - Current time volume
    • 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
    • createLUTFromSurface

      private void createLUTFromSurface()
      Creates a LUT for the surface, where the curvature values are used in the look-up table instead of the ModelImage values:
    • init

      private void init()
      Initialize the user-interface, buttons and ActionCommands.
    • buildOKButton

      protected JButton buildOKButton()
      Builds the OK button. Sets it internally as well return the just-built button.
      Returns:
      OK button.
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable