Class MjCorticalAnalysis
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.surfaceview.brainflattenerview.MjCorticalAnalysis
- All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback,ViewImageUpdateInterface,ActionListener,MouseListener,MouseMotionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener
public class MjCorticalAnalysis
extends RenderViewBase
implements MouseListener, MouseMotionListener
Cortical analysis applet and viewer. This class contains the static 'main' method to launch the application. This
class is an Applet which means that it can be embedded in a browser or it can be attached to a MainFrame when
executed as an application.
- See Also:
-
Nested Class Summary
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 int[]DOCUMENT ME!private javax.vecmath.Color3f[]Colors for the picked points:.private javax.vecmath.Color4f[]DOCUMENT ME!private booleanFlag set to indicate whether curvature colors are rendered on the mesh surface.private booleanFlag set once inflation processing has been initialized.private booleanMouse events.private booleanDOCUMENT ME!private booleanTurned on when picking with the mouse is enabled:.private booleanDOCUMENT ME!private intnumber of picked points displayed.private intDOCUMENT ME!private MjCorticalMeshCortical mesh to be used in rendering scene.private javax.media.j3d.GeometryArrayDOCUMENT ME!private javax.media.j3d.GeometryArrayDOCUMENT ME!private ModelLUTDOCUMENT ME!private ModelLUTlocal reference to ModelLUT.private javax.media.j3d.BranchGroupBranchGroups for the Meshlines, for deleting and recreating the meshlines when the user changes the number of latitude and longitude lines:.private javax.media.j3d.BranchGroupDOCUMENT ME!private MouseEventDOCUMENT ME!private JPanelBrainSurfaceFlattenerDOCUMENT ME!private com.sun.j3d.utils.picking.PickCanvasDOCUMENT ME!private javax.media.j3d.Shape3DDOCUMENT ME!private javax.media.j3d.Shape3DDOCUMENT ME!private javax.media.j3d.Shape3DDOCUMENT ME!private javax.media.j3d.SwitchSwitch between displaying the Sphere and the Plane:.private javax.media.j3d.SwitchThis node contains the latitude/longitude renderings for the mesh which can be enabled/disabled.private javax.media.j3d.SwitchThis node contains the latitude/longitude renderings for the plane which can be enabled/disabled.private javax.media.j3d.BranchGroupDOCUMENT ME!private javax.media.j3d.SwitchThis node contains the latitude/longitude renderings for the sphere which can be enabled/disabled.private javax.media.j3d.BranchGroupDOCUMENT ME!private javax.media.j3d.TransformGroupCurrently selected transform that gets modified by the handler for the keyboard behavior.private javax.media.j3d.TransformGroupDOCUMENT ME!private javax.media.j3d.TransformGroupDOCUMENT ME!private javax.media.j3d.TransformGroupThis node contains all of the cortical mesh related nodes in the scene which can be manipulated as a group.private javax.media.j3d.TransformGroupThis node contains all of the plane related nodes in the scene which can be manipulated as a group.private javax.media.j3d.TransformGroupThis node contains all of the sphere related nodes in the scene which can be manipulated as a group.private javax.media.j3d.TransformGroupDOCUMENT ME!private ModelTriangleMeshGeometry for the rendering of the cortical mesh is maintained here so that the scene can be updated when the mesh is inflated.private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.private intDOCUMENT ME!Fields inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
background, bounds, boxFrame, canvas, captureFrame, captureImage, config, displayMode, IMAGE_A, IMAGE_B, imageA, imageB, LUTa, LUTb, objBehaviorBG, objBoxFrameBG, objRootBG, rotationAngle, rotationAxis, rotationControlPanel, rotationTimes, rotationTotal, sceneRootTG, sliderEvents, transRotation, transRotationMatrix, triPlanarViewBG, universe, viewPanelFields inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_iAccumulatedFrameCount, m_iFrameCount, m_iMaxTimer, m_iTimerFields 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
ConstructorsConstructorDescriptionMjCorticalAnalysis(ModelImage _imageA, ModelImage _imageB, GraphicsConfiguration _config, ViewJFrameVolumeView kParent) A simple universe is created that contains a viewing platform. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed.voidCalled on setup, when a new triangle mesh is loaded, or when the puncture triangle is selected and the "recalculate conformal" button is pressed by the user:private floatclosestPlanePointIndex(javax.vecmath.Point3f kStart, int[] aiIndex) For the plane, all vertices have z-value set to zero.private static javax.vecmath.Point3f[]combine(javax.vecmath.Point3f[] akPointA, javax.vecmath.Point3f[] akPointB) DOCUMENT ME!private static javax.media.j3d.GeometryArraycreateGeometry(javax.vecmath.Point3f[] akPoint, javax.vecmath.Color4f[] akColor, int[] aiConnect) DOCUMENT ME!private static ModelTriangleMeshcreateTriangleMesh(javax.vecmath.Point3f[] akPoint, javax.vecmath.Vector3f[] akNormal, javax.vecmath.Color4f[] akColor, int[] aiConnect) DOCUMENT ME!booleantoggle between display of mean curvature-based colors and average convexity-based colors.booleantoggle between display of mean curvature-based colors and average convexity-based colors.voidSwitch to displaying the plane:voidSwitch to displaying the sphere:voidDOCUMENT ME!voiddrawPicked(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected point, either as a sphere on the triangle mesh, or as a black triangle, depending on which picking is enabled:private voiddrawPoint(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected point as a sphere on the triangle mesh:private voiddrawTriangle(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected triangle as a black triangle, save the original color so it can be restored:protected voidfinalize()DOCUMENT ME!DOCUMENT ME!floatDOCUMENT ME!floatreturn the max mean curvature:javax.media.j3d.BranchGroupgetMesh()Display the mesh in the SurfaceRenderer:javax.media.j3d.BranchGroupDisplay the mesh lines in the SurfaceRenderer:floatDOCUMENT ME!floatreturn the min mean curvature:Gets the scene state in terms of slices visible, which slice number, etc.getTMesh()Display the mesh in the SurfaceRenderer:private static javax.vecmath.Vector3dgetTranslateToCenter(javax.media.j3d.Shape3D kShape) DOCUMENT ME!booleanperform inflation step and then render shapes using the average convexity colors.booleanReturn whether or not picking correspondence points is enabled:booleanReturns whether or not picking is enabled:booleanReturn whether or not picking the puncture triangle is enabled:voidmouseClicked(MouseEvent kEvent) DOCUMENT ME!voidmouseDragged(MouseEvent kEvent) DOCUMENT ME!voidmouseEntered(MouseEvent kEvent) DOCUMENT ME!voidmouseExited(MouseEvent kEvent) DOCUMENT ME!voidmouseMoved(MouseEvent kEvent) DOCUMENT ME!voidmousePressed(MouseEvent kMouseEvent) DOCUMENT ME!voidmouseReleased(MouseEvent kEvent) DOCUMENT ME!voidRemove all points drawn on the mesh, sphere, and plane:private voidResets the previously picked triangle to it's orginal color:voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.private static voidsetColors(float fCMin, float fCMax, float[] afCArray, int iVQuantity, javax.vecmath.Color4f[] akColor) DOCUMENT ME!private voidUpdate the colormap based on the LUT:voidUsed by the JPanelMouse the redisplay the recorded actions.voidsetLUTConvexity(ModelLUT kLUT) DOCUMENT ME!voidsetLUTCurvature(ModelLUT kLUT) Update the colormap based on the LUT:voidsetRGBTA.voidsetRGBTB.voidsetSlice(int slice) setSlice.voidsetTimeSlice(int tSlice) setTimeSlice.voidsetup(ModelTriangleMesh kTriangleMesh) Perform all initialization prior to executing.voidsetupLatLon(int iNumLat, int iNumLon) Called when the mesh is created, or when the number of latitude or longitude lines is changed by the user.private voidSets up a direction lightsource for the scene.voidstateChanged.voidToggle between displaying the latitude and longitude lines:voidEnables picking with the mouse and drawing the curve on the mesh.voidEnables picking with the mouse and drawing the curve on the mesh.voidtransformChanged(int type, javax.media.j3d.Transform3D transform) transformChanged.booleanupdateImageExtents.booleanupdateImages.booleanupdateImages(boolean flag) updateImages.booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode) updateImages.Methods inherited from class gov.nih.mipav.view.renderer.J3D.RenderViewBase
autoCapture, calcImageNormals, createBoxFrame, disableCamera, getBehaviorGroup, getBound, getBranchGroup, getCanvas, getImageA, getImageB, getNormals, getRGBTA, getRGBTB, getSceneRootTG, getSliderEvents, getTriPlanarViewBG, getUniverse, recordMouse, resetAxisX, resetAxisY, resetImage, rotateImage, setBackgroundColor, setBoxColor, setRotationAngle, setRotationAxis, writeImage, writeImageAutoMethods inherited from class gov.nih.mipav.view.renderer.J3D.VolumeCanvas3D
GetTestFrameRate, MeasureTime, paint, postSwap, ResetTime, SetTestFrameRate, supportsTexture3D, update, UpdateFrameCountMethods 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, setEnabled, 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:
-
m_aiTriIndex
private int[] m_aiTriIndexDOCUMENT ME! -
m_akPickColors
private javax.vecmath.Color3f[] m_akPickColorsColors for the picked points:. -
m_akTriColors
private javax.vecmath.Color4f[] m_akTriColorsDOCUMENT ME! -
m_bCurvatureColors
private boolean m_bCurvatureColorsFlag set to indicate whether curvature colors are rendered on the mesh surface. If not, then average convexity colors are rendered. -
m_bInflationInitialized
private boolean m_bInflationInitializedFlag set once inflation processing has been initialized. -
m_bMousePressed
private boolean m_bMousePressedMouse events. Setting mousePressed and mouseReleased explicitly when the mouse events are received has deals with getting multiply mouse event notifications for the same mouse press. -
m_bMouseReleased
private boolean m_bMouseReleasedDOCUMENT ME! -
m_bPickCorrespondenceEnabled
private boolean m_bPickCorrespondenceEnabledTurned on when picking with the mouse is enabled:. -
m_bPickPunctureEnabled
private boolean m_bPickPunctureEnabledDOCUMENT ME! -
m_iNumPicked
private int m_iNumPickednumber of picked points displayed. -
m_iRunningNumPicked
private int m_iRunningNumPickedDOCUMENT ME! -
m_kCortical
Cortical mesh to be used in rendering scene. -
m_kGeometryArrayPlane
private javax.media.j3d.GeometryArray m_kGeometryArrayPlaneDOCUMENT ME! -
m_kGeometryArraySphere
private javax.media.j3d.GeometryArray m_kGeometryArraySphereDOCUMENT ME! -
m_kLUTConvexity
DOCUMENT ME! -
m_kLUTCurvature
local reference to ModelLUT. -
m_kMeshBranchRoot
private javax.media.j3d.BranchGroup m_kMeshBranchRootBranchGroups for the Meshlines, for deleting and recreating the meshlines when the user changes the number of latitude and longitude lines:. -
m_kMeshLinesBranchRoot
private javax.media.j3d.BranchGroup m_kMeshLinesBranchRootDOCUMENT ME! -
m_kMouseEvent
DOCUMENT ME! -
m_kPanel
DOCUMENT ME! -
m_kPickCanvas
private com.sun.j3d.utils.picking.PickCanvas m_kPickCanvasDOCUMENT ME! -
m_kShapeMesh
private javax.media.j3d.Shape3D m_kShapeMeshDOCUMENT ME! -
m_kShapePlane
private javax.media.j3d.Shape3D m_kShapePlaneDOCUMENT ME! -
m_kShapeSphere
private javax.media.j3d.Shape3D m_kShapeSphereDOCUMENT ME! -
m_kSwitchDisplay
private javax.media.j3d.Switch m_kSwitchDisplaySwitch between displaying the Sphere and the Plane:. -
m_kSwitchLinesMesh
private javax.media.j3d.Switch m_kSwitchLinesMeshThis node contains the latitude/longitude renderings for the mesh which can be enabled/disabled. -
m_kSwitchLinesPlane
private javax.media.j3d.Switch m_kSwitchLinesPlaneThis node contains the latitude/longitude renderings for the plane which can be enabled/disabled. -
m_kSwitchLinesPlaneBranch
private javax.media.j3d.BranchGroup m_kSwitchLinesPlaneBranchDOCUMENT ME! -
m_kSwitchLinesSphere
private javax.media.j3d.Switch m_kSwitchLinesSphereThis node contains the latitude/longitude renderings for the sphere which can be enabled/disabled. -
m_kSwitchLinesSphereBranch
private javax.media.j3d.BranchGroup m_kSwitchLinesSphereBranchDOCUMENT ME! -
m_kTransformGroupActive
private javax.media.j3d.TransformGroup m_kTransformGroupActiveCurrently selected transform that gets modified by the handler for the keyboard behavior. -
m_kTransformGroupMesh
private javax.media.j3d.TransformGroup m_kTransformGroupMeshDOCUMENT ME! -
m_kTransformGroupPlane
private javax.media.j3d.TransformGroup m_kTransformGroupPlaneDOCUMENT ME! -
m_kTransformGroupPoseMesh
private javax.media.j3d.TransformGroup m_kTransformGroupPoseMeshThis node contains all of the cortical mesh related nodes in the scene which can be manipulated as a group. -
m_kTransformGroupPosePlane
private javax.media.j3d.TransformGroup m_kTransformGroupPosePlaneThis node contains all of the plane related nodes in the scene which can be manipulated as a group. -
m_kTransformGroupPoseSphere
private javax.media.j3d.TransformGroup m_kTransformGroupPoseSphereThis node contains all of the sphere related nodes in the scene which can be manipulated as a group. -
m_kTransformGroupSphere
private javax.media.j3d.TransformGroup m_kTransformGroupSphereDOCUMENT ME! -
m_kTriangleMesh
Geometry for the rendering of the cortical mesh is maintained here so that the scene can be updated when the mesh is inflated. -
MAX_POINTS
private int MAX_POINTSDOCUMENT ME! -
MESH
private int MESHDOCUMENT ME! -
PLANE
private int PLANEDOCUMENT ME! -
SPHERE
private int SPHEREDOCUMENT ME!
-
-
Constructor Details
-
MjCorticalAnalysis
public MjCorticalAnalysis(ModelImage _imageA, ModelImage _imageB, GraphicsConfiguration _config, ViewJFrameVolumeView kParent) A simple universe is created that contains a viewing platform. A canvas is created and attached to the simple universe and is added to this instance The canvas is used for the 3D rendering. An initially empty scene graph for the application is created and assigned to the universe.- Parameters:
_imageA- DOCUMENT ME!_imageB- DOCUMENT ME!_config- DOCUMENT ME!kParent- DOCUMENT ME!
-
-
Method Details
-
actionPerformed
actionPerformed.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- ActionEvent
-
calculateConformal
public void calculateConformal()Called on setup, when a new triangle mesh is loaded, or when the puncture triangle is selected and the "recalculate conformal" button is pressed by the user: -
displayConvexityColors
public boolean displayConvexityColors()toggle between display of mean curvature-based colors and average convexity-based colors.- Returns:
- DOCUMENT ME!
-
displayCurvatureColors
public boolean displayCurvatureColors()toggle between display of mean curvature-based colors and average convexity-based colors.- Returns:
- DOCUMENT ME!
-
displayPlane
public void displayPlane()Switch to displaying the plane: -
displaySphere
public void displaySphere()Switch to displaying the sphere: -
disposeLocal
public void disposeLocal()DOCUMENT ME!- Overrides:
disposeLocalin classRenderViewBase
-
drawPicked
public void drawPicked(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected point, either as a sphere on the triangle mesh, or as a black triangle, depending on which picking is enabled:- Parameters:
kStart- DOCUMENT ME!aiIndex- DOCUMENT ME!iWhich- DOCUMENT ME!
-
getMainPanel
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMaxAverageConvexity
public float getMaxAverageConvexity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMaxCurvature
public float getMaxCurvature()return the max mean curvature:- Returns:
- DOCUMENT ME!
-
getMesh
public javax.media.j3d.BranchGroup getMesh()Display the mesh in the SurfaceRenderer:- Returns:
- a Branchgroup containing a copy of the ModelTriangleMesh
-
getMeshLines
public javax.media.j3d.BranchGroup getMeshLines()Display the mesh lines in the SurfaceRenderer:- Returns:
- a BranchGroup containing a copy of the TriangleMesh Lat/Lon Lines
-
getMinAverageConvexity
public float getMinAverageConvexity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMinCurvature
public float getMinCurvature()return the min mean curvature:- Returns:
- DOCUMENT ME!
-
getSceneState
Gets the scene state in terms of slices visible, which slice number, etc.- Specified by:
getSceneStatein classRenderViewBase- Returns:
- A private object extension specific to the class that extends this one.
-
getTMesh
Display the mesh in the SurfaceRenderer:- Returns:
- DOCUMENT ME!
-
inflation
public boolean inflation()perform inflation step and then render shapes using the average convexity colors.- Returns:
- DOCUMENT ME!
-
isCorrespondencePickEnabled
public boolean isCorrespondencePickEnabled()Return whether or not picking correspondence points is enabled:- Returns:
- DOCUMENT ME!
-
isPickEnabled
public boolean isPickEnabled()Returns whether or not picking is enabled:- Returns:
- DOCUMENT ME!
-
isPuncturePickEnabled
public boolean isPuncturePickEnabled()Return whether or not picking the puncture triangle is enabled:- Returns:
- DOCUMENT ME!
-
mouseClicked
DOCUMENT ME!- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse clicked
-
mouseDragged
DOCUMENT ME!- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
kEvent- the mouse event generated by a mouse drag
-
mouseEntered
DOCUMENT ME!- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse entered
-
mouseExited
DOCUMENT ME!- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse exit
-
mouseMoved
DOCUMENT ME!- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
kEvent- the event generated by a mouse movement
-
mousePressed
DOCUMENT ME!- Specified by:
mousePressedin interfaceMouseListener- Parameters:
kMouseEvent- the mouse event generated by a mouse press
-
mouseReleased
DOCUMENT ME!- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
kEvent- the mouse event generated by a mouse release
-
removePoints
public void removePoints()Remove all points drawn on the mesh, sphere, and plane: -
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.- Specified by:
setAlphaBlendin classRenderViewBase- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed and (1-percentage) of Image B to be displayed
-
setGUI
Used by the JPanelMouse the redisplay the recorded actions.- Specified by:
setGUIin classRenderViewBase- Parameters:
scene- Object
-
setLUTConvexity
DOCUMENT ME!- Parameters:
kLUT- DOCUMENT ME!
-
setLUTCurvature
Update the colormap based on the LUT:- Parameters:
kLUT- DOCUMENT ME!
-
setRGBTA
setRGBTA.- Specified by:
setRGBTAin classRenderViewBase- Parameters:
RGBT- ModelRGB
-
setRGBTB
setRGBTB.- Specified by:
setRGBTBin classRenderViewBase- Parameters:
RGBT- ModelRGB
-
setSlice
public void setSlice(int slice) setSlice.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- int
-
setTimeSlice
public void setTimeSlice(int tSlice) setTimeSlice.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
tSlice- int
-
setup
Perform all initialization prior to executing. Loads the sample mesh surface and sets up the rendering of the scene.- Parameters:
kTriangleMesh- DOCUMENT ME!
-
setupLatLon
public void setupLatLon(int iNumLat, int iNumLon) Called when the mesh is created, or when the number of latitude or longitude lines is changed by the user. When the user changes the number of latitude or longitude lines, the meshes are removed from the scene and recreated.- Parameters:
iNumLat- DOCUMENT ME!iNumLon- DOCUMENT ME!
-
stateChanged
stateChanged.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- ChangeEvent
-
toggleLatLonLines
public void toggleLatLonLines()Toggle between displaying the latitude and longitude lines: -
togglePickCorrespondence
public void togglePickCorrespondence()Enables picking with the mouse and drawing the curve on the mesh. -
togglePickPuncture
public void togglePickPuncture()Enables picking with the mouse and drawing the curve on the mesh. -
transformChanged
public void transformChanged(int type, javax.media.j3d.Transform3D transform) transformChanged.- Specified by:
transformChangedin interfacecom.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback- Parameters:
type- inttransform- Transform3D
-
updateImageExtents
public boolean updateImageExtents()updateImageExtents.- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Returns:
- boolean
-
updateImages
public boolean updateImages()updateImages.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean
-
updateImages
public boolean updateImages(boolean flag) updateImages.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
flag- boolean- Returns:
- boolean
-
updateImages
updateImages.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- ModelLUTLUTb- ModelLUTflag- booleaninterpMode- int- Returns:
- boolean
-
finalize
DOCUMENT ME! -
combine
private static javax.vecmath.Point3f[] combine(javax.vecmath.Point3f[] akPointA, javax.vecmath.Point3f[] akPointB) DOCUMENT ME!- Parameters:
akPointA- DOCUMENT ME!akPointB- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createGeometry
private static javax.media.j3d.GeometryArray createGeometry(javax.vecmath.Point3f[] akPoint, javax.vecmath.Color4f[] akColor, int[] aiConnect) DOCUMENT ME!- Parameters:
akPoint- DOCUMENT ME!akColor- DOCUMENT ME!aiConnect- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createTriangleMesh
private static ModelTriangleMesh createTriangleMesh(javax.vecmath.Point3f[] akPoint, javax.vecmath.Vector3f[] akNormal, javax.vecmath.Color4f[] akColor, int[] aiConnect) DOCUMENT ME!- Parameters:
akPoint- DOCUMENT ME!akNormal- DOCUMENT ME!akColor- DOCUMENT ME!aiConnect- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getTranslateToCenter
private static javax.vecmath.Vector3d getTranslateToCenter(javax.media.j3d.Shape3D kShape) DOCUMENT ME!- Parameters:
kShape- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
setColors
private static void setColors(float fCMin, float fCMax, float[] afCArray, int iVQuantity, javax.vecmath.Color4f[] akColor) DOCUMENT ME!- Parameters:
fCMin- DOCUMENT ME!fCMax- DOCUMENT ME!afCArray- DOCUMENT ME!iVQuantity- DOCUMENT ME!akColor- DOCUMENT ME!
-
closestPlanePointIndex
private float closestPlanePointIndex(javax.vecmath.Point3f kStart, int[] aiIndex) For the plane, all vertices have z-value set to zero. Because the mesh is closed, even for the plane, the edge triangles wrap around the back of the mesh, and are co-planar with the forward-facing triangles (the ones that display the data) -- when picking is done, the pickClosest sometimes returns the back-facing triangle. This function returns the correct, visible triangle for the plane:- Parameters:
kStart- DOCUMENT ME!aiIndex- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
drawPoint
private void drawPoint(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected point as a sphere on the triangle mesh:- Parameters:
kStart- DOCUMENT ME!aiIndex- DOCUMENT ME!iWhich- DOCUMENT ME!
-
drawTriangle
private void drawTriangle(javax.vecmath.Point3f kStart, int[] aiIndex, int iWhich) Draw the user-selected triangle as a black triangle, save the original color so it can be restored:- Parameters:
kStart- DOCUMENT ME!aiIndex- DOCUMENT ME!iWhich- DOCUMENT ME!
-
restoreTriColor
private void restoreTriColor()Resets the previously picked triangle to it's orginal color: -
setColorsLUT
private void setColorsLUT()Update the colormap based on the LUT: -
setupLight
private void setupLight()Sets up a direction lightsource for the scene.
-