Class VolumeRenderer
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
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback,ViewImageUpdateInterface,ActionListener,MouseListener,MouseMotionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener
- Direct Known Subclasses:
VolumeRendererRayCast,VolumeRendererShearWarp
public abstract class VolumeRenderer
extends RenderViewBase
implements MouseMotionListener, MouseListener
Common interface for all volume renderers. Code common to the RayCastVolumeRender and ShearWarpVolumeRender classes
was factored into this, the parent class on 11/14/04.
- Author:
- Matthew J. McAuliffe, Ph.D.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classRay cast Scene State.Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
RenderViewBase.MatrixNested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvasNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ViewJComponentBoxSliceThe frame around the x slice.protected ViewJComponentRenderImageComponent holding the texture of the XY plane image.private javax.media.j3d.Transform3DCurrent transform matrix.private intCurrent transform type.protected int[]Extents of image A, same as xDim, yDim, etc.protected ModelImageCurrent image A.protected ModelImageCurrent image B.private booleanFlag indicating mouse rotation, avoid image disappearing problem.private javax.media.j3d.AppearanceOriginal Appearance obj of the ImageComponent2D texture.private javax.media.j3d.Shape3DShape object of the volume renderer.protected JPanelLightslight control panel.private booleanFlag to turn mouseListener on or off.private booleanprotected doubleFramerate Performance parameters:protected doubleFramerate Performance parameters:protected doubleFramerate Performance parameters:protected intFramerate Performance parameters:protected intFramerate Performance parameters:protected intFramerate Performance parameters:protected intFramerate Performance parameters:private BufferedImageBuffer image for the volume renderer.private javax.media.j3d.ImageComponent2DImage component 2D to hold the volume renderer properties.private SoftwareLightSetSet of lights to use for software-based lighting.private SoftwareMaterialMaterial properties to use for software-based lighting.private javax.media.j3d.Texture2D2D texture of the volume renderer.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.protected intmax Extent of X, Y dimensions.private com.sun.j3d.utils.behaviors.mouse.MouseRotateMouse rotate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseTranslateMouse translate behavior.private com.sun.j3d.utils.behaviors.mouse.MouseZoomMouse zoom behavior.private booleanFlag to indicate whether the mouseReleased event triggered or not.private javax.media.j3d.BranchGroupParent of the x slice.private javax.media.j3d.TransformGroupMember variables used to display the rendered image on the texture-mapped polygon, stored so that they can be updated as the render target image size is changed by the user-interface:.private javax.media.j3d.TransformGroupGroup dictating how the XY plane is translated.private javax.media.j3d.BranchGroupParent of the XY plane image.protected JPanelRendererBaseDialog to turn bounding box of surface renderer on and off, and to change the color of the frame.private booleanParallel rotation flag.protected ViewJProgressBarActual bar which fills with color as the percentage of completion increases.protected int[]Buffer that holds image A pixel data for the XY plane, used to build displayable image.protected int[]Buffer that holds image B pixel data for the XY plane, used to build displayable image.private float[]Resolutions of image A.private static final longUse serialVersionUID for interoperability.private javax.media.j3d.BranchGroupDOCUMENT ME!private javax.media.j3d.BranchGroupDOCUMENT ME!protected JSliderSliders for the image planes.protected SurfaceRenderSurface renderer reference.protected intDimensions of image A.protected JTextFieldText fields that display the slice number next to the sliders.protected intWhich time slice is currently displayed.private int[]Units of measure of imageA.private booleanUpdate the window level flag, call by the plane renderer.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.protected intDimensions of image A.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.protected intDimensions of image A.private floatNumbers dicatating the sizes of the planes based on the extents and resolutions of the image.protected intDimensions of image A.protected intWhich slice is currently displayed in the XY plane.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, viewPanelFields inherited from class javax.media.j3d.Canvas3D
FIELD_ALL, FIELD_LEFT, FIELD_RIGHTFields 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, WIDTHFields inherited from interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
ROTATE, TRANSLATE, ZOOM -
Constructor Summary
ConstructorsConstructorDescriptionVolumeRenderer(ModelImage _imageA, ModelImage _imageB, GraphicsConfiguration _config) Creates a new VolumeRenderer object.VolumeRenderer(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, SurfaceRender surfaceRender, GraphicsConfiguration _config, ViewJProgressBar _pBar) Makes a frame and puts the three image planes into it. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Calls various methods depending on the action.voidOverride the parent autoCapture method to capture MIP image volume.voidclose()Closes the frame.voidCMPMode()Invoke the composite rendering mode.private voidConstructs main frame structures for 3 image planes.private voidCreates the scene graph, made up of a branch group parent, a transform group under that which applies mouse behavior and lights to the scene, and three branch groups under the transform group for each of the three image planes.private voidcreateTexturedImage is added so that the size of the texture used to display the rendered image on the texture-mapped polygon can be changed dynamically.voiddisposeLocal(boolean flag) Clean memory.voidDRRMode()Invoke the DRR rendering mode.protected voidfinalize()Cleans memory.Get the camera control panel.Accessor that returns the reference to componentImageXY.int[]Query information which describes the bounds of the volume.javax.vecmath.Point3fReturn access to the current eye point in world coordinates.Accessor that returns the reference to image A.Accessor that returns the reference to image B.javax.media.j3d.ImageComponent2DAccessor that returns the reference to m_kImageComponent.Get the light control panel.intDOCUMENT ME!javax.media.j3d.TransformGroupAccessor that returns the reference to objTransXY.Get the view control panel.Get the option control panel.booleanChange the camera model.intChange the camera model.Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.intGet the ray trace space size.intGet the ray trace step size.booleanGet the opacity histrogram control panel.protected voidinit(ViewJProgressBar _pBar, VolumeCanvas3D canvas) Initialize the renderer.protected voidMeasure timevoidMIPMode()Invoke the mip rendering mode.voidmouseClicked(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidmouseDragged(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidmouseEntered(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidmouseExited(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidmouseMoved(MouseEvent kEvent) One of the overrides necessary to be a MouseMotionListener.voidmousePressed(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidmouseReleased(MouseEvent kEvent) One of the overrides necessary to be a MouseListener.voidprocessMouseReleased(MouseEvent kEvent) When a mouse button is released, the application is finishing a drag operation to rotate the virtual track ball.voidOverride the parent resetImage method to update image volume in the MIP volume renderer.voidOverride the parent resetImage method to update image volume in the MIP volume renderer.voidOverride the parent resetImage method to update image volume in the MIP volume renderer.voidResets timevoidOverride the parent rotateImage method to rotate the MIP image volume.voidsetActiveImage(int image) Does nothing but must instantiate for this to be a subclass of ViewJFrameBase.voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displays.Do I need this ??voidsetBackgroundColor(Color color) Sets the background color for the frame and rendered image.voidsetEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified.voidsetEnableMouseBehaviors(boolean bEnable) set the MouseBehavior enabled states. this is used to turn on and off the mouse behaviorvoidSets the GUI components to their proper state before the action is dispatched from the player.voidAccessor that sets the LUT for image A.voidAccessor that sets the LUT for image B.voidsetMaterialShininess(float value) Set the texture material shininess value.voidsetMaxRenExtent(int iExtent) setMaxRenExtent changes the render target image by changing the pixBufferA_XY size and by changing the render target image of the componentImageXY member variable. createTexturedImage (local) is called to reinitialize the size of the texture displayed on the texture-mapped polygon.voidsetParallel(boolean bParallel) Change the camera model.voidsetParallelRotation(boolean flag) Set the parallel rotation flag from the viewJFrameVolumeView.voidsetRenderMode(int renderMode) Change the camera model.voidSets the RGB table for image A.voidSets the RGB table for image B.voidsetRotationAngle(int value) Set the rotation angle for the camera control.voidsetRotationAxis(int axis) Set the rotation axis for the camera control.voidsetSceneState(Object scene) Sets the scene state appropriately, so that the slices that are supposed to be visible are showing, the ones that aren't are hidden, and the sliders are starting at the appropriate value.voidsetSelectedLight(int iLight) Set the light for the given light index.voidsetSlice(int slice) Does nothing but must instantiate for this to be a subclass of ViewJFrameBase.voidsetSpaceSize(int spaceSize) Get the ray trace space size.voidsetStepSize(int stepSize) Change the camera model.voidSetTestFrameRate(boolean bTest) voidsetTimeSlice(int slice) Sets the time slice to be displayed and changes the image planes displayed.voidsetWindlevelUpdate(boolean flag) Set the update win-level flag from the plane render mouse drag, release events.abstract voidSets how the image plane should be displayed depending on value of slider.voidInvoke the SURFACEFAST rendering mode.voidSURMode()Invoke the SURFACE rendering mode.voidtransformChanged(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed.voidtransformUpdate(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed.protected voidUpdate frame countbooleanThis methods calls the componentImage's update method to redraw the screen.booleanThis methods calls the componentImage's REPAINT method to redraw the screen.final booleanThis methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.final booleanupdateImages(boolean forceShow) This methods calls the componentImage's update method to redraw the screen.final booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.voidSetup the specified set of lights to use for rendering.voidupdateScale(javax.media.j3d.Transform3D transform) Called by the volume surface render to update the mouse zoom transform.voidupdateTranslate(javax.media.j3d.Transform3D transform) Called by the surface volume render to update the tranlation behavior.Methods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
calcImageNormals, createBoxFrame, disableCamera, disposeLocal, getBehaviorGroup, getBound, getBranchGroup, getCanvas, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, setBoxColor, writeImage, writeImageAutoMethods inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
paint, postSwap, supportsTexture3D, updateMethods 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, waitForOffScreenRenderingMethods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyMethods 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
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
componentImageXY
Component holding the texture of the XY plane image. -
extents
protected int[] extentsExtents of image A, same as xDim, yDim, etc. -
imageA
Current image A. -
imageB
Current image B. -
lightControl
light control panel. -
maxRenExtent
protected int maxRenExtentmax Extent of X, Y dimensions. -
optionsPanel
Dialog to turn bounding box of surface renderer on and off, and to change the color of the frame. -
pBar
Actual bar which fills with color as the percentage of completion increases. -
pixBufferA_XY
protected int[] pixBufferA_XYBuffer that holds image A pixel data for the XY plane, used to build displayable image. -
pixBufferB_XY
protected int[] pixBufferB_XYBuffer that holds image B pixel data for the XY plane, used to build displayable image. -
sliderT
Sliders for the image planes. -
surfaceRender
Surface renderer reference. -
textT
Text fields that display the slice number next to the sliders. -
tSlice
protected int tSliceWhich time slice is currently displayed. -
xDim
protected int xDimDimensions of image A. -
yDim
protected int yDimDimensions of image A. -
zDim
protected int zDimDimensions of image A. -
tDim
protected int tDimDimensions of image A. -
zSlice
protected int zSliceWhich slice is currently displayed in the XY plane. -
mouseBehaviorRotate
private com.sun.j3d.utils.behaviors.mouse.MouseRotate mouseBehaviorRotateMouse rotate behavior. -
mouseBehaviorTranslate
private com.sun.j3d.utils.behaviors.mouse.MouseTranslate mouseBehaviorTranslateMouse translate behavior. -
mouseBehaviorZoom
private com.sun.j3d.utils.behaviors.mouse.MouseZoom mouseBehaviorZoomMouse zoom behavior. -
boxSliceX
The frame around the x slice. -
currentTransform
private javax.media.j3d.Transform3D currentTransformCurrent transform matrix. -
currentTransType
private int currentTransTypeCurrent transform type. -
isRotate
private boolean isRotateFlag indicating mouse rotation, avoid image disappearing problem. -
kDefaultAppearance
private javax.media.j3d.Appearance kDefaultAppearanceOriginal Appearance obj of the ImageComponent2D texture. -
kShape
private javax.media.j3d.Shape3D kShapeShape object of the volume renderer. -
m_bMouseListen
private boolean m_bMouseListenFlag to turn mouseListener on or off. -
m_kImage
Buffer image for the volume renderer. -
m_kImageComponent
private javax.media.j3d.ImageComponent2D m_kImageComponentImage component 2D to hold the volume renderer properties. -
m_kSoftwareLightSet
Set of lights to use for software-based lighting. -
m_kSoftwareMaterial
Material properties to use for software-based lighting. -
m_kTextureXY
private javax.media.j3d.Texture2D m_kTextureXY2D texture of the volume renderer. -
mouseReleased
private boolean mouseReleasedFlag to indicate whether the mouseReleased event triggered or not. -
objBoxSliceX
private javax.media.j3d.BranchGroup objBoxSliceXParent of the x slice. -
objTransSliceX
private javax.media.j3d.TransformGroup objTransSliceXMember variables used to display the rendered image on the texture-mapped polygon, stored so that they can be updated as the render target image size is changed by the user-interface:. -
objTransXY
private javax.media.j3d.TransformGroup objTransXYGroup dictating how the XY plane is translated. -
objXYPlane
private javax.media.j3d.BranchGroup objXYPlaneParent of the XY plane image. -
parallelRotation
private boolean parallelRotationParallel rotation flag. -
resols
private float[] resolsResolutions of image A. -
shapeBG
private javax.media.j3d.BranchGroup shapeBGDOCUMENT ME! -
shapeSliceBG
private javax.media.j3d.BranchGroup shapeSliceBGDOCUMENT ME! -
units
private int[] unitsUnits of measure of imageA. -
updateWinlevel
private boolean updateWinlevelUpdate the window level flag, call by the plane renderer. -
xBox
private float xBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
yBox
private float yBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
zBox
private float zBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
maxBox
private float maxBoxNumbers dicatating the sizes of the planes based on the extents and resolutions of the image. -
m_bTestFrameRate
private boolean m_bTestFrameRate -
m_dLastTime
protected double m_dLastTimeFramerate Performance parameters: -
m_dAccumulatedTime
protected double m_dAccumulatedTimeFramerate Performance parameters: -
m_dFrameRate
protected double m_dFrameRateFramerate Performance parameters: -
m_iFrameCount
protected int m_iFrameCountFramerate Performance parameters: -
m_iAccumulatedFrameCount
protected int m_iAccumulatedFrameCountFramerate Performance parameters: -
m_iTimer
protected int m_iTimerFramerate Performance parameters: -
m_iMaxTimer
protected int m_iMaxTimerFramerate Performance parameters:
-
-
Constructor Details
-
VolumeRenderer
Creates a new VolumeRenderer object.- Parameters:
_imageA- First image to display, cannot be null._imageB- Second loaded image, may be null._config- Graphics configuration reference.
-
VolumeRenderer
public VolumeRenderer(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, SurfaceRender surfaceRender, 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 render reference._config- Graphics configuration reference._pBar- Build volume render progress bar reference.
-
-
Method Details
-
stateChanged
Sets how the image plane should be displayed depending on value of slider.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- Event that triggered this function.
-
actionPerformed
Calls various methods depending on the action.- Surface - opens the surface dialog
- View - opens the view control dialog
- Mouse - opens the mouse recorder dialog
- About - displays a message about this renderer
- MIPmode - MIP rendering mode
- DDRmode - DDR rendering mode
- CMPmode - CMP rendering mode
- SURmode - SUR rendering mode
- Exit - sets variables to null and disposes of this frame
- X, Y, Z checkboxes - toggles the appropriate image planes on or off
- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- Event that triggered function.
-
autoCapture
public void autoCapture()Override the parent autoCapture method to capture MIP image volume.- Overrides:
autoCapturein classRenderViewBase
-
close
public void close()Closes the frame. -
CMPMode
public void CMPMode()Invoke the composite rendering mode. -
disposeLocal
public void disposeLocal(boolean flag) Clean memory.- Parameters:
flag- is true call the super.disposeLocal
-
DRRMode
public void DRRMode()Invoke the DRR rendering mode. -
getCameraControl
Get the camera control panel.- Returns:
- JPanelCamera camera control panel
-
getComponentImageXY
Accessor that returns the reference to componentImageXY.- Returns:
- DOCUMENT ME!
-
getExtents
public int[] getExtents()Query information which describes the bounds of the volume.- Returns:
- int[] Array of three values containing the X, Y, and Z dimensions respectively.
-
getEyePoint
public javax.vecmath.Point3f getEyePoint()Return access to the current eye point in world coordinates.- Returns:
- Point3f current eye point in world coordinates.
-
getImageA
Accessor that returns the reference to image A.- Overrides:
getImageAin classRenderViewBase- Returns:
- Image A.
-
getImageB
Accessor that returns the reference to image B.- Overrides:
getImageBin classRenderViewBase- Returns:
- Image B.
-
getImageComponent
public javax.media.j3d.ImageComponent2D getImageComponent()Accessor that returns the reference to m_kImageComponent.- Returns:
- DOCUMENT ME!
-
getLightControlPanel
Get the light control panel.- Returns:
- JPanel the light control panel
-
getMaxRenExtent
public int getMaxRenExtent()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getObjTransXY
public javax.media.j3d.TransformGroup getObjTransXY()Accessor that returns the reference to objTransXY.- Returns:
- DOCUMENT ME!
-
getOptions
Get the view control panel.- Returns:
- JPanel view control panel
-
getOptionsPanel
Get the option control panel.- Returns:
- optionsPanel JPanelShearWarpRenderOptions options panel
-
getParallel
public boolean getParallel()Change the camera model.- Returns:
- bParallel true for a parallel camera, false for a perspective camera
-
getRenderMode
public int getRenderMode()Change the camera model.- Returns:
- renderMode MIP, DDR, SUR
-
getSceneState
Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.- Specified by:
getSceneStatein classRenderViewBase- Returns:
- A SceneState object with the variables set appropriately.
-
getSpaceSize
public int getSpaceSize()Get the ray trace space size.- Returns:
- componentImageXY.getSpaceSize() space size
-
getStepSize
public int getStepSize()Get the ray trace step size.- Returns:
- componentImageXY.getStepSize() step size
-
getVolOpacity
Get the opacity histrogram control panel.- Returns:
- JPanelVolOpacity Opacity panel
-
MIPMode
public void MIPMode()Invoke the mip rendering mode. -
mouseClicked
One of the overrides necessary to be a MouseListener. This member only exists to satisfy the conditions of being a MouseListener. It does nothing when invoked.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse clicked
-
mouseDragged
One of the overrides necessary to be a MouseListener. This member only exists to satisfy the conditions of being a MouseListener. It does nothing when invoked.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
kEvent- the mouse event generated by a mouse drag
-
mouseEntered
One of the overrides necessary to be a MouseListener. This member only exists to satisfy the conditions of being a MouseListener. It does nothing when invoked.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse entered
-
mouseExited
One of the overrides necessary to be a MouseListener. This member only exists to satisfy the conditions of being a MouseListener. It does nothing when invoked.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse exit
-
mouseMoved
One of the overrides necessary to be a MouseMotionListener. This member only exists to satisfy the conditions of being a MouseMotionListener. It does nothing when invoked.- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
kEvent- the event generated by a mouse movement
-
mousePressed
One of the overrides necessary to be a MouseListener. When a mouse button is pressed, the application is starting a drag operation to rotate the virtual track ball. The initial mouse location is recorded for use by 'moveTrackBall', stored as a point (x0,y0) in [-1,1]^2.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse press
-
mouseReleased
One of the overrides necessary to be a MouseListener.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse release
-
processMouseReleased
When a mouse button is released, the application is finishing a drag operation to rotate the virtual track ball. The final mouse location is recorded for use by 'moveTrackBall', stored as a point (x1,y1) in [-1,1]^2. The virtual track ball is moved into its final position and a ray trace is performed at highest resolution.- Parameters:
kEvent- the mouse event generated by a mouse release
-
resetAxisX
public void resetAxisX()Override the parent resetImage method to update image volume in the MIP volume renderer.- Overrides:
resetAxisXin classRenderViewBase
-
resetAxisY
public void resetAxisY()Override the parent resetImage method to update image volume in the MIP volume renderer.- Overrides:
resetAxisYin classRenderViewBase
-
resetImage
public void resetImage()Override the parent resetImage method to update image volume in the MIP volume renderer.- Overrides:
resetImagein classRenderViewBase
-
rotateImage
public void rotateImage()Override the parent rotateImage method to rotate the MIP image volume. This method manully rotate the image volume during the camera snapshooting.- Overrides:
rotateImagein classRenderViewBase
-
setActiveImage
public void setActiveImage(int image) Does nothing but must instantiate for this to be a subclass of ViewJFrameBase.- Parameters:
image- DOCUMENT ME!
-
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displays.Do I need this ??- Specified by:
setAlphaBlendin classRenderViewBase- Parameters:
value- Amount [0,100] that is the percentage of Image A to be displayed.
-
setBackgroundColor
Sets the background color for the frame and rendered image.- Overrides:
setBackgroundColorin classRenderViewBase- Parameters:
color- Color RGBA color to use as the background color.
-
setEnabled
public void setEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified.- Overrides:
setEnabledin classComponent- Parameters:
flag- Iftruethe image/VOIs can be modified; iffalseimage/VOIs can NOT be modified.
-
setEnableMouseBehaviors
public void setEnableMouseBehaviors(boolean bEnable) set the MouseBehavior enabled states. this is used to turn on and off the mouse behavior- Parameters:
bEnable- boolean bEnable to turn mouseListening on or off.
-
setGUI
Sets the GUI components to their proper state before the action is dispatched from the player.- Specified by:
setGUIin classRenderViewBase- Parameters:
scene- The state of the scene.
-
setLUTa
Accessor that sets the LUT for image A.- Parameters:
LUT- The LUT.
-
setLUTb
Accessor that sets the LUT for image B.- Parameters:
LUT- The LUT
-
setMaterialShininess
public void setMaterialShininess(float value) Set the texture material shininess value.- Parameters:
value- shininess value.
-
setMaxRenExtent
public void setMaxRenExtent(int iExtent) setMaxRenExtent changes the render target image by changing the pixBufferA_XY size and by changing the render target image of the componentImageXY member variable. createTexturedImage (local) is called to reinitialize the size of the texture displayed on the texture-mapped polygon.- Parameters:
iExtent- DOCUMENT ME!
-
setParallel
public void setParallel(boolean bParallel) Change the camera model.- Parameters:
bParallel- true for a parallel camera, false for a perspective camera
-
setParallelRotation
public void setParallelRotation(boolean flag) Set the parallel rotation flag from the viewJFrameVolumeView.- Parameters:
flag-trueset all the renderer to parallel rotation,falseparallel rotation mode off.
-
setRenderMode
public void setRenderMode(int renderMode) Change the camera model.- Parameters:
renderMode- MIP, DDR, SUR
-
setRGBTA
Sets the RGB table for image A.- Specified by:
setRGBTAin classRenderViewBase- Parameters:
RGBT- New RGB table for image A.
-
setRGBTB
Sets the RGB table for image B.- Specified by:
setRGBTBin classRenderViewBase- Parameters:
RGBT- New RGB table for image B.
-
setRotationAngle
public void setRotationAngle(int value) Set the rotation angle for the camera control.- Overrides:
setRotationAnglein classRenderViewBase- Parameters:
value- rotation angle
-
setRotationAxis
public void setRotationAxis(int axis) Set the rotation axis for the camera control.- Overrides:
setRotationAxisin classRenderViewBase- Parameters:
axis- rotation axis
-
setSceneState
Sets the scene state appropriately, so that the slices that are supposed to be visible are showing, the ones that aren't are hidden, and the sliders are starting at the appropriate value.- Parameters:
scene- The state of the scene.
-
setSelectedLight
public void setSelectedLight(int iLight) Set the light for the given light index.- Parameters:
iLight- int
-
setSlice
public void setSlice(int slice) Does nothing but must instantiate for this to be a subclass of ViewJFrameBase.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- DOCUMENT ME!
-
setSpaceSize
public void setSpaceSize(int spaceSize) Get the ray trace space size.- Parameters:
spaceSize- Raytracing region space size.
-
setStepSize
public void setStepSize(int stepSize) Change the camera model.- Parameters:
stepSize- RayTracint step size.
-
setTimeSlice
public void setTimeSlice(int slice) Sets the time slice to be displayed and changes the image planes displayed.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- Indicates image time-slice (4th dimension) to be displayed.
-
setWindlevelUpdate
public void setWindlevelUpdate(boolean flag) Set the update win-level flag from the plane render mouse drag, release events.- Parameters:
flag- true update window level, false not update.
-
SURFASTMode
public void SURFASTMode()Invoke the SURFACEFAST rendering mode. -
SURMode
public void SURMode()Invoke the SURFACE rendering mode. -
transformChanged
public void transformChanged(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed. Does not use the type parameter.- Specified by:
transformChangedin interfacecom.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback- Parameters:
type- Type of transform.transform- Transform that was changed to.
-
transformUpdate
public void transformUpdate(int type, javax.media.j3d.Transform3D transform) Tells the mouse dialog that the transform has changed. Does not use the type parameter.- Parameters:
type- Type of transform.transform- Transform that was changed to.
-
updateImage
public boolean updateImage()This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Returns:
- Confirms successful update.
-
updateImageExtents
public boolean updateImageExtents()This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Returns:
- DOCUMENT ME!
-
updateImages
public final boolean updateImages()This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- Confirms successful update.
-
updateImages
public final boolean updateImages(boolean forceShow) This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
forceShow- Forces show to reimport image and calculate java image.- Returns:
- Confirms successful update.
-
updateImages
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- LUT used to update imageA.LUTb- LUT used to update imageB.forceShow- Forces show to reimport image and calculate java image.interpMode- Image interpolation method (Nearest or Smooth).- Returns:
- Confirms successful update.
-
updateLighting
public void updateLighting()Setup the specified set of lights to use for rendering. -
updateScale
public void updateScale(javax.media.j3d.Transform3D transform) Called by the volume surface render to update the mouse zoom transform. Set the tranform matrix to scale matrix.- Parameters:
transform- Zoom transform.
-
updateTranslate
public void updateTranslate(javax.media.j3d.Transform3D transform) Called by the surface volume render to update the tranlation behavior. Set the transform matrix to translate matrix.- Parameters:
transform- Translate tranform
-
finalize
Cleans memory. -
init
Initialize the renderer.- Parameters:
_pBar- ViewJProgressBarcanvas- VolumeCanvas3D
-
configureFrame
private void configureFrame()Constructs main frame structures for 3 image planes. Makes the LUT if necessary, then sets up the buffer arrays appropriately and calls the constructors for the three image planes. -
createImageSceneGraph
private void createImageSceneGraph()Creates the scene graph, made up of a branch group parent, a transform group under that which applies mouse behavior and lights to the scene, and three branch groups under the transform group for each of the three image planes. The surfaces that can be added would * be children of the transform group. Each image plane has a transform group associated with it * and beneath that, a box shape where the texture maps are applied. The shape is what is actually * displayed. -
createTexturedImage
private void createTexturedImage()createTexturedImage is added so that the size of the texture used to display the rendered image on the texture-mapped polygon can be changed dynamically. Instead of recreating the scene graph, this function re-initializes the texture-size dependent components of the scene graph and can be accessed dynamically through the user-interface. -
ResetTime
public void ResetTime()Resets time- Overrides:
ResetTimein classVolumeCanvas3D
-
MeasureTime
protected void MeasureTime()Measure time- Overrides:
MeasureTimein classVolumeCanvas3D
-
UpdateFrameCount
protected void UpdateFrameCount()Update frame count- Overrides:
UpdateFrameCountin classVolumeCanvas3D
-
SetTestFrameRate
public void SetTestFrameRate(boolean bTest) - Overrides:
SetTestFrameRatein classVolumeCanvas3D
-
GetTestFrameRate
public boolean GetTestFrameRate()- Overrides:
GetTestFrameRatein classVolumeCanvas3D
-