Class JPanelVirtualEndoscopySetup
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gov.nih.mipav.view.renderer.JPanelRendererBase
gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
gov.nih.mipav.view.renderer.J3D.surfaceview.flythruview.JPanelVirtualEndoscopySetup
- All Implemented Interfaces:
ActionListener,FocusListener,ItemListener,KeyListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classWrapper in order to hold the control panel layout in the JScrollPane.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BoxBox layout for control panel.private booleanFlag indicates to continue update the surface render and plane render or not.private StringFile name and directory.private ModelImageLoaded endoscopy image file.private StringFile name and directory.private JButtonDOCUMENT ME!private JLabelDOCUMENT ME!private JDialogSmoothMeshSurface smooth control panel reference.private FileFile to open the mask suface.private JPanelButton panel.private booleanFlag indicates to show pseudo color or not.private JButtonDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JComboBoxSurface sample reduction factor.private JCheckBoxDOCUMENT ME!private final DecimalFormatUsed to create text representations of numbers.private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelAutomatically inserted by JBuilder Designer.private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!private ModelLUTkMean curvature LUT.private FlythruRender.SetupOptionsImage option panel.private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldmaximum number of branches created for the endoscopy view.private JTextFieldminimum branch length.private JTextFieldDOCUMENT ME!private JTextFieldBSpline control points fraction of branch samples.private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private ModelTriangleMeshKeep a copy of the loaded triangle mesh and any other properties associated with the surface.private final FlythruRenderApplet that is associated with the controls in this frame.private ViewJFrameVolumeViewKeep a reference to the ViewJFrameVolumeView.private JScrollPaneScroll pane.Scroll panel that holding all the control components.private static final longUse serialVersionUID for interoperability.private StringLoaded mask surface image directory.private JButtoncontinue update button.Fields inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
rayBasedRender, renderBaseFields inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
applyButton, cancelButton, cancelFlag, closeButton, helpButton, isActiveImage, mainPanel, NEW, OKButton, REPLACE, runInSeparateThread, serif12, serif12BFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionUsed primarily for the script to store variables and run the algorithm.JPanelVirtualEndoscopySetup(FlythruRender _kView, ViewJFrameVolumeView _parentFrame) Creates endoscopy registration control panel. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the OK button is pressed, sets up the variables needed for running the algorithm, and calls the algorithm.voiddispose(boolean flag) Dispose memory.Return the main control panel.private voidinit()Initializes the GUI components and displays the control panel.private voidMethod to load the mask image.private voidMask to load the surface image.(package private) voidShow the psesudo color.(package private) voidContinue update the surface render and the plane render.voidresizePanel(int panelWidth, int frameHeight) Resize the control panel with ViewJFrameVolumeView's frame width and height.protected voidsetBranchInfo(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.voidWhen the surface panel change the surface color, endoscopy view changes the color accordingly.protected voidsetPathDistance(float fDist, float fTotalDist) Update the display to show the current distance along the length of the path.protected voidsetPathPosition(javax.vecmath.Point3f kPosition) Update the display to show the coordinates of the current position along the path.protected voidsetStepGazeDist(float fStepDist, float fGazeDist) Update the display to show the current gaze distance for looking ahead down the path.private booleanSets up the variables needed for the algorithm from the GUI components.protected voidsetViewDirection(javax.vecmath.Vector3f kVector) Update the display to show the current base viewing direction at the current point along the path.protected voidsetViewOrientation(javax.vecmath.Matrix3f kMatrix) Update the display to show the current viewing orientation which is always relative to the base viewing direction.protected booleantestParameterMin(String str, double minValue) Tests that the entered parameter is larger than the specified value.voidupdateOrientation(FlyPathBehavior kFlyPathBehavior) Update the appropriate controls based on the current settings of the orientation-based information in the FlyPathBehavior instance.voidupdatePosition(FlyPathBehavior kFlyPathBehavior) Update the appropriate controls based on the current settings of the position-based information in the FlyPathBehavior instance.Methods inherited from class gov.nih.mipav.view.renderer.J3D.JPanelRendererJ3D
disposeLocal, getSurfaceRender, setRayBasedRender, setSurfaceRenderMethods inherited from class gov.nih.mipav.view.renderer.JPanelRendererBase
buildApplyButton, buildCancelButton, buildCloseButton, buildHelpButton, buildOKButton, buildTitledBorder, finalize, focusGained, focusLost, isCancelled, itemStateChanged, keyPressed, keyReleased, keyTyped, makeString, setLeftHandSystem, setVisible, setVisibleStandard, setWCSystem, testParameterMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, unregisterKeyboardAction, updateMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.event.FocusListener
focusGained, focusLostMethods inherited from interface java.awt.event.ItemListener
itemStateChangedMethods inherited from interface java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
contentBox
Box layout for control panel. -
continueUpdate
private boolean continueUpdateFlag indicates to continue update the surface render and plane render or not. -
endoscopyImage
Loaded endoscopy image file. -
fileName
File name and directory. -
directory
File name and directory. -
flythruButtonLoadImage
DOCUMENT ME! -
flythruLabelFileName
DOCUMENT ME! -
kDialogSmooth
Surface smooth control panel reference. -
kFile
File to open the mask suface. -
kPanelButton
Button panel. -
m_bShowMeanCurvatures
private boolean m_bShowMeanCurvaturesFlag indicates to show pseudo color or not. -
m_kButtonLoadSurface
DOCUMENT ME! -
m_kCheckBoxShowCurvatures
DOCUMENT ME! -
m_kComboSegmentSurfaceBranchSamplesReductionFactor
Surface sample reduction factor. -
m_kContinueUpdate
DOCUMENT ME! -
m_kDecimalFormat
Used to create text representations of numbers. -
m_kLabelBranch
DOCUMENT ME! -
m_kLabelDirection
DOCUMENT ME! -
m_kLabelDistance
DOCUMENT ME! -
m_kLabelFileName
Automatically inserted by JBuilder Designer. -
m_kLabelOrientation
DOCUMENT ME! -
m_kLabelPosition
DOCUMENT ME! -
m_kLabelStepGaze
DOCUMENT ME! -
m_kMeanCurvaturesLUT
kMean curvature LUT. Pseudo color look up table. -
m_kOptions
Image option panel. -
m_kTextBranch
DOCUMENT ME! -
m_kTextDirection
DOCUMENT ME! -
m_kTextDistance
DOCUMENT ME! -
m_kTextMaxNumBranches
maximum number of branches created for the endoscopy view. -
m_kTextMinBranchLength
minimum branch length. -
m_kTextOrientation
DOCUMENT ME! -
m_kTextPercentBSplineNumControlPoints
BSpline control points fraction of branch samples. -
m_kTextPosition
DOCUMENT ME! -
m_kTextStepGaze
DOCUMENT ME! -
m_kTriangleMesh
Keep a copy of the loaded triangle mesh and any other properties associated with the surface. -
m_kView
Applet that is associated with the controls in this frame. -
parentFrame
Keep a reference to the ViewJFrameVolumeView. -
scroller
Scroll pane. -
scrollPanel
Scroll panel that holding all the control components. -
surfaceDir
Loaded mask surface image directory. -
updateButton
continue update button.
-
-
Constructor Details
-
JPanelVirtualEndoscopySetup
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
Creates endoscopy registration control panel.- Parameters:
_kView- FlythruRender refrence._parentFrame- ViewJFrameVolumeView parent frame reference.
-
-
Method Details
-
actionPerformed
Closes dialog box when the OK button is pressed, sets up the variables needed for running the algorithm, and calls the algorithm.- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classJPanelRendererBase- Parameters:
event- Event that triggers function
-
dispose
public void dispose(boolean flag) Dispose memory.- Parameters:
flag- dispose super or not.
-
getMainPanel
Return the main control panel.- Specified by:
getMainPanelin classJPanelRendererBase- 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:
resizePanelin classJPanelRendererBase- Parameters:
panelWidth- control panel widthframeHeight- control panel height
-
setColor
When the surface panel change the surface color, endoscopy view changes the color accordingly.- Parameters:
_color- Color
-
updateOrientation
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
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 onbPathMoveForward- 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 startfTotalDist- 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
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:
trueif parameters passed range test,falseif failed.
-
m_kCheckBoxShowCurvatures_actionPerformed
Show the psesudo color.- Parameters:
e- ActionEvent
-
m_kContinueUpdate_actionPerformed
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.
-