Class SurfaceView

  • All Implemented Interfaces:
    com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback, ViewImageUpdateInterface, java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

    public class SurfaceView
    extends SurfaceRender
    Frame that holds the surface renderer. This frame is only possible to activate if a three dimensional image is loaded. The image shows up in the frame as the three planes, with an axial view, a coronal view, and a sagittal view. The user can slide these planes up and down and can turn them on and off. The user can also load in surfaces created from the original image. These 3D surfaces will appear in the proper place within the three image planes. There are many options for viewing the surfaces. Additionally, the user can change the view mode, so that the mouse causes the view to "fly". The user can then record the different mouse actions and play them back.
    See Also:
    ViewJComponentSurfaceImage, JDialogSurface, JDialogView, JDialogMouseRecorder, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Canvas

        java.awt.Canvas.AccessibleAWTCanvas
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      Calls various methods depending on the action.
      void addCubicControl()
      Attach cubic control branch group.
      void autoCapture()
      Overrides the parent autoCapture method.
      private com.sun.j3d.utils.geometry.Box buildCubicBox()
      Create the rotation control cubic box.
      private void buildCubicBranch()
      Build the cubic branch under the objRootBG.
      void cleanMouseRecorder()
      Clean mouse recorder for any existing event items.
      void close()
      Closes the image.
      private void configureSliceFrame()
      Constructs main frame structures for 3 image planes.
      void configureVolumeFrame()
      Constructs main frame structures for 3 image planes.
      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.
      void cropClipVolume()
      Crop the region of the clipped volume.
      void detachVolRender()
      Detach volume render branch group.
      void disableClipping()
      Diable all the six clipping planes at a time.
      void dispatchSavedEvent​(java.util.EventObject event)
      Dispatches event to appropriate object.
      void disposeLocal​(boolean flag)
      Sets all variables to null, disposes, and garbage collects.
      void drawRFAPoint​(javax.vecmath.Point3f kPoint)
      Called from the parent class when the Probe Entry Point is selected in the PlaneRender object.
      void enableEntryPoint​(boolean flag)
      Set entry point rotation flag.
      void enableObjBehavior​(boolean flag)
      Enable objBehavior branch group.
      protected void finalize()
      Calls disposeLocal.
      private void generateRFACoordMaps()
      Generates the texture coord map vectors for the three orthogonal slices.
      private javax.vecmath.Vector4f generateRFACoordMaps​(int orientation, int texCoord)
      create texture coordmaps for the texture-mapped planes displaying the triSliceImages.
      private void getBoxSliceInScreen​(javax.vecmath.Vector3f[] screenBoxPoints, int[] boxSliceConstants)
      sets up the values for the ViewJComponentBoxSlice array.
      JPanelCamera getCameraControl()
      Get the rotation control dialog box.
      JPanelClip getClipDialog()
      Return clipPanel from parent frame.
      JPanelDisplay getDisplayDialog()
      Return the diaplay dialog.
      boolean getDisplayMode3D()
      Return the current volume display mode.
      JPanelGeodesic getGeodesicPanel()
      Get the geodesic control panel.
      ModelImage getImageA()
      Accessor that returns the reference to image A.
      ModelImage getImageB()
      Accessor that returns the reference to image B.
      JPanelMouse getMouseDialog()
      Return mousePanel from parent frame.
      int getMouseMode()
      Gets the mouse pointer mode - standard or fly - from the view dialog.
      javax.media.j3d.BranchGroup getObjPlane_BG​(int orientation)
      Gets the objXYPlaneBG branch group.
      double getOriginalScreenScale()
      Return the original ScreenScale for orthographic projection:
      ViewJFrameVolumeView getParentFrame()
      Return the parent frame.
      JPanelProbe getProbeDialog()
      Return probePanel from parent frame.
      float[] getResolutions()
      Returns the ModelImage resolutions.
      java.lang.Object getSceneState()
      Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.
      ModelImage getSegmentationImage()
      Return the segmentation region map image which contains info on where the vascualture, etc are located.
      JPanelSlices getSlicePanel()
      return the current active slicePanel interface.
      JPanelSurface getSurfaceDialog()
      Return surfacePanel from parent frame.
      JPanelSurfaceTexture getSurfaceTexture()
      Returns the surface texture panel interface.
      javax.swing.JPanel getSurfaceTexturePanel()
      Returns the surface texture panel mainPanel interface.
      JPanelView getViewDialog()
      Return the viewPanel from parent frame.
      JPanelVolumeOpacity getVolOpacityPanel()
      Return volume opacity control Dialog from parent frame.
      javax.media.j3d.BranchGroup getVolRenderBG()
      Return volume render Branch Group.
      javax.media.j3d.OrderedGroup getVolRenderOG()
      Return volume render Order Group.
      void hideBoxFrame()
      Makes the box frame invisible.
      void invokeClipping()
      Enable the six clipping planes at a time.
      void ModelToScreen​(javax.vecmath.Vector3f model, javax.vecmath.Vector3f screen)
      Translate from Model coordinates to normalized plane coordinates:
      void reConfigureVolumeFrame()
      Constructs main frame structures for 3 image planes.
      void removeCubicControl()
      Detach cubic control branch group.
      void resetAxisX()
      Overrides the parent resetImage method.
      void resetAxisY()
      Overrides the parent resetImage method.
      void resetImage()
      Overrides the parent resetImage method.
      void rotateImage()
      Overrides the rotateImage to rotate the surface volume.
      void saveCropVolume()
      Save crop region with the clipped volume.
      private void ScreenToModel​(javax.vecmath.Vector3f screen, javax.vecmath.Vector3f model)
      Translate from normalized plane coordinates to Model coordinates:
      void setAlphaBlend​(int value)
      Sets the alpha blending of parameter for two image displays.
      void setCenter​(javax.vecmath.Vector3f center)
      Sets the values for JPanelSlices, based on the positions in the PlaneRender class for the AXIAL, CORONAL, and SAGITTAL views.
      void setCompositeMode()
      Set the texture renderer to render in composite mode.
      void setDisplayMode3D​(boolean flag)
      Hack.
      void setGUI​(java.lang.Object scene)
      Sets the GUI components to their proper state before the action is dispatched from the player.
      void setLightingMode()
      Set the texture render to render in lighting mode.
      void setLUTa​(ModelLUT LUT)
      Accessor that sets the LUT for image A.
      void setLUTb​(ModelLUT LUT)
      Accessor that sets the LUT for image B.
      void setMaterialShininess​(float value)
      Set the texture material shininess value.
      void setMouseMode​(int mode)
      Sets the mouse pointer mode - standard or fly - in the view dialog.
      void setMouseRotateEnable​(boolean bEnable)
      Allow disabling or enabling mouse rotation:
      void setParallelRotation​(boolean flag)
      Set the parallel rotation flag from the viewJFrameVolumeView.
      void setProbeTG​(javax.media.j3d.Transform3D kTransform, boolean bTwist)
      Sets the Transform3D for the slices based on the Probe Transform.
      void setRayBasedRender​(VolumeRenderer _rayBasedRender)
      Set the reference to ray based renderer, raycast renderer or shear warp renderer.
      void setRenderPerspective​(boolean bEnable)
      Enable perspective projection rendering; otherwise use orthographic projection.
      void setRGBTA​(ModelRGB RGBT)
      Sets the RGB table for image A.
      void setRGBTB​(ModelRGB RGBT)
      Sets the RGB table for image B.
      void setSegmentationImage​(ModelImage img)
      Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).
      void setSlice​(int slice)
      Does nothing but must instantiate for this to implements ViewImageUpdateInterface.
      void setSliceColor​(java.awt.Color color, int orientation)
      Sets the color of the x slice frame.
      void setTimeSlice​(int slice)
      Sets the time slice to be displayed and changes the image planes displayed.
      private void setupEye()
      Set up the center point of the red line boxframe.
      void setVolumeDisplayMode​(boolean volDisplayMode)
      Accessor that sets the volumeDisplayMode flag.
      void showBoxFrame()
      Makes the box frame visible.
      void stateChanged​(javax.swing.event.ChangeEvent e)
      Sets how the image plane should be displayed depending on value of slider.
      void switchToSliceView​(boolean firstTime)
      Perform some actions required when switching to the slice renderer.
      void switchToVolView​(boolean firstTime)
      Perform some actions required when switching to the volume renderer.
      private void transformBoxSlices​(javax.media.j3d.Transform3D kTransform)
      transform the points used to render the triSliceImages textures.
      void transformChanged​(int type, javax.media.j3d.Transform3D transform)
      Tells the mouse dialog that the transform has changed.
      void transformUpdate​(int type, javax.media.j3d.Transform3D transform)
      The raybased renderer invokes this method when a mouse release event occurs.
      void undoCropVolume()
      Undo crop region with the clipped volume.
      void updateCubicTransform​(javax.media.j3d.Transform3D transform)
      Update the transform3D for the cubic.
      void updateData()
      Called when the underlying data has changed, due to sculpting.
      boolean updateImageExtents()
      This methods calls the componentImage's REPAINT method to redraw the screen.
      void updateImageFromRotation()
      Build a image with the current rotational transformation matrix.
      boolean updateImages()
      This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.
      boolean updateImages​(boolean flag)
      This methods calls the componentImage's update method to redraw the screen.
      boolean updateImages​(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode)
      This methods calls the componentImage's update method to redraw the screen.
      void updateLighting()
      This method is normally called by JPanelLights when a light bulb property changes.
      void updateParent()  
      void updateProbe​(boolean forceShow, boolean bInterpolate, boolean bReset)
      Updates the slice textures based on the Probe position and rotation angle.
      void updateProbePos()
      Not used now.
      void updateRaycastRender()
      Update the raycast based renderer.
      void updateShininess​(float value)
      Update the shininess from the JPanelLights.
      private void updateTextureVolumeRender()
      Determine the current viewing transformation and pass it to the texture volume renderer so that it can update itself.
      void updateTransform​(javax.media.j3d.Transform3D transform)
      Tells the mouse dialog that the transform has changed.
      private void updateViewScreenScale​(javax.media.j3d.Transform3D kTransform)
      This function calculates the scale factor for zooming in parallel projection.
      boolean updateVolume​(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow)
      This methods calls the componentImage's update method to redraw the screen.
      int whichTissue​(float x, float y, float z)
      Check the given voxel belong to which segmentation.
      • Methods inherited from class javax.media.j3d.Canvas3D

        addNotify, getBounds, getBounds, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getHeight, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocation, getLocation, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getSize, getSize, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, getWidth, getX, getY, isOffScreen, isRendererRunning, isShadingLanguageSupported, postRender, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
      • Methods inherited from class java.awt.Canvas

        createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, 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
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • ARTERIAL_SEG

        public static final int ARTERIAL_SEG
        Value which indicates a voxel that is part of the arterial vasculature tree.
        See Also:
        Constant Field Values
      • VEINOUS_SEG

        public static final int VEINOUS_SEG
        Value which indicates a voxel in the segmenation image that is part of the veinous vasculature tree.
        See Also:
        Constant Field Values
      • VASCULATURE_SEG

        public static final int VASCULATURE_SEG
        Value which indicates a voxel in the segmenation image that is part of the vasculature (arterial or veinous).
        See Also:
        Constant Field Values
      • TUMOR_SEG

        public static final int TUMOR_SEG
        Value which indicates a voxel in the segmenation image that is part of the tumor.
        See Also:
        Constant Field Values
      • BONE_SEG

        public static final int BONE_SEG
        Value which indicates a bone in the image.
        See Also:
        Constant Field Values
      • ENTRY_POINT

        public static final int ENTRY_POINT
        Value which indicates the probe entry point color.
        See Also:
        Constant Field Values
      • boxPanel

        private JPanelDisplay boxPanel
        Dialog to turn bounding box of surface renderer on and off, and to change the color of the frame.
      • boxSlices

        private final ViewJComponentBoxSlice[] boxSlices
        The frame around the AXIAL, CORONAL, SAGITTAL slices:
      • boxSliceVertices

        private javax.vecmath.Vector3f[][] boxSliceVertices
        The transformed boxSlices frames used to sample the volume data along diagonal slices:
      • bufferFactor

        private int bufferFactor
        Buffer factor, 1 usually, 4 for color images.
      • clipPanel

        private JPanelClip clipPanel
        Dialog to turn the clipping palne box on and off.
      • cubicBehaviorBG

        private javax.media.j3d.BranchGroup cubicBehaviorBG
        The cubic roational behavior branch group.
      • cubicBG

        private javax.media.j3d.BranchGroup cubicBG
        Cubic branch group.
      • cubicRotate

        private com.sun.j3d.utils.behaviors.mouse.MouseRotate cubicRotate
        Cubic mouse rotation behavior.
      • cubicTG

        private javax.media.j3d.TransformGroup cubicTG
        Cubic transform group.
      • currentTransform

        private javax.media.j3d.Transform3D currentTransform
        Current transform matrix.
      • currentTransformType

        private int currentTransformType
        Current transform changes type.
      • first6ClipPlane

        private boolean first6ClipPlane
        flag indicate the first time 6 clipping plane branch switch.
      • firstClipArbi

        private boolean firstClipArbi
        flag indicate the first time arbitrary clipping plane branch switch.
      • imageA

        private ModelImage imageA
        Current image A.
      • imageB

        private ModelImage imageB
        Current image B.
      • isEntryPoint

        private boolean isEntryPoint
        Flag indicates that probe rotate around the entry point or not.
      • m_bRenderModeLighting

        private boolean m_bRenderModeLighting
        Flag set when texture volume is being rendered using lights.
      • m_dOriginalScreenScale

        private double m_dOriginalScreenScale
        Zoomfactor, zooming in screen scale space, and is relative to original position, this stores that original position:.
      • m_kObjBoxSliceProbe_TG

        private final javax.media.j3d.TransformGroup[] m_kObjBoxSliceProbe_TG
        TransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice BOXES:
      • m_kObjPlaneProbe_TG

        private final javax.media.j3d.TransformGroup[] m_kObjPlaneProbe_TG
        TransformGroup[] used to rotate the AXIAL, CORONAL, SAGITTAL slice PLANES:
      • m_kProbeTransform

        private javax.media.j3d.Transform3D m_kProbeTransform
        The Transform3D used to position the planes based on the Probe position and angle. The planes are rotates about the intersection between the probe and the plane, which may or may not be in the center of the plane. This transform allows non-origin rotations by conactenating the translation to the origin, rotation, and translation matricies into one transform, which is used to set the Transforms for the TransformGroups above and also to sample the ModelImage data on the diagonal slice:
      • m_kSoftwareLightSet

        private SoftwareLightSet m_kSoftwareLightSet
        Used to compute software lighting of composite texture volume.
      • m_kSoftwareMaterial

        private SoftwareMaterial m_kSoftwareMaterial
        DOCUMENT ME!
      • mousePanel

        private JPanelMouse mousePanel
        Dialog for recording and playing back mouse events.
      • mouseRotateBehavior

        private MouseRotateExt mouseRotateBehavior
        Mouse Rotate behavior.
      • mouseTranslateBehavior

        private com.sun.j3d.utils.behaviors.mouse.MouseTranslate mouseTranslateBehavior
        Mouse Translate behavior.
      • mouseZoomBehavior

        private com.sun.j3d.utils.behaviors.mouse.MouseZoom mouseZoomBehavior
        Mouse Zoom behavior.
      • myEyePoint

        private final javax.vecmath.Point3d myEyePoint
        Initial center viewing point of the image.
      • objTransSlices_TG

        private final javax.media.j3d.TransformGroup[] objTransSlices_TG
        Group dictating how the XY plane is translated.
      • objPlane_BG

        private final javax.media.j3d.BranchGroup[] objPlane_BG
        BranchGroup[] containing the image planes.
      • parallelRotation

        private boolean parallelRotation
        Parallel rotation flag.
      • parallelScaleT3D

        private javax.media.j3d.Transform3D parallelScaleT3D
        Transformation matrix.
      • parent

        private ViewJFrameBase parent
        Controls for the image. ViewJFrameVolumeView
      • probePanel

        private JPanelProbe probePanel
        Dialog for loading and displaying probes.
      • resols

        private float[] resols
        Resolutions of image A.
      • rotationCount

        private int rotationCount
        fix one bug from threading.
      • segmentationImage

        private ModelImage segmentationImage
        Image with areas marked with values indicating that they are special tissue types (vessels, etc).
      • slicePanel

        private JPanelSlices slicePanel
        Dialog to turn the slices control box on and off.
      • surfacePanel

        private JPanelSurface surfacePanel
        Dialog for loading and displaying surfaces.
      • surfaceTexturePanel

        private JPanelSurfaceTexture surfaceTexturePanel
        Panel for displaying the SurfaceTexture interface:
      • switchGroup

        private javax.media.j3d.Switch switchGroup
        Tri planar view and the 3D texture volume view switch group.
      • m_kRFACoordMaps

        javax.vecmath.Vector4f[][] m_kRFACoordMaps
        Texture mapping for the RFA probe rotation:
      • transformCubic

        private javax.media.j3d.Transform3D transformCubic
        Cubic tansform3D.
      • transformNode3d

        private javax.media.j3d.Transform3D transformNode3d
        Setup the initial position of the image, added to ScenerootTG transform group.
      • view

        private javax.media.j3d.View view
        View object in rendering a three dimensional scene from one viewpoint.
      • volBG

        private javax.media.j3d.BranchGroup volBG
        Volume branch group.
      • volRenderBG

        private javax.media.j3d.BranchGroup volRenderBG
        Volume render branch group.
      • volRenderOG

        private javax.media.j3d.OrderedGroup volRenderOG
        Volume render order group, specify the rendering order.
      • volumeDisplayMode3D

        private boolean volumeDisplayMode3D
        If true display 3D volume as a 3D texture map or 2D array of texture maps. If false display 3 orthogonal image planes.
      • xBox

        private float xBox
        Numbers dicatating the sizes of the planes based on the extents and resolutions of the image.
      • yBox

        private float yBox
        Numbers dicatating the sizes of the planes based on the extents and resolutions of the image.
      • zBox

        private float zBox
        Numbers dicatating the sizes of the planes based on the extents and resolutions of the image.
      • maxBox

        private float maxBox
        Numbers dicatating the sizes of the planes based on the extents and resolutions of the image.
      • xDim

        private int xDim
        Dimensions of image A.
      • yDim

        private int yDim
        Dimensions of image A.
      • zDim

        private int zDim
        Dimensions of image A.
      • tDim

        private int tDim
        Dimensions of image A.
    • Constructor Detail

      • SurfaceView

        public SurfaceView​(ModelImage _imageA,
                           ModelImage _imageB,
                           java.awt.GraphicsConfiguration _config)
        Constructor called by the VirtualEndoscopyView. Used for instantiation.
        Parameters:
        _imageA - ModelImage imageA
        _imageB - ModelImage imageB always null
        _config - GraphicsConfiguration graphics configuration
      • SurfaceView

        public SurfaceView​(ModelImage _imageA,
                           ModelLUT _LUTa,
                           ModelImage _imageB,
                           ModelLUT _LUTb,
                           ViewJFrameBase _parent,
                           java.awt.GraphicsConfiguration _config,
                           ViewJProgressBar _pBar)
        Makes a frame and puts the three image planes into it. Creates the scene graph which dictates the behavior of the image planes and surfaces. Initializes the surface dialog and the mouse recorder dialog, so that this original view is saved. When the user opens these dialogs, they have already been created; they are just set to visible.
        Parameters:
        _imageA - First image to display, cannot be null.
        _LUTa - LUT of the imageA (if null grayscale LUT is constructed).
        _imageB - Second loaded image, may be null.
        _LUTb - LUT of the imageB, may be null.
        _parent - Frame base reference.
        _config - configuration reference.
        _pBar - progress bar
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        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
        • Exit - sets variables to null and disposes of this frame
        • X, Y, Z checkboxes - toggles the appropriate image planes on or off
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class SurfaceRender
        Parameters:
        event - Event that triggered function.
      • autoCapture

        public void autoCapture()
        Overrides the parent autoCapture method. Camera use this method to take snapshot automatically.
        Overrides:
        autoCapture in class SurfaceRender
      • cleanMouseRecorder

        public void cleanMouseRecorder()
        Clean mouse recorder for any existing event items.
        Overrides:
        cleanMouseRecorder in class SurfaceRender
      • configureVolumeFrame

        public void configureVolumeFrame()
        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.
        Overrides:
        configureVolumeFrame in class SurfaceRender
      • cropClipVolume

        public void cropClipVolume()
        Crop the region of the clipped volume.
        Overrides:
        cropClipVolume in class SurfaceRender
      • disableClipping

        public void disableClipping()
        Diable all the six clipping planes at a time.
        Overrides:
        disableClipping in class SurfaceRender
      • dispatchSavedEvent

        public void dispatchSavedEvent​(java.util.EventObject event)
        Dispatches event to appropriate object.
        Overrides:
        dispatchSavedEvent in class SurfaceRender
        Parameters:
        event - Event to dispatch.
      • disposeLocal

        public void disposeLocal​(boolean flag)
        Sets all variables to null, disposes, and garbage collects.
        Overrides:
        disposeLocal in class SurfaceRender
        Parameters:
        flag - DOCUMENT ME!
      • drawRFAPoint

        public void drawRFAPoint​(javax.vecmath.Point3f kPoint)
        Called from the parent class when the Probe Entry Point is selected in the PlaneRender object.
        Overrides:
        drawRFAPoint in class SurfaceRender
        Parameters:
        kPoint - probe entry point in ModelStorageBase Coordinates
      • enableEntryPoint

        public void enableEntryPoint​(boolean flag)
        Set entry point rotation flag.
        Overrides:
        enableEntryPoint in class SurfaceRender
        Parameters:
        flag - boolean
      • enableObjBehavior

        public void enableObjBehavior​(boolean flag)
        Enable objBehavior branch group.
        Overrides:
        enableObjBehavior in class SurfaceRender
        Parameters:
        flag - true means turn on, false means turn off.
      • getDisplayMode3D

        public boolean getDisplayMode3D()
        Return the current volume display mode.
        Overrides:
        getDisplayMode3D in class SurfaceRender
        Returns:
        volumeDisplayMode3D volume 3D diaplay mode.
      • getMouseMode

        public int getMouseMode()
        Gets the mouse pointer mode - standard or fly - from the view dialog.
        Overrides:
        getMouseMode in class SurfaceRender
        Returns:
        The mouse pointer mode.
      • getObjPlane_BG

        public javax.media.j3d.BranchGroup getObjPlane_BG​(int orientation)
        Gets the objXYPlaneBG branch group.
        Overrides:
        getObjPlane_BG in class SurfaceRender
        Returns:
        objXYPlaneBG called by JDialogSliceBox
      • getOriginalScreenScale

        public double getOriginalScreenScale()
        Return the original ScreenScale for orthographic projection:
        Overrides:
        getOriginalScreenScale in class SurfaceRender
        Returns:
        DOCUMENT ME!
      • getSceneState

        public java.lang.Object getSceneState()
        Gets the current scene state, in terms of what numbers the slices are on and whether or not they are visible.
        Overrides:
        getSceneState in class SurfaceRender
        Returns:
        A SceneState object with the variables set appropriately.
      • getSegmentationImage

        public ModelImage getSegmentationImage()
        Return the segmentation region map image which contains info on where the vascualture, etc are located.
        Overrides:
        getSegmentationImage in class SurfaceRender
        Returns:
        (vessel, etc) segmentation image
      • getSlicePanel

        public JPanelSlices getSlicePanel()
        return the current active slicePanel interface.
        Overrides:
        getSlicePanel in class SurfaceRender
        Returns:
        slicePanel called by JDialogMouseRecorder
      • getSurfaceTexturePanel

        public javax.swing.JPanel getSurfaceTexturePanel()
        Returns the surface texture panel mainPanel interface.
        Overrides:
        getSurfaceTexturePanel in class SurfaceRender
        Returns:
        surface texture mainPanel.
      • getVolRenderBG

        public javax.media.j3d.BranchGroup getVolRenderBG()
        Return volume render Branch Group.
        Overrides:
        getVolRenderBG in class SurfaceRender
        Returns:
        volRenderBG volume render branch group.
      • getVolRenderOG

        public javax.media.j3d.OrderedGroup getVolRenderOG()
        Return volume render Order Group.
        Overrides:
        getVolRenderOG in class SurfaceRender
        Returns:
        volRenderOG volume render order group.
      • getResolutions

        public float[] getResolutions()
        Returns the ModelImage resolutions.
        Overrides:
        getResolutions in class SurfaceRender
        Returns:
        ModelImage resolutions
      • invokeClipping

        public void invokeClipping()
        Enable the six clipping planes at a time.
        Overrides:
        invokeClipping in class SurfaceRender
      • reConfigureVolumeFrame

        public void reConfigureVolumeFrame()
        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. Used by the switch between aligned volume texture rendering and the volume texture rendering. Changed to public to allow updating after the volume is sculpted.
        Overrides:
        reConfigureVolumeFrame in class SurfaceRender
      • resetAxisX

        public void resetAxisX()
        Overrides the parent resetImage method. This method reset the surface volume to the original position.
        Overrides:
        resetAxisX in class SurfaceRender
      • resetAxisY

        public void resetAxisY()
        Overrides the parent resetImage method. This method reset the surface volume to the original position.
        Overrides:
        resetAxisY in class SurfaceRender
      • resetImage

        public void resetImage()
        Overrides the parent resetImage method. This method reset the surface volume to the original position.
        Overrides:
        resetImage in class SurfaceRender
      • rotateImage

        public void rotateImage()
        Overrides the rotateImage to rotate the surface volume.
        Overrides:
        rotateImage in class SurfaceRender
      • saveCropVolume

        public void saveCropVolume()
        Save crop region with the clipped volume.
        Overrides:
        saveCropVolume in class SurfaceRender
      • setAlphaBlend

        public void setAlphaBlend​(int value)
        Sets the alpha blending of parameter for two image displays.
        Overrides:
        setAlphaBlend in class SurfaceRender
        Parameters:
        value - Amount [0,100] that is the percentage of Image A to be displayed.
      • setCompositeMode

        public void setCompositeMode()
        Set the texture renderer to render in composite mode.
        Overrides:
        setCompositeMode in class SurfaceRender
      • setDisplayMode3D

        public void setDisplayMode3D​(boolean flag)
        Hack. Set the update 3D texture volume win-level flag.
        Overrides:
        setDisplayMode3D in class SurfaceRender
        Parameters:
        flag - true update 3D texture volume with win-level, false not update.
      • setGUI

        public void setGUI​(java.lang.Object scene)
        Sets the GUI components to their proper state before the action is dispatched from the player.
        Overrides:
        setGUI in class SurfaceRender
        Parameters:
        scene - The state of the scene.
      • setLightingMode

        public void setLightingMode()
        Set the texture render to render in lighting mode.
        Overrides:
        setLightingMode in class SurfaceRender
      • setLUTa

        public void setLUTa​(ModelLUT LUT)
        Accessor that sets the LUT for image A.
        Overrides:
        setLUTa in class SurfaceRender
        Parameters:
        LUT - The LUT.
      • setLUTb

        public void setLUTb​(ModelLUT LUT)
        Accessor that sets the LUT for image B.
        Overrides:
        setLUTb in class SurfaceRender
        Parameters:
        LUT - The LUT
      • setMaterialShininess

        public void setMaterialShininess​(float value)
        Set the texture material shininess value.
        Overrides:
        setMaterialShininess in class SurfaceRender
        Parameters:
        value - shininess value.
      • setMouseMode

        public void setMouseMode​(int mode)
        Sets the mouse pointer mode - standard or fly - in the view dialog.
        Overrides:
        setMouseMode in class SurfaceRender
        Parameters:
        mode - Mode to set to.
      • setMouseRotateEnable

        public void setMouseRotateEnable​(boolean bEnable)
        Allow disabling or enabling mouse rotation:
        Overrides:
        setMouseRotateEnable in class SurfaceRender
        Parameters:
        bEnable - DOCUMENT ME!
      • setParallelRotation

        public void setParallelRotation​(boolean flag)
        Set the parallel rotation flag from the viewJFrameVolumeView.
        Overrides:
        setParallelRotation in class SurfaceRender
        Parameters:
        flag - true set all the renderer to parallel rotation, false parallel rotation mode off.
      • setProbeTG

        public void setProbeTG​(javax.media.j3d.Transform3D kTransform,
                               boolean bTwist)
        Sets the Transform3D for the slices based on the Probe Transform. To allow rotation about the probe position, and not just the center of the slices, the probe translation and rotation protions of the matrix are separated. First the center of the slice is translated from the probe position to the origin, then rotated, then translated back to the probe position. The three transformations are concatenated into one Transform3D, which is used to display the slices, boxes, and to sample the ModelImage on the diagonal:
        Overrides:
        setProbeTG in class SurfaceRender
        Parameters:
        kTransform - current probe transform
        bTwist - true if there is twist about the probe axis
      • setRayBasedRender

        public void setRayBasedRender​(VolumeRenderer _rayBasedRender)
        Set the reference to ray based renderer, raycast renderer or shear warp renderer. This method set the clipping dialog to control the both the 3D texture renderer and raycast based renderer.
        Overrides:
        setRayBasedRender in class SurfaceRender
        Parameters:
        _rayBasedRender - VolumeRenderer reference
      • setRenderPerspective

        public void setRenderPerspective​(boolean bEnable)
        Enable perspective projection rendering; otherwise use orthographic projection.
        Overrides:
        setRenderPerspective in class SurfaceRender
        Parameters:
        bEnable - true to enable perspective projection
      • setRGBTA

        public void setRGBTA​(ModelRGB RGBT)
        Sets the RGB table for image A.
        Overrides:
        setRGBTA in class SurfaceRender
        Parameters:
        RGBT - New RGB table for image A.
      • setRGBTB

        public void setRGBTB​(ModelRGB RGBT)
        Sets the RGB table for image B.
        Overrides:
        setRGBTB in class SurfaceRender
        Parameters:
        RGBT - New RGB table for image B.
      • setSegmentationImage

        public void setSegmentationImage​(ModelImage img)
        Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).
        Overrides:
        setSegmentationImage in class SurfaceRender
        Parameters:
        img - segmentation image
      • setCenter

        public void setCenter​(javax.vecmath.Vector3f center)
        Sets the values for JPanelSlices, based on the positions in the PlaneRender class for the AXIAL, CORONAL, and SAGITTAL views.
        Overrides:
        setCenter in class SurfaceRender
        Parameters:
        center - the three slider values in File Coordinates
      • setSlice

        public void setSlice​(int slice)
        Does nothing but must instantiate for this to implements ViewImageUpdateInterface.
        Specified by:
        setSlice in interface ViewImageUpdateInterface
        Overrides:
        setSlice in class SurfaceRender
        Parameters:
        slice - DOCUMENT ME!
      • setSliceColor

        public void setSliceColor​(java.awt.Color color,
                                  int orientation)
        Sets the color of the x slice frame.
        Overrides:
        setSliceColor in class SurfaceRender
        Parameters:
        color - Color to set to.
      • setTimeSlice

        public void setTimeSlice​(int slice)
        Sets the time slice to be displayed and changes the image planes displayed.
        Specified by:
        setTimeSlice in interface ViewImageUpdateInterface
        Overrides:
        setTimeSlice in class SurfaceRender
        Parameters:
        slice - Indicates image time-slice (4th dimension) to be displayed.
      • setVolumeDisplayMode

        public void setVolumeDisplayMode​(boolean volDisplayMode)
        Accessor that sets the volumeDisplayMode flag. If true image is displayed as a volume. If false image is displayed as three orthogonal planes.
        Overrides:
        setVolumeDisplayMode in class SurfaceRender
        Parameters:
        volDisplayMode - if true image is displayed as a volume ( 3D texture or 2D array Texture).
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Sets how the image plane should be displayed depending on value of slider.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
        Overrides:
        stateChanged in class SurfaceRender
        Parameters:
        e - Event that triggered this function.
      • switchToSliceView

        public void switchToSliceView​(boolean firstTime)
        Perform some actions required when switching to the slice renderer.
        Overrides:
        switchToSliceView in class SurfaceRender
        Parameters:
        firstTime - perform special actions required when switching for the first time
      • switchToVolView

        public void switchToVolView​(boolean firstTime)
        Perform some actions required when switching to the volume renderer.
        Overrides:
        switchToVolView in class SurfaceRender
        Parameters:
        firstTime - perform special actions required when switching for the first time
      • 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:
        transformChanged in interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
        Overrides:
        transformChanged in class SurfaceRender
        Parameters:
        type - Type of transform.
        transform - Transform that was changed to.
      • transformUpdate

        public void transformUpdate​(int type,
                                    javax.media.j3d.Transform3D transform)
        The raybased renderer invokes this method when a mouse release event occurs.
        Overrides:
        transformUpdate in class SurfaceRender
        Parameters:
        type - Type of transform.
        transform - Transform that was changed to.
      • undoCropVolume

        public void undoCropVolume()
        Undo crop region with the clipped volume.
        Overrides:
        undoCropVolume in class SurfaceRender
      • transformBoxSlices

        private void transformBoxSlices​(javax.media.j3d.Transform3D kTransform)
        transform the points used to render the triSliceImages textures.
        Parameters:
        kTransform - the Transform3D used to rotate the boxes.
      • ScreenToModel

        private void ScreenToModel​(javax.vecmath.Vector3f screen,
                                   javax.vecmath.Vector3f model)
        Translate from normalized plane coordinates to Model coordinates:
        Parameters:
        screen - the input point to be transformed from normalized plane coordinates
        model - the output point in Model coordinates
      • ModelToScreen

        public void ModelToScreen​(javax.vecmath.Vector3f model,
                                  javax.vecmath.Vector3f screen)
        Translate from Model coordinates to normalized plane coordinates:
        Overrides:
        ModelToScreen in class SurfaceRender
        Parameters:
        model - the input point in Model coordinates
        screen - the output point in normalized plane coordinates
      • getBoxSliceInScreen

        private void getBoxSliceInScreen​(javax.vecmath.Vector3f[] screenBoxPoints,
                                         int[] boxSliceConstants)
        sets up the values for the ViewJComponentBoxSlice array. Reorders the three boxSlice (x,y,z) coordinates and mode value into local ModelCoordinates.
        Parameters:
        Vector3f - [] the reordered (x,y,z) coordinates for each boxSlice remapped into ModelCoordinates.
        boxSliceConstants - the reordered mode value (X_SLICE, Y_SLICE, Z_SLICE) remapped into ModelCoordinates
      • updateCubicTransform

        public void updateCubicTransform​(javax.media.j3d.Transform3D transform)
        Update the transform3D for the cubic.
        Overrides:
        updateCubicTransform in class SurfaceRender
        Parameters:
        transform - Transform3D
      • updateData

        public void updateData()
        Called when the underlying data has changed, due to sculpting. Calls the ViewJFrameVolumeView updateSliceData function to update the data in the slices.
        Overrides:
        updateData in class SurfaceRender
      • 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:
        updateImageExtents in interface ViewImageUpdateInterface
        Overrides:
        updateImageExtents in class SurfaceRender
        Returns:
        DOCUMENT ME!
      • updateImageFromRotation

        public void updateImageFromRotation()
        Build a image with the current rotational transformation matrix. Step.1 convert the java3D transform matrix into a quaternion component. Step.2 convert the quaternion into image( our world ) coordinate system. Step.3 convert the quaternion into a rotatin matrix. Quaternion q ( w, x, y, z ): rotation of w around the vector ( x, y, z ); Convert the quaternion into a rotation matrix. / \ | 1-2*y^2-2*z^2 2*x*y-2*w*z 2*x*z+2*w*y | | 2*xy+2*w*z 1-2*x^2-2*z^2 2*y*z-2*w*x | | 2*x*z-2*w*y 2*y*z+2*w*x 1-2*x^2-2*y^2 | \ / Step.4 Calling the transform algorithm to extract the image.
        Overrides:
        updateImageFromRotation in class SurfaceRender
      • updateImages

        public boolean updateImages()
        This methods calls the componentImage's update method to redraw the screen - fastest of the three update methods.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Overrides:
        updateImages in class SurfaceRender
        Returns:
        Confirms successful update.
      • updateImages

        public boolean updateImages​(boolean flag)
        This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Overrides:
        updateImages in class SurfaceRender
        Parameters:
        flag - forces show to re import image and calc. java image
        Returns:
        boolean confirming successful update
      • updateImages

        public boolean updateImages​(ModelLUT LUTa,
                                    ModelLUT LUTb,
                                    boolean forceShow,
                                    int interpMode)
        This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Overrides:
        updateImages in class SurfaceRender
        Parameters:
        LUTa - DOCUMENT ME!
        LUTb - DOCUMENT ME!
        forceShow - Forces show to reimport image and calculate java image.
        interpMode - DOCUMENT ME!
        Returns:
        Confirms successful update.
      • updateLighting

        public void updateLighting()
        This method is normally called by JPanelLights when a light bulb property changes. It is up to this instance to decide how to update the rendering.
        Overrides:
        updateLighting in class SurfaceRender
      • updateProbe

        public void updateProbe​(boolean forceShow,
                                boolean bInterpolate,
                                boolean bReset)
        Updates the slice textures based on the Probe position and rotation angle. The ModelImage data is sampled along the diagonal, not axis-aligned. bInterpolate indicates whether to use nearest-neighbors or to interpolate the data.
        Overrides:
        updateProbe in class SurfaceRender
        Parameters:
        forceShow - Forces triSliceImages[i].show to re-calculate the image texture.
        bInterpolate - uses nearest-neighbors when false, interpolates data when true
        bReset - when true indicates that the probe navigation has been reset and the slice bounding boxes should be displayed, when false the probe is no axis-aligned and the slice bounding boxes are not displayed
      • updateProbePos

        public void updateProbePos()
        Not used now. Might be used later on.
        Overrides:
        updateProbePos in class SurfaceRender
      • updateRaycastRender

        public void updateRaycastRender()
        Update the raycast based renderer. JPanelSurface mouse release event invokes this method call.
        Overrides:
        updateRaycastRender in class SurfaceRender
      • updateShininess

        public void updateShininess​(float value)
        Update the shininess from the JPanelLights.
        Overrides:
        updateShininess in class SurfaceRender
        Parameters:
        value - shininess value.
      • updateTransform

        public void updateTransform​(javax.media.j3d.Transform3D transform)
        Tells the mouse dialog that the transform has changed. Does not use the type parameter.
        Parameters:
        transform - Transform that was changed to.
      • updateVolume

        public boolean updateVolume​(ModelLUT LUTa,
                                    ModelLUT LUTb,
                                    boolean forceShow)
        This methods calls the componentImage's update method to redraw the screen.
        Overrides:
        updateVolume in class SurfaceRender
        Parameters:
        LUTa - LUT used to update imageA.
        LUTb - LUT used to update imageB.
        forceShow - Forces show to reimport image and calculate java image.
        Returns:
        Confirms successful update.
      • whichTissue

        public int whichTissue​(float x,
                               float y,
                               float z)
        Check the given voxel belong to which segmentation.
        Overrides:
        whichTissue in class SurfaceRender
        Parameters:
        x - float given voxel x coordinate
        y - float given voxel y coordinate
        z - float given voxel z coordinate
        Returns:
        int segmentation component type
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Calls disposeLocal.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • buildCubicBox

        private com.sun.j3d.utils.geometry.Box buildCubicBox()
        Create the rotation control cubic box.
        Returns:
        A cube representing the image orientation, with labels painted on the cube faces showing which axis corresponds to which axis in patient coordinates.
      • buildCubicBranch

        private void buildCubicBranch()
        Build the cubic branch under the objRootBG.
      • configureSliceFrame

        private void configureSliceFrame()
        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.
      • generateRFACoordMaps

        private void generateRFACoordMaps()
        Generates the texture coord map vectors for the three orthogonal slices.
      • generateRFACoordMaps

        private javax.vecmath.Vector4f generateRFACoordMaps​(int orientation,
                                                            int texCoord)
        create texture coordmaps for the texture-mapped planes displaying the triSliceImages.
        Parameters:
        orientation - the orientation of the plane for which the texture coordinates are generated (AXIAL, CORONAL, or SAGITTAL)
        texCoord - the dimension along which the texture coordinate varies
      • 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.
      • setupEye

        private void setupEye()
        Set up the center point of the red line boxframe.
      • updateTextureVolumeRender

        private void updateTextureVolumeRender()
        Determine the current viewing transformation and pass it to the texture volume renderer so that it can update itself.
      • updateViewScreenScale

        private void updateViewScreenScale​(javax.media.j3d.Transform3D kTransform)
        This function calculates the scale factor for zooming in parallel projection. The scenario is to calculate the distance between the origin boxframe center and tranformed boxframe center. This distance is used to compute the screen scale factor.
        Parameters:
        kTransform - The tranformation matrix from tranformChanged().