Class JPanelVirtualEndoscopySetup

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

public class JPanelVirtualEndoscopySetup extends JPanelRendererJ3D
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
      DOCUMENT ME!
    • flythruLabelFileName

      private JLabel flythruLabelFileName
      DOCUMENT ME!
    • kDialogSmooth

      private JDialogSmoothMesh kDialogSmooth
      Surface smooth control panel reference.
    • kFile

      private File kFile
      File to open the mask suface.
    • kPanelButton

      private JPanel kPanelButton
      Button panel.
    • m_bShowMeanCurvatures

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

      private JButton m_kButtonLoadSurface
      DOCUMENT ME!
    • m_kCheckBoxShowCurvatures

      private JCheckBox m_kCheckBoxShowCurvatures
      DOCUMENT ME!
    • m_kComboSegmentSurfaceBranchSamplesReductionFactor

      private JComboBox m_kComboSegmentSurfaceBranchSamplesReductionFactor
      Surface sample reduction factor.
    • m_kContinueUpdate

      private JCheckBox m_kContinueUpdate
      DOCUMENT ME!
    • m_kDecimalFormat

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

      private JLabel m_kLabelBranch
      DOCUMENT ME!
    • m_kLabelDirection

      private JLabel m_kLabelDirection
      DOCUMENT ME!
    • m_kLabelDistance

      private JLabel m_kLabelDistance
      DOCUMENT ME!
    • m_kLabelFileName

      private JLabel m_kLabelFileName
      Automatically inserted by JBuilder Designer.
    • m_kLabelOrientation

      private JLabel m_kLabelOrientation
      DOCUMENT ME!
    • m_kLabelPosition

      private JLabel m_kLabelPosition
      DOCUMENT ME!
    • m_kLabelStepGaze

      private JLabel m_kLabelStepGaze
      DOCUMENT ME!
    • m_kMeanCurvaturesLUT

      private ModelLUT m_kMeanCurvaturesLUT
      kMean curvature LUT. Pseudo color look up table.
    • m_kOptions

      private FlythruRender.SetupOptions m_kOptions
      Image option panel.
    • m_kTextBranch

      private JTextField m_kTextBranch
      DOCUMENT ME!
    • m_kTextDirection

      private JTextField m_kTextDirection
      DOCUMENT ME!
    • m_kTextDistance

      private JTextField m_kTextDistance
      DOCUMENT ME!
    • 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
      DOCUMENT ME!
    • m_kTextPercentBSplineNumControlPoints

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

      private JTextField m_kTextPosition
      DOCUMENT ME!
    • m_kTextStepGaze

      private JTextField m_kTextStepGaze
      DOCUMENT ME!
    • m_kTriangleMesh

      private ModelTriangleMesh m_kTriangleMesh
      Keep a copy of the loaded triangle mesh and any other properties associated with the surface.
    • m_kView

      private final FlythruRender m_kView
      Applet that is associated with the controls in this frame.
    • parentFrame

      private ViewJFrameVolumeView parentFrame
      Keep a reference to the ViewJFrameVolumeView.
    • scroller

      private JScrollPane scroller
      Scroll pane.
    • scrollPanel

      Scroll panel that holding all the control components.
    • surfaceDir

      private String surfaceDir
      Loaded mask surface image directory.
    • updateButton

      private JButton updateButton
      continue update button.
  • Constructor Details

    • JPanelVirtualEndoscopySetup

      public JPanelVirtualEndoscopySetup(FlythruRender _kView)
      Used primarily for the script to store variables and run the algorithm. No actual dialog will appear but the set up info and result image will be stored here. This method is not used for now.
      Parameters:
      _kView - parent frame reference.
    • JPanelVirtualEndoscopySetup

      public JPanelVirtualEndoscopySetup(FlythruRender _kView, ViewJFrameVolumeView _parentFrame)
      Creates endoscopy registration control panel.
      Parameters:
      _kView - FlythruRender refrence.
      _parentFrame - ViewJFrameVolumeView parent frame reference.
  • 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.
    • 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
    • setColor

      public void setColor(Color _color)
      When the surface panel change the surface color, endoscopy view changes the color accordingly.
      Parameters:
      _color - Color
    • updateOrientation

      public void updateOrientation(FlyPathBehavior kFlyPathBehavior)
      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 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.
    • 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(javax.vecmath.Point3f 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(javax.vecmath.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(javax.vecmath.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
    • init

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

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

      private void loadingSurface()
      Mask to load the surface 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.