Package gov.nih.mipav.view.renderer.J3D
Class ViewJFrameVolumeView
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.renderer.J3D.ViewJFrameVolumeView
-
- All Implemented Interfaces:
ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.ComponentListener
,java.awt.event.ItemListener
,java.awt.event.MouseListener
,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 ViewJFrameVolumeView extends ViewJFrameBase implements java.awt.event.MouseListener, java.awt.event.ItemListener, javax.swing.event.ChangeListener
The volume view frame of the visualization. The frame includes the surface renderer, the raycast renderer, the shearwarp renderer and the flythru renderer.- Author:
- Ruida Cheng
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ViewJFrameVolumeView.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.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
axialOrientation
Indicates that image orientation is unknown type or not.static int
BRAINSURFACE_FLATTENER
DOCUMENT ME!private MjCorticalAnalysis
brainsurfaceFlattenerRender
Rendering the brainsurfaceFlattener objects.private javax.swing.JPanel
cameraPanel
DOCUMENT ME!private javax.swing.JPanel
clipBox
DOCUMENT ME!private javax.swing.JButton
clipButton
Button to invoke all the six clipping planes.private javax.swing.JButton
clipDisableButton
Button to disable all the six clipping planes.private javax.swing.JButton
clipMaskButton
Button to crop the clip volume.private javax.swing.JButton
clipMaskUndoButton
Button to undo crop the clip volume.private javax.swing.JPanel
clipPanel
DOCUMENT ME!private javax.swing.JButton
clipPlaneButton
Button to invoke clipping planes.private javax.swing.JButton
clipSaveButton
Button to save clipped region.private javax.swing.border.Border
compound
Panel Border view.protected java.awt.GraphicsConfiguration
config
Configuration param, which will pass down to each render's constructor.private javax.swing.JPanel
displayPanel
DOCUMENT ME!private javax.swing.JSplitPane
dualImagePane
dual image pane that holds the left and right panel.private javax.swing.JPanel
dualImagePanel
The image panel to hold two Canvas3D.private javax.swing.JPanel
dualLeftPanel
Left panel of the dual panel view.static int
DUALPANEL
DOCUMENT ME!private javax.swing.JPanel
dualRightPanel
Right panel of the dual panel view.static int
ENDOSCOPY
DOCUMENT ME!private javax.swing.border.Border
etchedBorder
Panel Border view.private boolean
firstTimeVolView
Keep track of whether we're switching to the volume renderer for the first time.private JPanelVirtualEndoscopySetup
flythruControl
Fly through setup control panel.private JPanelFlythruMove
flythruMoveControl
Fly through movement control panel.private javax.swing.JPanel
flythruMovePanel
View panel contains the fly thru control panel.private FlythruRender.SetupOptions
flythruOptions
Fly through options.private javax.swing.JPanel
flythruPanel
Fly through panel.private FlythruRender
flythruRender
Reference to fly through renderer.private javax.swing.JButton
flythruSurfaceButton
Surface load button.private java.util.Vector
flythruTabVector
DOCUMENT ME!private javax.swing.JToolBar
flyThruToolbar
Flythru toolbar.private javax.swing.JPanel
histoLUTPanel
Control panel for the surface renderer.private ModelImage
imageAOriginal
Reference to the imageA original copy.private int
imageOrientation
Image orientation: coronal, sagittal, axial, unknown.private javax.swing.JPanel
imagePanel
The image panel to hold one Canvas3D.private JDialogIntensityPaint
intensityDialog
DOCUMENT ME!private boolean
isBrainsurfaceFlattenerEnable
Indicate if the brainsurface flattener render is enabled from the resample dialog or not.private boolean
isEndoscopyEnable
Indicate if the fly through render is enabled from the resample dialog or not.protected ModelImage
isoImageA
Isotropic version image A, B, used by the shear warp renderer.protected ModelImage
isoImageB
Isotropic version image A, B, used by the shear warp renderer.private boolean
isRayCastEnable
Indicate if the raycast render is enabled from the resample dialog or not.private boolean
isShearWarpEnable
Indicate if the shear warp render is enabled from the resample dialog or not.private boolean
isSurfaceRenderEnable
Indicate if the surface render is enabled from the resample dialog or not.private boolean
isSurfaceViewEnable
Indicate if the surface view is enabled from the resample dialog or not.private int
leftPanelRenderMode
The left panel renderer mode.private javax.swing.JPanel
lightPanel
DOCUMENT ME!private javax.swing.border.Border
loweredbevel
Panel Border view.private PlaneRender[]
m_akPlaneRender
The three slice views displayed as texture-mapped polygons:.private javax.swing.JPanel
m_kBrainsurfaceFlattenerPanel
Control panels for the Brainsurface Flattener:.private javax.swing.JPanel
m_kGeodesicPanel
Control panel for drawing geodesic curves.private javax.swing.JPanel
m_kSculptPanel
Control panel for volume sculpting.private int
maxPanelWidth
The max width of the control panels.private javax.swing.JMenuBar
menuBar
Menu bar.protected ViewMenuBuilder
menuObj
Menu items storage.protected javax.swing.JLabel
modelViewLabel
Labels for the current position in 3D ModelView coordinates:.protected javax.swing.JLabel[]
modelViewLabelVals
DOCUMENT ME!private javax.swing.JPanel
mousePanel
DOCUMENT ME!static int
NONE
Render mode values.private JDialogOpacityControls
opacityDialog
DOCUMENT ME!private javax.swing.JPanel
opacityPanel
DOCUMENT ME!protected int[]
orient
Orientations of the three axes.private ModelImage
paddingImageA
Padding imageA with blank images feeding.private ModelImage
paddingImageB
Padding imageB with blank images feeding.private JDialogPaintGrow
paintGrowDialog
Control panels of the triplanar view.private JFrameHistogram
panelHistogram
LUT control panel of the gray scale image.(package private) javax.swing.JPanel
panelLabels
Panel containing the position labels:.protected javax.swing.JPanel
panelToolbar
Panel that holds the toolbars.private javax.swing.JToggleButton
parallelButton
Rendering parallel rotation button.protected javax.swing.JLabel
patientSliceLabel
Labels for the current position in PatientSlice coordinates:.protected javax.swing.JLabel[]
patientSliceLabelVals
DOCUMENT ME!private javax.swing.border.Border
pressedBorder
Panel Border view.private javax.swing.JPanel
probePanel
DOCUMENT ME!private javax.swing.JRadioButton
radioCOMPOSITE
Radio button of the COMPOSITE mode option.private javax.swing.JRadioButton
radioCOMPOSITEShear
Radio button of the COMPOSITE mode option.private javax.swing.JRadioButton
radioMIP
Radio button of the MIP mode option.private javax.swing.JRadioButton
radioMIPShear
Radio button of the MIP mode option.private javax.swing.JRadioButton
radioSURFACE
Radio button of the SURFACE mode option.private javax.swing.JRadioButton
radioSURFACEFAST
Radio button of the SURFACE mode option.private javax.swing.JRadioButton
radioSURFACEShear
Radio button of the SURFACE mode option.private javax.swing.JRadioButton
radioSurrenderCOMPOSITE
Radio button of the surface render composite mode.private javax.swing.JRadioButton
radioSurrenderLIGHT
Radio button of the surface render lighting mode.private javax.swing.JRadioButton
radioXRAY
Radio button of the XRAY mode option.private javax.swing.JRadioButton
radioXRAYShear
Radio button of the XRAY mode option.private javax.swing.border.Border
raisedbevel
Panel Border view.static int
RAYCAST
DOCUMENT ME!private javax.swing.JPanel
raycastCameraPanel
DOCUMENT ME!private javax.swing.JPanel
raycastOptionsPanel
Control panels for the raycast render.private VolumeRendererRayCast
raycastRender
DOCUMENT ME!private java.util.Vector
raycastTabVector
DOCUMENT ME!private javax.swing.JToolBar
rayCastToolBar
Raycast toolbar.private javax.swing.border.Border
redBorder
Panel Border view.protected static javax.swing.JProgressBar
rendererProgressBar
The small bar on the top right corner the volume view frame.private JDialogVolViewResample
resampleDialog
Reference to resample dialog, use to null out the resample dialog in this frame.private javax.swing.JButton
rfaButton
Button for RFA.private javax.swing.JButton
rfaSeparator
RFA separator.protected ModelRGB
RGBTA
Lookup table of the color imageA, B.protected ModelRGB
RGBTB
Lookup table of the color imageA, B.private javax.swing.JSplitPane
rightPane
The view pane that contains the image view and tri-planar view panels.private int
rightPanelRenderMode
The right panel renderer mode.private int
screenHeight
Screen width, screen height.private int
screenWidth
Screen width, screen height.private int
sculptHeight
Sculpt region height.private int
sculptWidth
Sculpt region width.private static long
serialVersionUID
Use serialVersionUID for interoperability.protected java.awt.Font
serif12
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
protected java.awt.Font
serif12B
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
static int
SHEARWARP
DOCUMENT ME!private javax.swing.JPanel
shearwarpCameraPanel
DOCUMENT ME!private javax.swing.JPanel
shearwarpOptionsPanel
Control panels for the shearwarp render.private VolumeRendererShearWarp
shearwarpRender
DOCUMENT ME!private java.util.Vector
shearwarpTabVector
DOCUMENT ME!private javax.swing.JToolBar
shearWarpToolBar
Shearwarp toolbar.private javax.swing.JPanel
slicePanel
DOCUMENT ME!private int
storeTabbedPaneIndex
Previoius tab index recorder.static int
SURFACE
DOCUMENT ME!private javax.swing.JPanel
surfacePanel
DOCUMENT ME!static int
SURFACEVIEW
DOCUMENT ME!private SurfaceRender
surRender
Three types of renderer.private java.util.Vector
surTabVector
For each render, use the vector to store the currently active tabs.private SurfaceView
surView
Surface View referenceprivate ViewToolBarBuilder
toolbarBuilder
Toolbar builder reference.private javax.swing.JPanel
triImagePanel
Tri image planar render panels.private javax.swing.JToggleButton
unparallelButton
Rendering unparallel rotaion button.private javax.swing.JPanel
viewPanel
DOCUMENT ME!private javax.swing.JToolBar
viewToolBar
The top one render view switch toolbar.private javax.swing.JToolBar
volToolBar
Surface Render toolbar.-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, imageA, imageB, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTa, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, userInterface, zoomMode
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameVolumeView(ModelImage _imageA, ModelLUT LUTa, ModelRGB _RGBTA, ModelImage _imageB, ModelLUT LUTb, ModelRGB _RGBTB, int _leftPanelRenderMode, int _rightPanelRenderMode, JDialogVolViewResample _resampleDialog)
Make a volume rendering frame, which contains the toolbars on the top, control panel on the left, the volume rendering panel on the right, and the three orthogonal view ( axial, sagittal, coronal, views) on the bottom right.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.void
addAttachedSurfaces()
Add any attached surfaces the current image has in its file info (if the file info is in the xml format).void
addBranch(javax.media.j3d.BranchGroup kBranch, ModelTriangleMesh kMesh, javax.vecmath.Point3f kCenter)
Updates the surRender -- adds a BranchGroup to the main Display.void
addFlightPath()
Updates the surRender to display the flythru flight path from the flythruRender.void
addSurface(java.lang.String dir, java.io.File file)
Adding surface to the 3D texuture volume.private void
addToolbar()
Add surface volume renderer control buttons.void
buildBrainsurfaceFlattener()
Build the Brainsurface Flattener panel:void
buildCameraPanel()
Build the camera control panel for the surface render.void
buildClipPanel()
Build the clipping control panel for the surface render.void
buildDisplayPanel()
Build the display control panel for the surface render.void
buildFlythruMovePanel()
Build the flythru move control panel.void
buildFlythruPanel()
Build the flythru control panel.private void
buildFlyThruToolbar()
Build the fly through toolbar.void
buildGeodesic()
Build the Geodesic control panel.void
buildHistoLUTPanel()
The histogram control panel of the lookup table.void
buildLabelPanel()
The label panel of the x, y, z slider position.void
buildLightPanel()
Build the light control panel for the surface render.protected javax.swing.JMenuBar
buildMenu()
Builds menus for the tri-planar view.void
buildMousePanel()
Build the mouse control panel for the raycast render.void
buildOpacityPanel()
Build the volume opacity control panel for the surface render.void
buildProbePanel()
Build the adding surface control panel for the surface render.void
buildRayCastCameraPanel()
Build the camera control panel for the raycast render.void
buildRayCastOptions()
Build the view control panel for the raycast render.private void
buildRayCastToolbar()
Build the raycast toolbar.void
buildSculpt()
Build the Sculpturing control panel.void
buildShearWarpCameraPanel()
Build the camera control panel for the shearwarp render.void
buildShearWarpOptions()
Build the view control panel for the shearwarp render.private void
buildShearWarpToolbar()
Build the shearwarp toolbar.void
buildSlicePanel()
Build the slices control panel for the surface render.void
buildSurfacePanel()
Build the adding surface control panel for the surface render.private void
buildSurfaceViewToolbar()
The the top one volume view toolbar.private void
buildSurRenderToolbar()
Build the surface render toolbar.protected void
buildToolbars()
Builds the toolbars for the tri-planar view.void
buildViewPanel()
Build the view control panel for the surface render.private void
buildViewToolbar()
The the top one volume view toolbar.void
calcShearWarpImage(ModelImage _imageA, ModelImage _imageB)
Transform the image into shear warp image, which has the same resolution.void
componentResized(java.awt.event.ComponentEvent event)
Method called when a component resize event is generated.protected void
configureFrame()
Constructs main frame structures for image canvas.void
constructRenderers()
Construct the volume rendering methods based on the choices made from the resample dialog.void
disableTargetPointPicking()
Disable target point for the RFA probe from within the plane renderer.void
disposeLocal(boolean flag)
Dispose memory.void
doPadding(int[] extents, int[] volExtents)
Insert the blank images to the end of image.void
doResample(int[] volExtents, float[] newRes, boolean forceResample, int nDim, int iFilterType)
Resample the images to power of 2.void
drawBrainSurfaceFlattenerPoint(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich)
Draws the point selected on the Mesh for the brainsurfaceFlattener.void
drawRFAPoint(javax.vecmath.Point3f kPoint)
Called from the PlaneRender class when a new Probe Entry Point has been selected.private void
enableDualPanelRender()
Enable dual panel renders.private void
enableFlyThruRender()
Enable the fly through frame layout.private void
enableShearWarpRender()
Enable the shear warp render.private void
enableSurfaceRender()
Enable surface render.void
enableTargetPointPicking()
Enable target point for the RFA probe from within the plane renderer.private void
enableVolumeRender()
Enable volume render.protected void
finalize()
Cleans up memory from gc.int
getBlendValue()
Get the imageA and imageB blending value from the PlaneRender.ViewControlsImage
getControls()
Required by the parent super class, do nothing.JFrameHistogram
getHistogramDialog()
ModelImage
getHistoLUTActiveImage()
Returns which image is active in the HistoLUT -- either imageA or imageB.ModelImage
getHistoRGBActiveImage()
Returns which image is active in the HistoRGB -- either imageA or imageB.ModelImage
getImageA()
Get the image A reference.ModelImage
getImageB()
Get the imageB reference.ModelImage
getImageOriginal()
Get a reference to the original image we passed into the renderer from MIPAV (non-cloned).JPanelHistoLUT
getLUTDialog()
Deprecated.JPanelProbe
getProbeDialog()
Return the rfa probe panel.static javax.swing.JProgressBar
getRendererProgressBar()
Retrieve the progress bar used in the volume renderer (the one in the upper right hand corner).JPanelHistoRGB
getRGBDialog()
Deprecated.ModelImage
getSegmentationImage()
Return the segmentation region map image which contains info on where the vascualture, etc are located.javax.swing.JSplitPane
getViewPanel()
Return the image panel.void
insertFlythruTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the flythru tab list ( flythru render ) for backup.void
insertRaycastTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the raycast tab list ( raycast render ) for backup.void
insertShearwarpTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the shear warp tab list ( shear warp render ) for backup.void
insertSurfaceTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the surface tab list ( SurfaceRender ) for backup.void
insertTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert the new tab into the current visible tab list.boolean
isBrainSurfaceFlattenerPickEnabled()
Returns the pick enabled state of the brainsurfaceFlattener.boolean
isGeodesicEnable()
Check whether the Geodesic drawing is enabled or not.void
itemStateChanged(java.awt.event.ItemEvent event)
Sets the flags for the getOptionses and resets labels.void
mouseClicked(java.awt.event.MouseEvent e)
Handle the double mouse click event when the use swith between the dual image panel view.void
mouseEntered(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.void
mouseExited(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.void
mousePressed(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.void
mouseReleased(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.void
removeBranch(javax.media.j3d.BranchGroup kBranch, boolean bRemoveMesh)
Updates the surRender -- removes a BranchGroup to the main Display.void
removeControls()
Required by the parent super class, do nothing.void
removeProbeLine()
Remove the red line showing where the probe will pass through.void
resetAxisX()
Reset image volume orieint along X axis.void
resetAxisY()
Reset image volume orieint along Y axis.void
resetImage()
Reset image volume orieint along Z axis.private void
resetLUTMinMax(ModelImage image, ModelLUT lut)
Calculate the LUT from the resampled image.private void
resizePanel()
Method that resizes the frame and adjusts the rows, columns as needed.private void
set3DModelPosition(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Sets the 3DModel position label.void
setActiveImage(int active)
Required by the parent super class, do nothing.void
setAlphaBlend(int value)
Required by the parent super class, do nothing.void
setControls()
Required by the parent super class, do nothing.void
setEnabled(boolean flag)
Do nothing methods, just extend the ViewJframeBase.void
setFlythruColor(java.awt.Color _color)
Set the flythru surface color.void
setImageB(ModelImage _imageB)
Required by the parent super class, do nothing.void
setImageOriginal(ModelImage img)
Set the reference to the original image we passed into the renderer from MIPAV (non-cloned).void
setLUTa(ModelLUT LUT)
Accessor that sets the LUT.void
setLUTb(ModelLUT LUT)
Accessor that sets the LUT.void
setMaterialShininess(float value)
Set material ( texture or voxels ) shininess value.void
setPaintBitmapSwitch(boolean paintBitmapSwitch)
Required by the parent super class, do nothing.void
setPathPosition(javax.vecmath.Point3f kPosition, javax.vecmath.Point3f kScaledPosition)
Called when the view position changes in the FlyThruRenderer, updates the position representation in the Slice views:private void
setPatientSlicePosition(WildMagic.LibFoundation.Mathematics.Vector3f position)
Sets the PatientSlice position label.void
setPositionLabels(WildMagic.LibFoundation.Mathematics.Vector3f position)
Sets the position labels.void
setRenderPerspective(boolean bEnable)
private void
setRFAToolbarVisible(boolean flag)
Set the RFA button visible or not.void
setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.void
setRightPanelCanvas()
Update the right panel when finish loading Endoscopy images.void
setSegmentationImage(ModelImage img)
Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).void
setSlice(int slice)
Required by the parent super class, do nothing.void
setSliceFromPlane(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Sets the position of the slices in the SurfaceRender and PlaneRender objects.void
setSliceFromSurface(WildMagic.LibFoundation.Mathematics.Vector3f center)
Sets the position of the slices in the PlaneRender.void
setSliceHairColor(int iView, java.awt.Color color)
Sets the color for the PlaneRender iView (AXIAL, SAGITTAL, CORONAL) slice.void
setTimeSlice(int slice)
Required by the parent super class, do nothing.void
setTitle()
Set the title of the frame with the image name of slice location.void
stateChanged(javax.swing.event.ChangeEvent event)
Switch between slices control button and surface render button of the surface toolbar.void
switchTabList(java.lang.String command)
Update the tabbed pane when switch view buttons in the View toolbar.boolean
updateImageExtents()
Update image extends from the ModelImage.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
updateProbePos()
The navigation mode update the probe position in 3D texture volume.void
updateSliceData()
Causes the PlaneRender objects to update the texture maps when the underlying ModelImage changes.void
updateSurRenderWinlevel(boolean flag)
Hack.void
volumeRepaint()
Repaint the volume.void
windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.-
Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, canCloseImageBAfterLoad, close, close, closeImageB, componentHidden, componentMoved, componentShown, getAlphaBlend, getDefaultLUTa, getDefaultLUTb, getDisplayMode, getImageNameA, getImageNameB, getLastState, getLUTa, getLUTb, getRGBTA, getRGBTB, getTriImg, getUserInterface, handleMaskPopupMenu, handlePaintToMaskPopupMenu, handleZoomPopupMenu, initExtents, initImageBuffer, initLUT, initNumSlices, initPixelBuffer, initResFactor, initResolutions, initRGB, initSlicePositions, initUnits, initZoom, loadAllVOIs, loadAllVOIsFrom, loadImage, loadLUT, loadLUTandTransferFunctionFrom, loadLUTandTransferFunctionFrom, makeString, newFrameBeenCreated, openVOI, openVOI, pickImageFile, save, save, save, saveAllVOIs, saveAllVOIsTo, saveLabels, saveLUT, saveLUTandTransferFunction, saveLUTandTransferFunction, saveLUTAs, saveLUTAs, saveVOI, saveVOIAs, saveVOIAs, saveVOIIntensities, saveVOIIntensitiesTo, setAbsPositionLabels, setEnableCloseImageBAfterLoad, setImageA, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
NONE
public static final int NONE
Render mode values.- See Also:
- Constant Field Values
-
RAYCAST
public static final int RAYCAST
DOCUMENT ME!- See Also:
- Constant Field Values
-
SHEARWARP
public static final int SHEARWARP
DOCUMENT ME!- See Also:
- Constant Field Values
-
SURFACE
public static final int SURFACE
DOCUMENT ME!- See Also:
- Constant Field Values
-
DUALPANEL
public static final int DUALPANEL
DOCUMENT ME!- See Also:
- Constant Field Values
-
ENDOSCOPY
public static final int ENDOSCOPY
DOCUMENT ME!- See Also:
- Constant Field Values
-
BRAINSURFACE_FLATTENER
public static final int BRAINSURFACE_FLATTENER
DOCUMENT ME!- See Also:
- Constant Field Values
-
SURFACEVIEW
public static final int SURFACEVIEW
DOCUMENT ME!- See Also:
- Constant Field Values
-
rendererProgressBar
protected static javax.swing.JProgressBar rendererProgressBar
The small bar on the top right corner the volume view frame.
-
config
protected java.awt.GraphicsConfiguration config
Configuration param, which will pass down to each render's constructor.
-
isoImageA
protected ModelImage isoImageA
Isotropic version image A, B, used by the shear warp renderer.
-
isoImageB
protected ModelImage isoImageB
Isotropic version image A, B, used by the shear warp renderer.
-
menuObj
protected ViewMenuBuilder menuObj
Menu items storage.
-
modelViewLabel
protected javax.swing.JLabel modelViewLabel
Labels for the current position in 3D ModelView coordinates:.
-
modelViewLabelVals
protected javax.swing.JLabel[] modelViewLabelVals
DOCUMENT ME!
-
orient
protected int[] orient
Orientations of the three axes.
-
panelToolbar
protected javax.swing.JPanel panelToolbar
Panel that holds the toolbars.
-
patientSliceLabel
protected javax.swing.JLabel patientSliceLabel
Labels for the current position in PatientSlice coordinates:.
-
patientSliceLabelVals
protected javax.swing.JLabel[] patientSliceLabelVals
DOCUMENT ME!
-
RGBTA
protected ModelRGB RGBTA
Lookup table of the color imageA, B.
-
RGBTB
protected ModelRGB RGBTB
Lookup table of the color imageA, B.
-
serif12
protected java.awt.Font serif12
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
-
serif12B
protected java.awt.Font serif12B
Fonts, same asMipavUtil.font12
andMipavUtil.font12B.
-
panelLabels
javax.swing.JPanel panelLabels
Panel containing the position labels:.
-
axialOrientation
private boolean axialOrientation
Indicates that image orientation is unknown type or not.
-
brainsurfaceFlattenerRender
private MjCorticalAnalysis brainsurfaceFlattenerRender
Rendering the brainsurfaceFlattener objects.
-
cameraPanel
private javax.swing.JPanel cameraPanel
DOCUMENT ME!
-
clipBox
private javax.swing.JPanel clipBox
DOCUMENT ME!
-
clipButton
private javax.swing.JButton clipButton
Button to invoke all the six clipping planes.
-
clipDisableButton
private javax.swing.JButton clipDisableButton
Button to disable all the six clipping planes.
-
clipMaskButton
private javax.swing.JButton clipMaskButton
Button to crop the clip volume.
-
clipMaskUndoButton
private javax.swing.JButton clipMaskUndoButton
Button to undo crop the clip volume.
-
clipPanel
private javax.swing.JPanel clipPanel
DOCUMENT ME!
-
clipPlaneButton
private javax.swing.JButton clipPlaneButton
Button to invoke clipping planes.
-
clipSaveButton
private javax.swing.JButton clipSaveButton
Button to save clipped region.
-
displayPanel
private javax.swing.JPanel displayPanel
DOCUMENT ME!
-
dualImagePane
private javax.swing.JSplitPane dualImagePane
dual image pane that holds the left and right panel.
-
dualImagePanel
private javax.swing.JPanel dualImagePanel
The image panel to hold two Canvas3D.
-
dualLeftPanel
private javax.swing.JPanel dualLeftPanel
Left panel of the dual panel view.
-
dualRightPanel
private javax.swing.JPanel dualRightPanel
Right panel of the dual panel view.
-
firstTimeVolView
private boolean firstTimeVolView
Keep track of whether we're switching to the volume renderer for the first time.
-
flythruControl
private JPanelVirtualEndoscopySetup flythruControl
Fly through setup control panel.
-
flythruMoveControl
private JPanelFlythruMove flythruMoveControl
Fly through movement control panel.
-
flythruMovePanel
private javax.swing.JPanel flythruMovePanel
View panel contains the fly thru control panel.
-
flythruOptions
private FlythruRender.SetupOptions flythruOptions
Fly through options.
-
flythruPanel
private javax.swing.JPanel flythruPanel
Fly through panel.
-
flythruRender
private FlythruRender flythruRender
Reference to fly through renderer.
-
flythruSurfaceButton
private javax.swing.JButton flythruSurfaceButton
Surface load button.
-
flythruTabVector
private java.util.Vector flythruTabVector
DOCUMENT ME!
-
flyThruToolbar
private javax.swing.JToolBar flyThruToolbar
Flythru toolbar.
-
histoLUTPanel
private javax.swing.JPanel histoLUTPanel
Control panel for the surface renderer.
-
imageAOriginal
private ModelImage imageAOriginal
Reference to the imageA original copy.
-
imageOrientation
private int imageOrientation
Image orientation: coronal, sagittal, axial, unknown.
-
imagePanel
private javax.swing.JPanel imagePanel
The image panel to hold one Canvas3D.
-
intensityDialog
private JDialogIntensityPaint intensityDialog
DOCUMENT ME!
-
isBrainsurfaceFlattenerEnable
private boolean isBrainsurfaceFlattenerEnable
Indicate if the brainsurface flattener render is enabled from the resample dialog or not.
-
isEndoscopyEnable
private boolean isEndoscopyEnable
Indicate if the fly through render is enabled from the resample dialog or not.
-
isRayCastEnable
private boolean isRayCastEnable
Indicate if the raycast render is enabled from the resample dialog or not.
-
isShearWarpEnable
private boolean isShearWarpEnable
Indicate if the shear warp render is enabled from the resample dialog or not.
-
isSurfaceRenderEnable
private boolean isSurfaceRenderEnable
Indicate if the surface render is enabled from the resample dialog or not.
-
isSurfaceViewEnable
private boolean isSurfaceViewEnable
Indicate if the surface view is enabled from the resample dialog or not.
-
leftPanelRenderMode
private int leftPanelRenderMode
The left panel renderer mode.
-
lightPanel
private javax.swing.JPanel lightPanel
DOCUMENT ME!
-
m_akPlaneRender
private PlaneRender[] m_akPlaneRender
The three slice views displayed as texture-mapped polygons:.
-
m_kBrainsurfaceFlattenerPanel
private javax.swing.JPanel m_kBrainsurfaceFlattenerPanel
Control panels for the Brainsurface Flattener:.
-
m_kGeodesicPanel
private javax.swing.JPanel m_kGeodesicPanel
Control panel for drawing geodesic curves.
-
m_kSculptPanel
private javax.swing.JPanel m_kSculptPanel
Control panel for volume sculpting.
-
maxPanelWidth
private int maxPanelWidth
The max width of the control panels.
-
menuBar
private javax.swing.JMenuBar menuBar
Menu bar.
-
mousePanel
private javax.swing.JPanel mousePanel
DOCUMENT ME!
-
opacityDialog
private JDialogOpacityControls opacityDialog
DOCUMENT ME!
-
opacityPanel
private javax.swing.JPanel opacityPanel
DOCUMENT ME!
-
paddingImageA
private ModelImage paddingImageA
Padding imageA with blank images feeding.
-
paddingImageB
private ModelImage paddingImageB
Padding imageB with blank images feeding.
-
paintGrowDialog
private JDialogPaintGrow paintGrowDialog
Control panels of the triplanar view.
-
panelHistogram
private JFrameHistogram panelHistogram
LUT control panel of the gray scale image.
-
parallelButton
private javax.swing.JToggleButton parallelButton
Rendering parallel rotation button.
-
probePanel
private javax.swing.JPanel probePanel
DOCUMENT ME!
-
radioCOMPOSITE
private javax.swing.JRadioButton radioCOMPOSITE
Radio button of the COMPOSITE mode option.
-
radioCOMPOSITEShear
private javax.swing.JRadioButton radioCOMPOSITEShear
Radio button of the COMPOSITE mode option.
-
radioMIP
private javax.swing.JRadioButton radioMIP
Radio button of the MIP mode option.
-
radioMIPShear
private javax.swing.JRadioButton radioMIPShear
Radio button of the MIP mode option.
-
radioSURFACE
private javax.swing.JRadioButton radioSURFACE
Radio button of the SURFACE mode option.
-
radioSURFACEFAST
private javax.swing.JRadioButton radioSURFACEFAST
Radio button of the SURFACE mode option.
-
radioSURFACEShear
private javax.swing.JRadioButton radioSURFACEShear
Radio button of the SURFACE mode option.
-
radioSurrenderCOMPOSITE
private javax.swing.JRadioButton radioSurrenderCOMPOSITE
Radio button of the surface render composite mode.
-
radioSurrenderLIGHT
private javax.swing.JRadioButton radioSurrenderLIGHT
Radio button of the surface render lighting mode.
-
radioXRAY
private javax.swing.JRadioButton radioXRAY
Radio button of the XRAY mode option.
-
radioXRAYShear
private javax.swing.JRadioButton radioXRAYShear
Radio button of the XRAY mode option.
-
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.
-
redBorder
private javax.swing.border.Border redBorder
Panel Border view.
-
etchedBorder
private javax.swing.border.Border etchedBorder
Panel Border view.
-
pressedBorder
private javax.swing.border.Border pressedBorder
Panel Border view.
-
raycastCameraPanel
private javax.swing.JPanel raycastCameraPanel
DOCUMENT ME!
-
raycastOptionsPanel
private javax.swing.JPanel raycastOptionsPanel
Control panels for the raycast render.
-
raycastRender
private VolumeRendererRayCast raycastRender
DOCUMENT ME!
-
raycastTabVector
private java.util.Vector raycastTabVector
DOCUMENT ME!
-
rayCastToolBar
private javax.swing.JToolBar rayCastToolBar
Raycast toolbar.
-
resampleDialog
private JDialogVolViewResample resampleDialog
Reference to resample dialog, use to null out the resample dialog in this frame.
-
rfaButton
private javax.swing.JButton rfaButton
Button for RFA.
-
rfaSeparator
private javax.swing.JButton rfaSeparator
RFA separator.
-
rightPane
private javax.swing.JSplitPane rightPane
The view pane that contains the image view and tri-planar view panels.
-
rightPanelRenderMode
private int rightPanelRenderMode
The right panel renderer mode.
-
screenWidth
private int screenWidth
Screen width, screen height.
-
screenHeight
private int screenHeight
Screen width, screen height.
-
sculptHeight
private int sculptHeight
Sculpt region height.
-
sculptWidth
private int sculptWidth
Sculpt region width.
-
shearwarpCameraPanel
private javax.swing.JPanel shearwarpCameraPanel
DOCUMENT ME!
-
shearwarpOptionsPanel
private javax.swing.JPanel shearwarpOptionsPanel
Control panels for the shearwarp render.
-
shearwarpRender
private VolumeRendererShearWarp shearwarpRender
DOCUMENT ME!
-
shearwarpTabVector
private java.util.Vector shearwarpTabVector
DOCUMENT ME!
-
shearWarpToolBar
private javax.swing.JToolBar shearWarpToolBar
Shearwarp toolbar.
-
slicePanel
private javax.swing.JPanel slicePanel
DOCUMENT ME!
-
storeTabbedPaneIndex
private int storeTabbedPaneIndex
Previoius tab index recorder.
-
surfacePanel
private javax.swing.JPanel surfacePanel
DOCUMENT ME!
-
surRender
private SurfaceRender surRender
Three types of renderer.
-
surView
private SurfaceView surView
Surface View reference
-
surTabVector
private java.util.Vector surTabVector
For each render, use the vector to store the currently active tabs.
-
toolbarBuilder
private ViewToolBarBuilder toolbarBuilder
Toolbar builder reference.
-
triImagePanel
private javax.swing.JPanel triImagePanel
Tri image planar render panels.
-
unparallelButton
private javax.swing.JToggleButton unparallelButton
Rendering unparallel rotaion button.
-
viewPanel
private javax.swing.JPanel viewPanel
DOCUMENT ME!
-
viewToolBar
private javax.swing.JToolBar viewToolBar
The top one render view switch toolbar.
-
volToolBar
private javax.swing.JToolBar volToolBar
Surface Render toolbar.
-
-
Constructor Detail
-
ViewJFrameVolumeView
public ViewJFrameVolumeView(ModelImage _imageA, ModelLUT LUTa, ModelRGB _RGBTA, ModelImage _imageB, ModelLUT LUTb, ModelRGB _RGBTB, int _leftPanelRenderMode, int _rightPanelRenderMode, JDialogVolViewResample _resampleDialog)
Make a volume rendering frame, which contains the toolbars on the top, control panel on the left, the volume rendering panel on the right, and the three orthogonal view ( axial, sagittal, coronal, views) on the bottom right.- Parameters:
_imageA
- First image to displayLUTa
- LUT of the imageA (if null grayscale LUT is constructed)_RGBTA
- RGB table of imageA_imageB
- Second loaded imageLUTb
- LUT of the imageB_RGBTB
- RGB table of imageB_leftPanelRenderMode
- shear warp render mode enabled or not_rightPanelRenderMode
- volume rendering panel render mode ( Raycast, shearwarp, etc)._resampleDialog
- resample dialog reference.
-
-
Method Detail
-
getRendererProgressBar
public static final javax.swing.JProgressBar getRendererProgressBar()
Retrieve the progress bar used in the volume renderer (the one in the upper right hand corner).- Returns:
- the volume renderer progress bar
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classViewJFrameBase
- Parameters:
event
- Event that triggers function.
-
addAttachedSurfaces
public void addAttachedSurfaces()
Add any attached surfaces the current image has in its file info (if the file info is in the xml format).
-
addBranch
public void addBranch(javax.media.j3d.BranchGroup kBranch, ModelTriangleMesh kMesh, javax.vecmath.Point3f kCenter)
Updates the surRender -- adds a BranchGroup to the main Display.- Parameters:
kBranch
- BranchGroup branch groupkMesh
- ModelTriangleMesh surface meshkCenter
- Point3f center of mass
-
addFlightPath
public void addFlightPath()
Updates the surRender to display the flythru flight path from the flythruRender.
-
addSurface
public void addSurface(java.lang.String dir, java.io.File file)
Adding surface to the 3D texuture volume.- Parameters:
dir
- surface file direcotryfile
- surface file name
-
buildBrainsurfaceFlattener
public void buildBrainsurfaceFlattener()
Build the Brainsurface Flattener panel:
-
buildCameraPanel
public void buildCameraPanel()
Build the camera control panel for the surface render.
-
buildClipPanel
public void buildClipPanel()
Build the clipping control panel for the surface render.
-
buildDisplayPanel
public void buildDisplayPanel()
Build the display control panel for the surface render.
-
buildFlythruMovePanel
public void buildFlythruMovePanel()
Build the flythru move control panel.
-
buildFlythruPanel
public void buildFlythruPanel()
Build the flythru control panel.
-
buildGeodesic
public void buildGeodesic()
Build the Geodesic control panel.
-
buildHistoLUTPanel
public void buildHistoLUTPanel()
The histogram control panel of the lookup table.
-
buildLabelPanel
public void buildLabelPanel()
The label panel of the x, y, z slider position.- Overrides:
buildLabelPanel
in classViewJFrameBase
-
buildLightPanel
public void buildLightPanel()
Build the light control panel for the surface render.
-
buildMousePanel
public void buildMousePanel()
Build the mouse control panel for the raycast render.
-
buildOpacityPanel
public void buildOpacityPanel()
Build the volume opacity control panel for the surface render.
-
buildProbePanel
public void buildProbePanel()
Build the adding surface control panel for the surface render.
-
buildRayCastCameraPanel
public void buildRayCastCameraPanel()
Build the camera control panel for the raycast render.
-
buildRayCastOptions
public void buildRayCastOptions()
Build the view control panel for the raycast render.
-
buildSculpt
public void buildSculpt()
Build the Sculpturing control panel.
-
buildShearWarpCameraPanel
public void buildShearWarpCameraPanel()
Build the camera control panel for the shearwarp render.
-
buildShearWarpOptions
public void buildShearWarpOptions()
Build the view control panel for the shearwarp render.
-
buildSlicePanel
public void buildSlicePanel()
Build the slices control panel for the surface render.
-
buildSurfacePanel
public void buildSurfacePanel()
Build the adding surface control panel for the surface render.
-
buildViewPanel
public void buildViewPanel()
Build the view control panel for the surface render.
-
calcShearWarpImage
public void calcShearWarpImage(ModelImage _imageA, ModelImage _imageB)
Transform the image into shear warp image, which has the same resolution.- Parameters:
_imageA
- the reference to image A._imageB
- the reference to image B.
-
componentResized
public void componentResized(java.awt.event.ComponentEvent event)
Method called when a component resize event is generated. This method snaps the size of the frame and pagePanel to the nearest row, column sizing (so the gridRow and gridColumn and page layout may change).- Specified by:
componentResized
in interfacejava.awt.event.ComponentListener
- Overrides:
componentResized
in classViewJFrameBase
- Parameters:
event
- frame resize event
-
constructRenderers
public void constructRenderers()
Construct the volume rendering methods based on the choices made from the resample dialog. This method is called by the Resample dialog.
-
disableTargetPointPicking
public void disableTargetPointPicking()
Disable target point for the RFA probe from within the plane renderer.
-
disposeLocal
public void disposeLocal(boolean flag)
Dispose memory.- Parameters:
flag
- call super dispose or not
-
doPadding
public void doPadding(int[] extents, int[] volExtents)
Insert the blank images to the end of image. Padding the image to power of 2.- Parameters:
extents
- int[] original extentsvolExtents
- int[] padding to power of 2 extents.
-
doResample
public void doResample(int[] volExtents, float[] newRes, boolean forceResample, int nDim, int iFilterType)
Resample the images to power of 2.- Parameters:
volExtents
- resampled volume extentsnewRes
- new resampled resolutionforceResample
- resampled or notnDim
- number of dimensionsiFilterType
- type of sample filter, may be one of 7 different filters: TriLinear Interpolation, NearestNeighbor, CubicBSpline, QuadraticBSpline, CubicLagragian, QuinticLagragian, HepticLagragian, or WindowedSinc (see AlgorithmTransform.java).
-
drawBrainSurfaceFlattenerPoint
public void drawBrainSurfaceFlattenerPoint(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich)
Draws the point selected on the Mesh for the brainsurfaceFlattener.- Parameters:
kStart
- Ruida please add commentaiIndex
- Ruida please add commentiWhich
- Ruida please add comment
-
drawRFAPoint
public void drawRFAPoint(javax.vecmath.Point3f kPoint)
Called from the PlaneRender class when a new Probe Entry Point has been selected. The point is passed into each PlaneRender class for display, and to the SurfaceRender class for display- Parameters:
kPoint
- target point position
-
enableTargetPointPicking
public void enableTargetPointPicking()
Enable target point for the RFA probe from within the plane renderer.
-
getBlendValue
public int getBlendValue()
Get the imageA and imageB blending value from the PlaneRender.- Returns:
- blendValue blender slider value.
-
getControls
public ViewControlsImage getControls()
Required by the parent super class, do nothing.- Specified by:
getControls
in classViewJFrameBase
- Returns:
- null
-
getHistoLUTActiveImage
public ModelImage getHistoLUTActiveImage()
Returns which image is active in the HistoLUT -- either imageA or imageB. Called by the PlaneRenderer object to determine which LUT to update based on dragging the right-mouse in the PlaneRender window:- Returns:
- ModelImage, either imageA or imageB, depending on which is selected in the HistoLUT
-
getHistoRGBActiveImage
public ModelImage getHistoRGBActiveImage()
Returns which image is active in the HistoRGB -- either imageA or imageB. Called by the PlaneRenderer object to determine which LUT to update based on dragging the right-mouse in the PlaneRender window:- Returns:
- ModelImage, either imageA or imageB, depending on which is selected in the HistoLUT
-
getImageA
public ModelImage getImageA()
Get the image A reference.- Specified by:
getImageA
in classViewJFrameBase
- Returns:
- imageA model image A reference.
-
getImageB
public ModelImage getImageB()
Get the imageB reference.- Specified by:
getImageB
in classViewJFrameBase
- Returns:
- imageB model image B reference.
-
getImageOriginal
public ModelImage getImageOriginal()
Get a reference to the original image we passed into the renderer from MIPAV (non-cloned).- Returns:
- the original image
-
getLUTDialog
public JPanelHistoLUT getLUTDialog()
Deprecated.Get the LUT panel (only should be used with grayscale images).- Returns:
- the histo LUT panel
-
getHistogramDialog
public JFrameHistogram getHistogramDialog()
-
getProbeDialog
public JPanelProbe getProbeDialog()
Return the rfa probe panel.- Returns:
- the rfa probe panel
-
getRGBDialog
public JPanelHistoRGB getRGBDialog()
Deprecated.Get the RGB panel (only should be used with color images).- Returns:
- the histo RGB panel
-
getSegmentationImage
public ModelImage getSegmentationImage()
Return the segmentation region map image which contains info on where the vascualture, etc are located.- Returns:
- (vessel, etc) segmentation image
-
getViewPanel
public javax.swing.JSplitPane getViewPanel()
Return the image panel.- Returns:
- JSplitPane
-
insertFlythruTab
public void insertFlythruTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the flythru tab list ( flythru render ) for backup.- Parameters:
_name
- flythru render control panel name_panel
- flythru render control panel
-
insertRaycastTab
public void insertRaycastTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the raycast tab list ( raycast render ) for backup.- Parameters:
_name
- raycast render control panel name_panel
- raycast render control panel
-
insertShearwarpTab
public void insertShearwarpTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the shear warp tab list ( shear warp render ) for backup.- Parameters:
_name
- shear warp render control panel name_panel
- shear warp render control panel
-
insertSurfaceTab
public void insertSurfaceTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert tab into the surface tab list ( SurfaceRender ) for backup.- Parameters:
_name
- surface render control panel name_panel
- surface render control panel
-
insertTab
public void insertTab(java.lang.String _name, javax.swing.JPanel _panel)
Insert the new tab into the current visible tab list.- Parameters:
_name
- control panel name_panel
- control panel
-
isBrainSurfaceFlattenerPickEnabled
public boolean isBrainSurfaceFlattenerPickEnabled()
Returns the pick enabled state of the brainsurfaceFlattener.- Returns:
- flag brain surface pickable or not.
-
isGeodesicEnable
public boolean isGeodesicEnable()
Check whether the Geodesic drawing is enabled or not.- Returns:
- boolean
true
Geodesic drawing enabled,false
Geodesic disable.
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
Sets the flags for the getOptionses and resets labels.- Specified by:
itemStateChanged
in interfacejava.awt.event.ItemListener
- Parameters:
event
- Event that triggered this function.
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
Handle the double mouse click event when the use swith between the dual image panel view.- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Parameters:
e
- MouseEvent
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Parameters:
e
- MouseEvent
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Parameters:
e
- MouseEvent
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Parameters:
e
- MouseEvent
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Methods do nothing, implemented mouseListener.- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Parameters:
e
- MouseEvent
-
removeBranch
public void removeBranch(javax.media.j3d.BranchGroup kBranch, boolean bRemoveMesh)
Updates the surRender -- removes a BranchGroup to the main Display.- Parameters:
kBranch
- BranchGroup surface branch group reference.bRemoveMesh
- boolean flag to remove the surface mesh or not
-
removeControls
public void removeControls()
Required by the parent super class, do nothing.- Specified by:
removeControls
in classViewJFrameBase
-
removeProbeLine
public void removeProbeLine()
Remove the red line showing where the probe will pass through. Used when changing the probe target point through the tri-images.
-
resetAxisX
public void resetAxisX()
Reset image volume orieint along X axis.
-
resetAxisY
public void resetAxisY()
Reset image volume orieint along Y axis.
-
resetImage
public void resetImage()
Reset image volume orieint along Z axis.
-
setActiveImage
public void setActiveImage(int active)
Required by the parent super class, do nothing.- Specified by:
setActiveImage
in classViewJFrameBase
- Parameters:
active
- int
-
setAlphaBlend
public void setAlphaBlend(int value)
Required by the parent super class, do nothing.- Specified by:
setAlphaBlend
in classViewJFrameBase
- Parameters:
value
- DOCUMENT ME!
-
setControls
public void setControls()
Required by the parent super class, do nothing.- Specified by:
setControls
in classViewJFrameBase
-
setEnabled
public void setEnabled(boolean flag)
Do nothing methods, just extend the ViewJframeBase.- Specified by:
setEnabled
in classViewJFrameBase
- Parameters:
flag
- DOCUMENT ME!
-
setFlythruColor
public void setFlythruColor(java.awt.Color _color)
Set the flythru surface color.- Parameters:
_color
- ModelLUT table
-
setImageB
public void setImageB(ModelImage _imageB)
Required by the parent super class, do nothing.- Specified by:
setImageB
in classViewJFrameBase
- Parameters:
_imageB
- image to set the frame to
-
setImageOriginal
public void setImageOriginal(ModelImage img)
Set the reference to the original image we passed into the renderer from MIPAV (non-cloned).- Parameters:
img
- the original image
-
setLUTa
public void setLUTa(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTa
in classViewJFrameBase
- Parameters:
LUT
- the LUT
-
setLUTb
public void setLUTb(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTb
in classViewJFrameBase
- Parameters:
LUT
- the LUT
-
setMaterialShininess
public void setMaterialShininess(float value)
Set material ( texture or voxels ) shininess value.- Parameters:
value
- float
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch)
Required by the parent super class, do nothing.- Specified by:
setPaintBitmapSwitch
in classViewJFrameBase
- Parameters:
paintBitmapSwitch
- boolean
-
setPathPosition
public void setPathPosition(javax.vecmath.Point3f kPosition, javax.vecmath.Point3f kScaledPosition)
Called when the view position changes in the FlyThruRenderer, updates the position representation in the Slice views:- Parameters:
kPosition
- center position.kScaledPosition
- position of the flythru view point along the flythru path.
-
setPositionLabels
public void setPositionLabels(WildMagic.LibFoundation.Mathematics.Vector3f position)
Sets the position labels.- Parameters:
position
- the slice positions in FileCoordinates.
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.- Specified by:
setRGBTA
in classViewJFrameBase
- Parameters:
RGBT
- RGB table
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.- Specified by:
setRGBTB
in classViewJFrameBase
- Parameters:
RGBT
- RGB table
-
setRightPanelCanvas
public void setRightPanelCanvas()
Update the right panel when finish loading Endoscopy images.
-
setSegmentationImage
public void setSegmentationImage(ModelImage img)
Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).- Parameters:
img
- segmentation image
-
setSlice
public void setSlice(int slice)
Required by the parent super class, do nothing.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- int
-
setSliceFromPlane
public void setSliceFromPlane(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Sets the position of the slices in the SurfaceRender and PlaneRender objects. Called from the PlaneRender class.- Parameters:
center
- the new slice positions in FileCoordinates
-
setSliceFromSurface
public void setSliceFromSurface(WildMagic.LibFoundation.Mathematics.Vector3f center)
Sets the position of the slices in the PlaneRender. Called from the SurfaceRender class.- Parameters:
center
- the new slice positions in FileCoordinates
-
setSliceHairColor
public void setSliceHairColor(int iView, java.awt.Color color)
Sets the color for the PlaneRender iView (AXIAL, SAGITTAL, CORONAL) slice.- Parameters:
iView
- (AXIAL, SAGITTAL, CORONAL)color
- the new axis color attribute.
-
setTimeSlice
public void setTimeSlice(int slice)
Required by the parent super class, do nothing.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- int
-
setTitle
public void setTitle()
Set the title of the frame with the image name of slice location.- Specified by:
setTitle
in classViewJFrameBase
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent event)
Switch between slices control button and surface render button of the surface toolbar.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Overrides:
stateChanged
in classViewJFrameBase
- Parameters:
event
- ChangeEvent
-
switchTabList
public void switchTabList(java.lang.String command)
Update the tabbed pane when switch view buttons in the View toolbar.- Parameters:
command
- command of the renderer's view toolbar button click.
-
updateImageExtents
public boolean updateImageExtents()
Update image extends from the ModelImage. Now, disabled.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Specified by:
updateImageExtents
in classViewJFrameBase
- Returns:
- DOCUMENT ME!
- See Also:
ViewImageUpdateInterface
-
updateImages
public boolean updateImages()
Update images in surface render, raycast render and shearwarp render.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- boolean boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow)
This methods calls corresponding render to update images without LUT changes.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- 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.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Parameters:
LUTa
- LUT used to update imageALUTb
- LUT used to update imageBforceShow
- forces show to reimport image and calc. java imageinterpMode
- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
updateProbePos
public void updateProbePos()
The navigation mode update the probe position in 3D texture volume. Not used now. Might be used later on.
-
updateSliceData
public void updateSliceData()
Causes the PlaneRender objects to update the texture maps when the underlying ModelImage changes.
-
updateSurRenderWinlevel
public void updateSurRenderWinlevel(boolean flag)
Hack. Update the the surface render win-level from the plane renderer.- Parameters:
flag
- true update win-level, false not update.
-
volumeRepaint
public void volumeRepaint()
Repaint the volume.
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classViewJFrameBase
- Parameters:
event
- Event that triggered function
-
buildMenu
protected javax.swing.JMenuBar buildMenu()
Builds menus for the tri-planar view.- Returns:
- DOCUMENT ME!
-
buildToolbars
protected void buildToolbars()
Builds the toolbars for the tri-planar view.
-
configureFrame
protected void configureFrame()
Constructs main frame structures for image canvas.
-
finalize
protected void finalize() throws java.lang.Throwable
Cleans up memory from gc.- Overrides:
finalize
in classViewJFrameBase
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
addToolbar
private void addToolbar()
Add surface volume renderer control buttons.
-
buildFlyThruToolbar
private void buildFlyThruToolbar()
Build the fly through toolbar.
-
buildRayCastToolbar
private void buildRayCastToolbar()
Build the raycast toolbar.
-
buildShearWarpToolbar
private void buildShearWarpToolbar()
Build the shearwarp toolbar.
-
buildSurRenderToolbar
private void buildSurRenderToolbar()
Build the surface render toolbar.
-
buildSurfaceViewToolbar
private void buildSurfaceViewToolbar()
The the top one volume view toolbar.
-
buildViewToolbar
private void buildViewToolbar()
The the top one volume view toolbar.
-
enableDualPanelRender
private void enableDualPanelRender()
Enable dual panel renders.
-
enableFlyThruRender
private void enableFlyThruRender()
Enable the fly through frame layout.
-
enableShearWarpRender
private void enableShearWarpRender()
Enable the shear warp render.
-
enableSurfaceRender
private void enableSurfaceRender()
Enable surface render.
-
enableVolumeRender
private void enableVolumeRender()
Enable volume render.
-
resetLUTMinMax
private void resetLUTMinMax(ModelImage image, ModelLUT lut)
Calculate the LUT from the resampled image.- Parameters:
image
- ModelImage referencelut
- ModelLUT reference
-
resizePanel
private void resizePanel()
Method that resizes the frame and adjusts the rows, columns as needed.
-
set3DModelPosition
private void set3DModelPosition(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Sets the 3DModel position label.- Parameters:
position
- DOCUMENT ME!
-
setPatientSlicePosition
private void setPatientSlicePosition(WildMagic.LibFoundation.Mathematics.Vector3f position)
Sets the PatientSlice position label.- Parameters:
position
- DOCUMENT ME!
-
setRFAToolbarVisible
private void setRFAToolbarVisible(boolean flag)
Set the RFA button visible or not.- Parameters:
flag
- Set the RFA button visible or not
-
setRenderPerspective
public void setRenderPerspective(boolean bEnable)
-
-