Class VolumeImageViewer
- java.lang.Object
-
- WildMagic.LibApplications.OpenGLApplication.Application
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeImageViewer
-
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.MouseWheelListener,java.io.Serializable,java.util.EventListener
- Direct Known Subclasses:
VolumeImageCrop,VolumeImageExtract,VolumeImageMultiDimensionalTransfer,VolumeImageSurfaceMask
public class VolumeImageViewer extends WildMagic.LibApplications.OpenGLApplication.JavaApplication3D implements com.jogamp.opengl.GLEventListener, java.awt.event.KeyListener- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected doubledpiScaleprivate doubleelapsedTimeElapsed time (in milliseconds) -- time it took for algorithm to run.protected booleanm_bDisplayprotected booleanm_bDisposeprotected booleanm_bInitprotected static intm_iScreenCaptureCounterprotected intm_iSliceprotected com.jogamp.opengl.util.Animatorm_kAnimatorprotected WildMagic.LibGraphics.Rendering.CullStatem_kCullprotected WildMagic.LibGraphics.SceneGraph.Cullerm_kCullerprotected java.awt.Framem_kFrameprotected VolumeTriPlanarInterfacem_kParentprotected VolumeImagem_kVolumeImageprotected WildMagic.LibGraphics.SceneGraph.TriMeshm_pkPlaneprotected WildMagic.LibGraphics.Effects.ShaderEffectm_spkEffectprotected WildMagic.LibGraphics.SceneGraph.Nodem_spkSceneprivate static longserialVersionUIDprotected longstartTime-
Fields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
cameraParams, m_akWorldAxis, m_bCameraMoveable, m_bDArrowPressed, m_bEndPressed, m_bHomePressed, m_bLArrowPressed, m_bLInsertPressed, m_bObjectZoomed, m_bPgDnPressed, m_bPgUpPressed, m_bRArrowPressed, m_bRDeletePressed, m_bTrackBallDown, m_bUArrowPressed, m_bUseTrackBall, m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_fRotSpeed, m_fRotSpeedFactor, m_fTrnSpeed, m_fTrnSpeedFactor, m_fXDrag0, m_fXTrack0, m_fXTrack1, m_fYDrag0, m_fYTrack0, m_fYTrack1, m_fZoomSpeed, m_iAccumulatedFrameCount, m_iDoPitch, m_iDoRoll, m_iDoYaw, m_iFrameCount, m_iMaxTimer, m_iMouseButton, m_iTimer, m_kSaveRotate, m_mouseRotSpeed, m_spkCamera, m_spkMotionObject, pitchRotationAngle, rollRotationAngle, xCameraMove, xCameraTurn, yawRotationAngle, yCameraMove, yCameraTurn, zCameraMove
-
-
Constructor Summary
Constructors Constructor Description VolumeImageViewer(com.jogamp.opengl.awt.GLCanvas canvas, double dpiScale, VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage)VolumeImageViewer(VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecomputeElapsedTime()Computes the elapased time as the difference between the start time and the current time (both of which are in milliseconds).protected voidCreatePlaneNode()protected voidCreateScene()voiddisplay(com.jogamp.opengl.GLAutoDrawable arg0)voiddisplayChanged(com.jogamp.opengl.GLAutoDrawable arg0, boolean arg1, boolean arg2)voiddispose(com.jogamp.opengl.GLAutoDrawable arg0)com.jogamp.opengl.awt.GLCanvasGetCanvas()voidinit(com.jogamp.opengl.GLAutoDrawable arg0)voidkeyPressed(java.awt.event.KeyEvent kKey)keyPressed callback.static voidmain(VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage, boolean bShowFrame)voidreshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)voidSetAnimator(com.jogamp.opengl.util.Animator kAnimator)voidSetFrame(java.awt.Frame kFrame)voidsetStartTime()Sets the start time to the current time.protected voidUpdateSlice(float fZ)booleanwriteImage()-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
dispose, DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyReleased, keyTyped, LookDown, LookUp, MeasureTime, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, MoveBackward, MoveCamera, MoveDown, MoveForward, MoveLeft, MoveObject, MoveRight, MoveUp, OnDisplay, OnInitialize, OnTerminate, ResetTime, RotateTrackBall, setCameraLocation, setCameraParameters, setObjectParameters, setObjectRotation, TurnLeft, TurnRight, UpdateCameraRotationSpeed, UpdateCameraTranslationSpeed, UpdateCameraZoomSpeed, UpdateFrameCount, UpdateMouseRotationSpeed
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
GetAspectRatio, GetHeight, GetRenderer, GetWidth, GetWindowTitle, GetXPosition, GetYPosition, OnIdle, OnMove, OnPrecreate, OnResize, SetRenderer
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.Application
reloadShaders, TestStreaming
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_iScreenCaptureCounter
protected static int m_iScreenCaptureCounter
-
m_spkScene
protected WildMagic.LibGraphics.SceneGraph.Node m_spkScene
-
m_kCull
protected WildMagic.LibGraphics.Rendering.CullState m_kCull
-
m_kCuller
protected WildMagic.LibGraphics.SceneGraph.Culler m_kCuller
-
m_kVolumeImage
protected VolumeImage m_kVolumeImage
-
m_spkEffect
protected WildMagic.LibGraphics.Effects.ShaderEffect m_spkEffect
-
m_pkPlane
protected WildMagic.LibGraphics.SceneGraph.TriMesh m_pkPlane
-
m_iSlice
protected int m_iSlice
-
m_kAnimator
protected com.jogamp.opengl.util.Animator m_kAnimator
-
m_kFrame
protected java.awt.Frame m_kFrame
-
m_kParent
protected VolumeTriPlanarInterface m_kParent
-
m_bDisplay
protected boolean m_bDisplay
-
m_bInit
protected boolean m_bInit
-
m_bDispose
protected boolean m_bDispose
-
startTime
protected long startTime
-
elapsedTime
private double elapsedTime
Elapsed time (in milliseconds) -- time it took for algorithm to run.
-
dpiScale
protected double dpiScale
-
-
Constructor Detail
-
VolumeImageViewer
public VolumeImageViewer(com.jogamp.opengl.awt.GLCanvas canvas, double dpiScale, VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage)
-
VolumeImageViewer
public VolumeImageViewer(VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage)
-
-
Method Detail
-
main
public static void main(VolumeTriPlanarInterface kParentFrame, VolumeImage kVolumeImage, boolean bShowFrame)
- Parameters:
args-
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
displayin interfacecom.jogamp.opengl.GLEventListener
-
displayChanged
public void displayChanged(com.jogamp.opengl.GLAutoDrawable arg0, boolean arg1, boolean arg2)
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
disposein interfacecom.jogamp.opengl.GLEventListener
-
GetCanvas
public com.jogamp.opengl.awt.GLCanvas GetCanvas()
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
initin interfacecom.jogamp.opengl.GLEventListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent kKey)
keyPressed callback.- Specified by:
keyPressedin interfacejava.awt.event.KeyListener- Overrides:
keyPressedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D- Parameters:
kKey- the KeyEvent triggering the callback.
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)- Specified by:
reshapein interfacecom.jogamp.opengl.GLEventListener
-
SetAnimator
public void SetAnimator(com.jogamp.opengl.util.Animator kAnimator)
-
SetFrame
public void SetFrame(java.awt.Frame kFrame)
-
writeImage
public boolean writeImage()
-
CreatePlaneNode
protected void CreatePlaneNode()
-
CreateScene
protected void CreateScene()
-
UpdateSlice
protected void UpdateSlice(float fZ)
-
setStartTime
public void setStartTime()
Sets the start time to the current time. This should be called at the beginning of the run() method.
-
computeElapsedTime
public double computeElapsedTime()
Computes the elapased time as the difference between the start time and the current time (both of which are in milliseconds).- Returns:
- the elapsed time in seconds -- this is a double value
-
-