Class VolumeRendererRayCast
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Canvas
-
- javax.media.j3d.Canvas3D
-
- gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
-
- gov.nih.mipav.view.renderer.J3D.RenderViewBase
-
- gov.nih.mipav.view.renderer.J3D.volumeview.VolumeRenderer
-
- gov.nih.mipav.view.renderer.J3D.volumeview.VolumeRendererRayCast
-
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
,ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
public class VolumeRendererRayCast extends VolumeRenderer implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener
Frame that holds the surface renderer. This frame is only possible to activate if a three dimensional image is loaded. The image shows up in the frame as the three planes, with an axial view, a coronal view, and a sagittal view. The user can slide these planes up and down and can turn them on and off. The user can also load in surfaces created from the original image. These 3D surfaces will appear in the proper place within the three image planes. There are many options for viewing the surfaces. Additionally, the user can change the view mode, so that the mouse causes the view to "fly". The user can then record the different mouse actions and play them back.- Author:
- Matthew J. McAuliffe, Ph.D.
- See Also:
ViewJComponentSurfaceImage
,JDialogSurface
,JDialogView
,JDialogMouseRecorder
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.VolumeRenderer
VolumeRenderer.SceneState
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
RenderViewBase.Matrix
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Use serialVersionUID for interoperability.-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.VolumeRenderer
componentImageXY, extents, imageA, imageB, lightControl, m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_iAccumulatedFrameCount, m_iFrameCount, m_iMaxTimer, m_iTimer, maxRenExtent, optionsPanel, pBar, pixBufferA_XY, pixBufferB_XY, sliderT, surfaceRender, tDim, textT, tSlice, xDim, yDim, zDim, zSlice
-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
background, bounds, boxFrame, canvas, captureFrame, captureImage, config, displayMode, IMAGE_A, IMAGE_B, LUTa, LUTb, objBehaviorBG, objBoxFrameBG, objRootBG, rotationAngle, rotationAxis, rotationControlPanel, rotationTimes, rotationTotal, sceneRootTG, sliderEvents, transRotation, transRotationMatrix, triPlanarViewBG, universe, viewPanel
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description VolumeRendererRayCast(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, SurfaceRender surfaceRender, java.awt.GraphicsConfiguration _config, ViewJProgressBar _pBar)
Makes a frame and puts the three image planes into it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
autoCapture()
Override the parent autoCapture method to capture MIP image volume.void
disposeLocal()
Dispose memory.protected void
finalize()
Call from the parent frame to dispose memory.void
setBlurFlag(boolean flag)
Blur the result ray traced image or not.void
setVertexDiffuse(java.awt.Color color)
Set the vertex diffuse color.void
setVertexSpecular(java.awt.Color color)
Set the vertex specular color.void
stateChanged(javax.swing.event.ChangeEvent e)
Sets how the image plane should be displayed depending on value of slider.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.VolumeRenderer
actionPerformed, close, CMPMode, disposeLocal, DRRMode, getCameraControl, getComponentImageXY, getExtents, getEyePoint, getImageA, getImageB, getImageComponent, getLightControlPanel, getMaxRenExtent, getObjTransXY, getOptions, getOptionsPanel, getParallel, getRenderMode, getSceneState, getSpaceSize, getStepSize, GetTestFrameRate, getVolOpacity, init, MeasureTime, MIPMode, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, processMouseReleased, resetAxisX, resetAxisY, resetImage, ResetTime, rotateImage, setActiveImage, setAlphaBlend, setBackgroundColor, setEnabled, setEnableMouseBehaviors, setGUI, setLUTa, setLUTb, setMaterialShininess, setMaxRenExtent, setParallel, setParallelRotation, setRenderMode, setRGBTA, setRGBTB, setRotationAngle, setRotationAxis, setSceneState, setSelectedLight, setSlice, setSpaceSize, setStepSize, SetTestFrameRate, setTimeSlice, setWindlevelUpdate, SURFASTMode, SURMode, transformChanged, transformUpdate, UpdateFrameCount, updateImage, updateImageExtents, updateImages, updateImages, updateImages, updateLighting, updateScale, updateTranslate
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
calcImageNormals, createBoxFrame, disableCamera, getBehaviorGroup, getBound, getBranchGroup, getCanvas, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, setBoxColor, writeImage, writeImageAuto
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
paint, postSwap, supportsTexture3D, update
-
Methods inherited from class javax.media.j3d.Canvas3D
addNotify, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, isOffScreen, isRendererRunning, isShadingLanguageSupported, postRender, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
-
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VolumeRendererRayCast
public VolumeRendererRayCast(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, SurfaceRender surfaceRender, java.awt.GraphicsConfiguration _config, ViewJProgressBar _pBar)
Makes a frame and puts the three image planes into it. Creates the scene graph which dictates the behavior of the image planes and surfaces. Initializes the surface dialog and the mouse recorder dialog, so that this original view is saved. When the user opens these dialogs, they have already been created; they are just set to visible.- Parameters:
_imageA
- First image to display, cannot be null._LUTa
- LUT of the imageA (if null grayscale LUT is constructed)._imageB
- Second loaded image, may be null._LUTb
- LUT of the imageB, may be null.surfaceRender
- Surface-based renderer_config
- Graphics configuration_pBar
- volume render progress bar reference.
-
-
Method Detail
-
autoCapture
public void autoCapture()
Override the parent autoCapture method to capture MIP image volume.- Overrides:
autoCapture
in classVolumeRenderer
-
disposeLocal
public void disposeLocal()
Dispose memory.- Overrides:
disposeLocal
in classRenderViewBase
-
setBlurFlag
public void setBlurFlag(boolean flag)
Blur the result ray traced image or not.- Parameters:
flag
- true bluring to reduce contract, false not bluring
-
setVertexDiffuse
public void setVertexDiffuse(java.awt.Color color)
Set the vertex diffuse color.- Parameters:
color
- Color
-
setVertexSpecular
public void setVertexSpecular(java.awt.Color color)
Set the vertex specular color.- Parameters:
color
- Color
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets how the image plane should be displayed depending on value of slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Specified by:
stateChanged
in classVolumeRenderer
- Parameters:
e
- Event that triggered this function.
-
finalize
protected void finalize() throws java.lang.Throwable
Call from the parent frame to dispose memory.- Overrides:
finalize
in classVolumeRenderer
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
-