Class ImageRegistrationGPU
- java.lang.Object
-
- WildMagic.LibApplications.OpenGLApplication.Application
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
- gov.nih.mipav.view.renderer.WildMagic.Render.ImageRegistrationGPU
-
- All Implemented Interfaces:
java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.io.Serializable
,java.util.EventListener
public class ImageRegistrationGPU extends WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private float[]
m_afBracket
(package private) float[]
m_afBracketB
private float[]
m_afPt
private float[]
m_afStartPoint
private float[]
m_afUnitDirections
protected VolumeHistogramEffect
m_akCollapse2D
protected VolumeHistogramEffect
m_akCollapseColumns
protected VolumeHistogramEffect
m_akCollapseRows
protected ImageReduceEffect
m_akImageReduceEntropy
private boolean
m_bCalcLineMin
private boolean
m_bCleanUp
protected boolean
m_bDisplay
private boolean
m_bDispose
private boolean
m_bDisposeComplete
protected boolean
m_bInit
private boolean
m_bStatus
private double
m_dHx
private double
m_dHxy
private double
m_dHy
private double
m_dOverlap
private float
m_fDim
private float
m_fMinDist
private float
m_fPtLength
private float
m_fRigid
private float
m_fUnitTolerance
private int
m_iRenderLoops
protected static int
m_iScreenCaptureCounter
private WildMagic.LibGraphics.Rendering.AlphaState
m_kAlpha
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kBracketNewOut
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kBracketOut
private WildMagic.LibGraphics.SceneGraph.Polypoint
m_kBracketPoints
protected LineMinimizationEffect
m_kCalcTransform
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kEntropyOut
private WildMagic.LibGraphics.SceneGraph.Polypoint
m_kEntropyPoints2D
protected javax.swing.JFrame
m_kFrame
private WildMagic.LibFoundation.Mathematics.Matrix4f
m_kFromOrigin
private WildMagic.LibFoundation.Mathematics.Matrix4f
m_kFromOriginInv
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kHistogramOutput
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kHistogramOutputB
private WildMagic.LibGraphics.SceneGraph.Polypoint
m_kHistogramPoints2D
private ModelSimpleImage
m_kImageA
private ModelSimpleImage
m_kImageB
protected VolumeHistogramEffect
m_kImageEffectDual
protected LineMinimizationEffect
m_kImageLineMinDual
protected LineMinimizationEffect
m_kImageLineMinPass2a
private WildMagic.LibGraphics.SceneGraph.Polypoint
m_kImagePointsDual
private WildMagic.LibFoundation.Mathematics.Matrix4f
m_kImageTransform
private WildMagic.LibFoundation.Mathematics.Matrix4d
m_kImageTransformd
private ModelSimpleImage
m_kMoving
private java.lang.String
m_kNameA
private java.lang.String
m_kNameB
private ModelSimpleImage
m_kTarget
private WildMagic.LibGraphics.Rendering.Texture
m_kTextureA
private WildMagic.LibGraphics.Rendering.Texture
m_kTextureB
private WildMagic.LibFoundation.Mathematics.Matrix4f
m_kToOrigin
private WildMagic.LibFoundation.Mathematics.Matrix4f
m_kToOriginInv
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
m_kTransformOut
private WildMagic.LibGraphics.SceneGraph.Polypoint
m_kTransformPoints
private static long
serialVersionUID
-
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 ImageRegistrationGPU(ModelSimpleImage kTarget, ModelSimpleImage kMoving)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcEntropy()
private void
calcEntropy(ModelSimpleImage kImage, double dNumSamples)
void
calcError(TransMatrix kTransform)
void
calcError(TransMatrixd kTransform)
private void
calcLineMin()
void
calcLineMinimization()
boolean
checkStatus()
private void
cleanUp()
WildMagic.LibFoundation.Mathematics.Matrix4f
convertTo4D(WildMagic.LibFoundation.Mathematics.Matrix4f kTransform)
static ImageRegistrationGPU
create(ModelSimpleImage kTarget, ModelSimpleImage kMoving)
protected void
CreateBracketMesh()
protected void
CreateHistogramMesh(int iWidth, int iHeight)
protected WildMagic.LibGraphics.Rendering.ResourceIdentifier
CreateImageMesh(int iWidth, int iHeight, int iDepth)
private void
CreateImageTextures()
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
CreateRenderTarget(com.jogamp.opengl.GLAutoDrawable arg0, java.lang.String kImageName, int iWidth, int iHeight)
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer
CreateRenderTargetInit(com.jogamp.opengl.GLAutoDrawable arg0, java.lang.String kImageName, int iWidth, int iHeight)
protected void
CreateScene(com.jogamp.opengl.GLAutoDrawable arg0)
private void
CreateTransformMesh()
void
display(com.jogamp.opengl.GLAutoDrawable arg0)
void
dispose()
void
dispose(com.jogamp.opengl.GLAutoDrawable arg0)
float[]
getBracketB()
com.jogamp.opengl.awt.GLCanvas
GetCanvas()
double
getError()
void
init(com.jogamp.opengl.GLAutoDrawable arg0)
void
initImages(ModelSimpleImage kImageA, ModelSimpleImage kImageB, int iNBins)
void
initLineMin(WildMagic.LibFoundation.Mathematics.Matrix4f kToOrigin, WildMagic.LibFoundation.Mathematics.Matrix4f kFromOrigin, float rigid, float dim, double[] startPoint, double[] pt, int ptLength, double[] unitDirections, double unit_tolerance, double fMinDist, double bracketA, double functionA, double bracketB, double functionB, double bracketC, double functionC)
private void
printTarget(java.lang.String kMsg, WildMagic.LibGraphics.Rendering.Texture kTarget)
private void
ReduceDualA(double dNumSamples)
void
reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)
void
SetFrame(javax.swing.JFrame kFrame)
void
setFromOrigin(TransMatrix kFromOrigin)
void
setToOrigin(TransMatrix kToOrigin)
void
setTransform(TransMatrix kTransform)
void
setTransform(TransMatrixd kTransform)
boolean
writeImage()
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyPressed, 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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_iScreenCaptureCounter
protected static int m_iScreenCaptureCounter
-
m_akCollapse2D
protected VolumeHistogramEffect m_akCollapse2D
-
m_akCollapseColumns
protected VolumeHistogramEffect m_akCollapseColumns
-
m_akCollapseRows
protected VolumeHistogramEffect m_akCollapseRows
-
m_akImageReduceEntropy
protected ImageReduceEffect m_akImageReduceEntropy
-
m_kImageEffectDual
protected VolumeHistogramEffect m_kImageEffectDual
-
m_kImageLineMinPass2a
protected LineMinimizationEffect m_kImageLineMinPass2a
-
m_kImageLineMinDual
protected LineMinimizationEffect m_kImageLineMinDual
-
m_kCalcTransform
protected LineMinimizationEffect m_kCalcTransform
-
m_kImagePointsDual
private WildMagic.LibGraphics.SceneGraph.Polypoint m_kImagePointsDual
-
m_kHistogramPoints2D
private WildMagic.LibGraphics.SceneGraph.Polypoint m_kHistogramPoints2D
-
m_kEntropyPoints2D
private WildMagic.LibGraphics.SceneGraph.Polypoint m_kEntropyPoints2D
-
m_kBracketPoints
private WildMagic.LibGraphics.SceneGraph.Polypoint m_kBracketPoints
-
m_kTransformPoints
private WildMagic.LibGraphics.SceneGraph.Polypoint m_kTransformPoints
-
m_kHistogramOutput
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kHistogramOutput
-
m_kHistogramOutputB
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kHistogramOutputB
-
m_kEntropyOut
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kEntropyOut
-
m_kTransformOut
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kTransformOut
-
m_kBracketOut
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kBracketOut
-
m_kBracketNewOut
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer m_kBracketNewOut
-
m_kAlpha
private WildMagic.LibGraphics.Rendering.AlphaState m_kAlpha
-
m_kImageA
private ModelSimpleImage m_kImageA
-
m_kImageB
private ModelSimpleImage m_kImageB
-
m_kTarget
private ModelSimpleImage m_kTarget
-
m_kMoving
private ModelSimpleImage m_kMoving
-
m_kNameA
private java.lang.String m_kNameA
-
m_kNameB
private java.lang.String m_kNameB
-
m_kTextureA
private WildMagic.LibGraphics.Rendering.Texture m_kTextureA
-
m_kTextureB
private WildMagic.LibGraphics.Rendering.Texture m_kTextureB
-
m_dHx
private double m_dHx
-
m_dHy
private double m_dHy
-
m_dHxy
private double m_dHxy
-
m_dOverlap
private double m_dOverlap
-
m_kImageTransform
private WildMagic.LibFoundation.Mathematics.Matrix4f m_kImageTransform
-
m_kImageTransformd
private WildMagic.LibFoundation.Mathematics.Matrix4d m_kImageTransformd
-
m_kFrame
protected javax.swing.JFrame m_kFrame
-
m_fUnitTolerance
private float m_fUnitTolerance
-
m_kToOrigin
private WildMagic.LibFoundation.Mathematics.Matrix4f m_kToOrigin
-
m_kFromOrigin
private WildMagic.LibFoundation.Mathematics.Matrix4f m_kFromOrigin
-
m_kToOriginInv
private WildMagic.LibFoundation.Mathematics.Matrix4f m_kToOriginInv
-
m_kFromOriginInv
private WildMagic.LibFoundation.Mathematics.Matrix4f m_kFromOriginInv
-
m_fRigid
private float m_fRigid
-
m_fDim
private float m_fDim
-
m_afStartPoint
private float[] m_afStartPoint
-
m_afPt
private float[] m_afPt
-
m_fPtLength
private float m_fPtLength
-
m_afUnitDirections
private float[] m_afUnitDirections
-
m_fMinDist
private float m_fMinDist
-
m_afBracketB
float[] m_afBracketB
-
m_bDisposeComplete
private boolean m_bDisposeComplete
-
m_bDispose
private boolean m_bDispose
-
m_bDisplay
protected boolean m_bDisplay
-
m_bInit
protected boolean m_bInit
-
m_bCleanUp
private boolean m_bCleanUp
-
m_bStatus
private boolean m_bStatus
-
m_bCalcLineMin
private boolean m_bCalcLineMin
-
m_afBracket
private float[] m_afBracket
-
m_iRenderLoops
private int m_iRenderLoops
-
-
Constructor Detail
-
ImageRegistrationGPU
public ImageRegistrationGPU(ModelSimpleImage kTarget, ModelSimpleImage kMoving)
-
-
Method Detail
-
create
public static ImageRegistrationGPU create(ModelSimpleImage kTarget, ModelSimpleImage kMoving)
-
calcError
public void calcError(TransMatrix kTransform)
-
calcError
public void calcError(TransMatrixd kTransform)
-
calcLineMinimization
public void calcLineMinimization()
-
checkStatus
public boolean checkStatus()
-
convertTo4D
public WildMagic.LibFoundation.Mathematics.Matrix4f convertTo4D(WildMagic.LibFoundation.Mathematics.Matrix4f kTransform)
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
-
dispose
public void dispose()
- Overrides:
dispose
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable arg0)
-
getBracketB
public float[] getBracketB()
-
GetCanvas
public com.jogamp.opengl.awt.GLCanvas GetCanvas()
-
getError
public double getError()
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0)
-
initImages
public void initImages(ModelSimpleImage kImageA, ModelSimpleImage kImageB, int iNBins)
-
initLineMin
public void initLineMin(WildMagic.LibFoundation.Mathematics.Matrix4f kToOrigin, WildMagic.LibFoundation.Mathematics.Matrix4f kFromOrigin, float rigid, float dim, double[] startPoint, double[] pt, int ptLength, double[] unitDirections, double unit_tolerance, double fMinDist, double bracketA, double functionA, double bracketB, double functionB, double bracketC, double functionC)
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable arg0, int iX, int iY, int iWidth, int iHeight)
-
SetFrame
public void SetFrame(javax.swing.JFrame kFrame)
-
setFromOrigin
public void setFromOrigin(TransMatrix kFromOrigin)
-
setToOrigin
public void setToOrigin(TransMatrix kToOrigin)
-
setTransform
public void setTransform(TransMatrix kTransform)
-
setTransform
public void setTransform(TransMatrixd kTransform)
-
writeImage
public boolean writeImage()
-
CreateBracketMesh
protected void CreateBracketMesh()
-
CreateHistogramMesh
protected void CreateHistogramMesh(int iWidth, int iHeight)
-
CreateImageMesh
protected WildMagic.LibGraphics.Rendering.ResourceIdentifier CreateImageMesh(int iWidth, int iHeight, int iDepth)
-
CreateScene
protected void CreateScene(com.jogamp.opengl.GLAutoDrawable arg0)
-
calcEntropy
private void calcEntropy()
-
calcEntropy
private void calcEntropy(ModelSimpleImage kImage, double dNumSamples)
-
calcLineMin
private void calcLineMin()
-
cleanUp
private void cleanUp()
-
CreateImageTextures
private void CreateImageTextures()
-
CreateRenderTarget
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer CreateRenderTarget(com.jogamp.opengl.GLAutoDrawable arg0, java.lang.String kImageName, int iWidth, int iHeight)
-
CreateRenderTargetInit
private WildMagic.LibRenderers.OpenGLRenderer.OpenGLFrameBuffer CreateRenderTargetInit(com.jogamp.opengl.GLAutoDrawable arg0, java.lang.String kImageName, int iWidth, int iHeight)
-
CreateTransformMesh
private void CreateTransformMesh()
-
printTarget
private void printTarget(java.lang.String kMsg, WildMagic.LibGraphics.Rendering.Texture kTarget)
-
ReduceDualA
private void ReduceDualA(double dNumSamples)
-
-