Class JPanelVirtualEndoscopySetup_WM

All Implemented Interfaces:
ActionListener, FocusListener, ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class JPanelVirtualEndoscopySetup_WM extends JPanelRendererBase
Control panel to set up the virtual endoscopy volume view. This panel loads the mask image and surface file. It also adjusts the endoscopy view parameters.
See Also:
  • Field Details

    • serialVersionUID

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

      private Box contentBox
      Box layout for control panel.
    • continueUpdate

      private boolean continueUpdate
      Flag indicates to continue update the surface render and plane render or not.
    • endoscopyImage

      private ModelImage endoscopyImage
      Loaded endoscopy image file.
    • fileName

      private String fileName
      File name and directory.
    • directory

      private String directory
      File name and directory.
    • flythruButtonLoadImage

      private JButton flythruButtonLoadImage
      Load image button.
    • flythruLabelFileName

      private JLabel flythruLabelFileName
      Image file name label.
    • kPanelButton

      private JPanel kPanelButton
      Button panel.
    • m_bShowMeanCurvatures

      private boolean m_bShowMeanCurvatures
      Flag indicates to show pseudo color or not.
    • m_kCheckBoxShowCurvatures

      private JCheckBox m_kCheckBoxShowCurvatures
      Show curvature colors check box.
    • m_kComboSegmentSurfaceBranchSamplesReductionFactor

      private JComboBox m_kComboSegmentSurfaceBranchSamplesReductionFactor
      Surface sample reduction factor.
    • m_kContinueUpdate

      private JCheckBox m_kContinueUpdate
      Continuous update check box.
    • m_kDecimalFormat

      private final DecimalFormat m_kDecimalFormat
      Used to create text representations of numbers.
    • m_kLabelBranch

      private JLabel m_kLabelBranch
      Branch label.
    • m_kLabelDirection

      private JLabel m_kLabelDirection
      View direction label.
    • m_kLabelDistance

      private JLabel m_kLabelDistance
      Path distance label.
    • m_kLabelFileName

      private JLabel m_kLabelFileName
      Automatically inserted by JBuilder Designer.
    • m_kLabelOrientation

      private JLabel m_kLabelOrientation
      Orientation label.
    • m_kLabelPosition

      private JLabel m_kLabelPosition
      Current path position label.
    • m_kLabelStepGaze

      private JLabel m_kLabelStepGaze
      Step gaze label.
    • m_kOptions

      private FlyThroughRender.SetupOptions m_kOptions
      Image option panel.
    • m_kTextBranch

      private JTextField m_kTextBranch
      Current branch text box.
    • m_kTextDirection

      private JTextField m_kTextDirection
      View direction text box.
    • m_kTextDistance

      private JTextField m_kTextDistance
      Distance along path text box.
    • m_kTextMaxNumBranches

      private JTextField m_kTextMaxNumBranches
      maximum number of branches created for the endoscopy view.
    • m_kTextMinBranchLength

      private JTextField m_kTextMinBranchLength
      minimum branch length.
    • m_kTextOrientation

      private JTextField m_kTextOrientation
      Orientation text box.
    • m_kTextPercentBSplineNumControlPoints

      private JTextField m_kTextPercentBSplineNumControlPoints
      BSpline control points fraction of branch samples.
    • m_kTextPosition

      private JTextField m_kTextPosition
      Position text box.
    • m_kTextStepGaze

      private JTextField m_kTextStepGaze
      Step gaze text box.
    • m_kView

      private final FlyThroughRender m_kView
      Renderer for displaying the scene-graph.
    • scroller

      private JScrollPane scroller
      Scroll pane.
    • scrollPanel

      Scroll panel that holding all the control components.
    • updateButton

      private JButton updateButton
      continue update button.
  • Constructor Details

    • JPanelVirtualEndoscopySetup_WM

      public JPanelVirtualEndoscopySetup_WM(FlyThroughRender _kView)
      Creates endoscopy registration control panel.
      Parameters:
      _kView - FlythruRender refrence.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed, sets up the variables needed for running the algorithm, and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class JPanelRendererBase
      Parameters:
      event - Event that triggers function
    • dispose

      public void dispose(boolean flag)
      Dispose memory.
      Parameters:
      flag - dispose super or not.
    • getContinuousUpdate

      public boolean getContinuousUpdate()
      Return whether to update the Volume Tri-Planar view continuously as the fly path changes.
      Returns:
      true when updating the Volume Tri-Planar view continuously as the fly path changes.
    • getMainPanel

      public JPanel getMainPanel()
      Return the main control panel.
      Specified by:
      getMainPanel in class JPanelRendererBase
      Returns:
      JPanel the main control panel
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resize the control panel with ViewJFrameVolumeView's frame width and height.
      Overrides:
      resizePanel in class JPanelRendererBase
      Parameters:
      panelWidth - control panel width
      frameHeight - control panel height
    • updateOrientation

      public void updateOrientation(WildMagic.LibFoundation.Mathematics.Matrix3f kOrientation)
      Update the appropriate controls based on the current settings of the orientation-based information in the FlyPathBehavior instance.
      Parameters:
      kFlyPathBehavior - FlyPathBehavior Instance which contains the current state of orientation along the branches.
    • updatePosition

      public void updatePosition(FlyPathBehavior_WM kFlyPathBehavior)
      Update the appropriate controls based on the current settings of the position-based information in the FlyPathBehavior instance.
      Parameters:
      kFlyPathBehavior - FlyPathBehavior Instance which contains the current state of position along the branches.
    • init

      private void init()
      Initializes the GUI components and displays the control panel.
    • loadingImage

      private void loadingImage()
      Method to load the mask image.
    • setVariables

      private boolean setVariables()
      Sets up the variables needed for the algorithm from the GUI components.
      Returns:
      Flag indicating if the setup was successful.
    • setBranchInfo

      protected void setBranchInfo(int iBranch, boolean bPathMoveForward)
      Update the display to show the current branch and path direction (forward or reverse) for moving along the length of the path.
      Parameters:
      iBranch - index which identifies the branch currently on
      bPathMoveForward - flag set if moving forward, as opposed to in reverse, along the length of the path.
    • setPathDistance

      protected void setPathDistance(float fDist, float fTotalDist)
      Update the display to show the current distance along the length of the path.
      Parameters:
      fDist - distance along the path from the start
      fTotalDist - total distance along the path from start to end
    • setPathPosition

      protected void setPathPosition(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
      Update the display to show the coordinates of the current position along the path.
      Parameters:
      kPosition - 3D coordinates of current position
    • setStepGazeDist

      protected void setStepGazeDist(float fStepDist, float fGazeDist)
      Update the display to show the current gaze distance for looking ahead down the path.
      Parameters:
      fStepDist - magnitude is the distance increment along the path for moving; sign is the direction of moving along the path from one end to the other or vice versa.
      fGazeDist - distance ahead for looking down the path.
    • setViewDirection

      protected void setViewDirection(WildMagic.LibFoundation.Mathematics.Vector3f kVector)
      Update the display to show the current base viewing direction at the current point along the path.
      Parameters:
      kVector - normalized direciton vector
    • setViewOrientation

      protected void setViewOrientation(WildMagic.LibFoundation.Mathematics.Matrix3f kMatrix)
      Update the display to show the current viewing orientation which is always relative to the base viewing direction.
      Parameters:
      kMatrix - 3x3 matrix containing orientation transform
    • testParameterMin

      protected boolean testParameterMin(String str, double minValue)
      Tests that the entered parameter is larger than the specified value.
      Parameters:
      str - The value entered by the user.
      minValue - The minimum value this variable may be set to.
      Returns:
      true if parameters passed range test, false if failed.
    • m_kCheckBoxShowCurvatures_actionPerformed

      void m_kCheckBoxShowCurvatures_actionPerformed(ActionEvent e)
      Show the psesudo color.
      Parameters:
      e - ActionEvent
    • m_kContinueUpdate_actionPerformed

      void m_kContinueUpdate_actionPerformed(ActionEvent e)
      Continue update the surface render and the plane render.
      Parameters:
      e - ActionEvent