Class ViewJFrameRegistration
- All Implemented Interfaces:
VOIManagerInterfaceListener,ViewImageUpdateInterface,ActionListener,ComponentListener,FocusListener,ItemListener,MouseListener,MouseMotionListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
ViewJFrameRegistration is called in ViewJFrameImage. ViewJFrameRegistration calls ViewJComponentRegistration.
In ordinary image dragging you simply drag one image. Here the adjustable slice is moved while the reference slice stays fixed, and a bilinear transformation followed by an alpha blending of the 2 images occurs. Because g.drawImage in ViewJComponentBase draws the blended image, the movement cannot simply be performed by changing the parameters of g.drawImage.
The adjustable image slice moves are determined by floating point values fed into a transform routine that performs bilinear interpolation.
The file menu has 1 item, Close registration. A reference slice slider selects the slice which does not move and against which the other slices are adjusted. An adjusted slice slider selects a slice which will be moved into a desired alignment with the reference slice. An alpha blending slider determines the percentages of the image produced by the reference slice(image R) and the adjusted slice(imageA). 24 toolbar buttons are present:
1.) Display LUT table calls forth a display panel which allows the user to set separate histograms for the
reference and adjusted slices.
2.) Create checkerboard pattern
3.) Magnify image 2.0X.
4.) Magnify image 0.5X.
5.) Window region of imageB
6.) Apply least squares alignment.
7.) Apply thin plate spline alignment.
8.) Reset to return slice to original state and remove all markers
9.) Commit the slice to the image.
10.) Set the pixel increment for image translations and movements of the rotation center. Values can range from 0.01
to 2048.0. Movements of the rotation center will only be performed to the nearest integer. The default value is 1.0
pixels.
11.) Put in translate mode. In this mode the image can either be moved with the up, down, right, and left buttons or
moved a distance and direction with mouse dragging.
12.) up button for image translation in translate mode and rotation center and marker movements in POINT_VOI mode.
13.) down button for image translation in translate mode and rotation center and marker movements in POINT_VOI mode.
14.) right button for image translation in translate mode and rotation center and marker movements in POINT_VOI mode.
15.) left button for image translation in translate mode and rotation center and marker movements in POINT_VOI mode.
16.) Set degree increment for image rotations. Values can range from 0.01 to 360.0 degrees. The default value is 1.0
degrees.
17.) Put in rotate mode for rotating the image. In this mode the image can be moved either with the cw and ccw
buttons or moved an angle around the rotation center point as given by mouse dragging. The initial rotation
point is the center, but a new rotation point can be set with a mouse press.
18.) cw button for rotating an image clockwise in rotate mode.
19.) ccw button for rotating an image counterclockwise in rotate mode.
20.) Put in POINT_VOI mode for setting the location of reference slice markers. Red markers are used.
21.) Put in the POINT_VOI mode for setting the location of adjusted slice markers. Green markers are used.
Green markers move with translations and rotations.
22.) Delete selected reference slice markers.
23.) Delete selected adjusted slice markers.
24.) Return to default mode.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classClass for the two dialogs for incrementing - the pixel increment dialog and the degree increment dialog.Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!static final intDOCUMENT ME!private JToggleButtonDOCUMENT ME!private JButtonDOCUMENT ME!private AlgorithmCostFunctions2Dprivate JSliderDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JButton[]DOCUMENT ME!private JButtonprivate JButtonDOCUMENT ME!private ViewJComponentRegistrationDOCUMENT ME!private intDOCUMENT ME!private JPanelDOCUMENT ME!private ViewControlsImageDOCUMENT ME!private JScrollPaneScroll Pane for the Text Areaprivate JTextAreaprivate GridBagConstraintsDOCUMENT ME!private GridBagLayoutDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JButtonDOCUMENT ME!private JToggleButtonDOCUMENT ME!private floatDOCUMENT ME!private JButtonDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private booleanDOCUMENT ME!private JButtonDOCUMENT ME!private JToggleButtonDOCUMENT ME!private BorderDOCUMENT ME!private int[]DOCUMENT ME!private JMenuDOCUMENT ME!private FontDOCUMENT ME!private GridBagConstraintsDOCUMENT ME!private booleanDOCUMENT ME!private JMenuDOCUMENT ME!private intDOCUMENT ME!private ModelImageDOCUMENT ME!private float[]DOCUMENT ME!private float[]DOCUMENT ME!private float[]DOCUMENT ME!private intDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private intDOCUMENT ME!private JLabelDOCUMENT ME!private JLabelDOCUMENT ME!DOCUMENT ME!DOCUMENT ME!private JButtonDOCUMENT ME!private booleanDOCUMENT ME!private int[]DOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private ButtonGroupDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private int[]DOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private JMenuBarDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!private floatDOCUMENT ME!private JButtonDOCUMENT ME!private double[][]DOCUMENT ME!private double[][]DOCUMENT ME!private intDOCUMENT ME!static final intDOCUMENT ME!private JToggleButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JButtonDOCUMENT ME!private JToggleButtonDOCUMENT ME!static final intThe 3 types of markers - rotation center, reference slice, and adjusted slice.private JScrollPaneDOCUMENT ME!private intDOCUMENT ME!private ModelImageDOCUMENT ME!private static final longUse serialVersionUID for interoperability.protected FontDOCUMENT ME!private ModelSimpleImageHolds extents, other info about firstImage and SecondImageprivate ModelSimpleImageHolds extents, other info about firstImage and SecondImageprivate JSliderDOCUMENT ME!private JSliderDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private TransMatrixIdentity matrix for testing costDOCUMENT ME!private JToolBarDOCUMENT ME!private JToolBarDOCUMENT ME!private JPanelDOCUMENT ME!private JToggleButtonDOCUMENT ME!private JButtonDOCUMENT ME!private VOIDOCUMENT ME!private VOIManagerInterfaceprivate Vector<WildMagic.LibFoundation.Mathematics.Vector3f> DOCUMENT ME!private intDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private floatDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, imageA, imageB, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTa, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, userInterface, zoomModeFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORFields inherited from class java.awt.Component
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 javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionViewJFrameRegistration(ModelImage _image, ModelImage _image2, ModelLUT _LUT, ModelLUT _LUT2) Makes a frame of the manually registered image.ViewJFrameRegistration(ModelImage _image, ModelLUT _LUT) Makes a frame of the manually registered image. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Calls various methods depending on the action.private voidaddControlPanel(Component c, GridBagConstraints gbc, int x, int y, int w, int h) Adds a component to the control panel.voidaddSphereVOIs(VOI annotations) private voidaddTopPanel(Component c, GridBagConstraints gbc, int x, int y, int w, int h) Adds a component to the top panel.private voidbuildControlPanel(boolean isOne) panel that sets the at rest frame number and the desired frames per second.private voidthis method builds a menu which contains the options Save image as and Close Registration.private JToolBarbuilds the first registration toolbar.private voidMake a scroll frame and puts an image component into it.private JToolBarbuilds the second registration toolbar.buildXfrm(double[] p1, double[] p2, Jama.Matrix R) Builds 4x4 transformation matrix from R and T T=p2-R*p1.private voidvoidCalculates the residuals of the least squares fit.voidclose()Disposes of components and frame.voidcomponentResized(ComponentEvent event) Resizes frame and all components.voidcreate3DVOI(boolean bIntersection) private JLabelcreateLabel(String title) Helper method to create a label with the proper font and font color.doubleeuclideanDistance(double[] ptA, double[] ptB) Calculates the Euclidean distance.voidfinalize()DOCUMENT ME!voidfocusGained(FocusEvent event) Currently unused.voidfocusLost(FocusEvent event) Currently unused.WildMagic.LibFoundation.Mathematics.Vector3fGets control widgets for frame.getFrame()Returns the reference to imageA.Returns the reference to imageB.private voidinit(boolean isOne) DOCUMENT ME!private voidinitVOI()voiditemStateChanged(ItemEvent event) sets the flags for the checkboxes.private booleanThis code comes from matchBtoA() and buildXfrm(double p1[],double p2[], Matrix R) in AlgorithmRegLeastSquares.private JButtonmakes a separator for the use in the toolbars.voidvoidmouseClicked(MouseEvent mouseEvent) unchanged.voidmouseDragged(MouseEvent mouseEvent) continually updates the image depending on where the mouse is - unchanged.voidmouseEntered(MouseEvent mouseEvent) unchanged.voidmouseExited(MouseEvent mouseEvent) unchanged.voidmouseMoved(MouseEvent mouseEvent) Changes the LUT text field display based on the Y value of the mouse when inside ViewJComponentLUT - unchanged.voidmousePressed(MouseEvent mouseEvent) unchanged.voidmouseReleased(MouseEvent mouseEvent) unchanged.voidvoidvoidPointerActive(boolean bActive) WildMagic.LibFoundation.Mathematics.Vector3fPropDown(int iActive) WildMagic.LibFoundation.Mathematics.Vector3fPropUp(int iActive) voidRemoves the menu and controls of the main frame so that a new frame can load the main frame with the proper controls.voidsetActiveImage(int active) Sets the active image for drawing VOIs.voidsetActiveImage(ModelImage kImage) voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.voidsetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) voidSets the menu and controls (i.e. toolbars) of the main frame!voidsetDefaultMode.voidsetEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified.voidsetImageB(ModelImage _imageB) Sets the reference to imageB.voidSets the model LUT for the imageA.voidsetLUTb - accessor that sets the model LUTb for the imageB.voidsetMode(int mode) sets mode.voidvoidsetMove(float xStart, float yStart, float xFinish, float yFinish) If doDrag == false, this routine processes movements generated by mouse presses and releases.voidsetPaintBitmapSwitch(boolean paintBitmapSwitch) When switching the active image, take the paintBitmap of the previous active image as the paintBitmap of the new active image.voidsetPaintMask(BitSet mask) voidSets the RGB LUT table for ARGB image A.voidSets the RGB LUT table for ARGB image B.voidsetRotationCenter(float xRot, float yRot) Sets the coordinates of the point the will be the new image rotation center.voidsetSlice(int slice) Sets the slice to be displayed and updates title frame.voidsetTimeSlice(int slice) Sets the slice to be displayed and updates title frame.voidsetTitle()sets the title of the frame with the image name and magnification.static final doubleSQR(double x) SQR = x^2.voidsets values based on knob along slider.private voidtpSpline()Thin-plate registration method.private voidTransforms the image.private voidTransforms color image.voidvoidupdateFrame(float sX, float sY) DOCUMENT ME!booleanThis methods calls the componentImage's REPAINT method to redraw the screen.final booleanThis methods calls the componentImage's update method to redraw the screen.final booleanupdateImages(boolean forceShow) Calls the componentImage's update method to redraw the screen.final booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow) This methods calls the componentImage's update method to redraw the screen.final booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean forceShow, int interpMode) This methods calls the componentImage's update method to redraw the screen.voidwindowActivated(WindowEvent event) unchanged.voidwindowClosed(WindowEvent event) unchanged.voidwindowClosing(WindowEvent event) Calls dispose.voidwindowDeactivated(WindowEvent event) unchanged.voidwindowDeiconified(WindowEvent event) unchanged.voidwindowIconified(WindowEvent event) unchanged.voidwindowOpened(WindowEvent event) Unchanged.Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, close, closeImageB, componentHidden, componentMoved, componentShown, getAlphaBlend, getDefaultLUTa, getDefaultLUTb, getDisplayMode, getImageNameA, getImageNameB, getLastState, getLUTa, getLUTb, getRGBTA, getRGBTB, getTriImg, getUserInterface, handleMaskPopupMenu, handlePaintToMaskPopupMenu, handleZoomPopupMenu, initExtents, initImageBuffer, initLUT, initNumSlices, initPixelBuffer, initResFactor, initResolutions, initRGB, initSlicePositions, initUnits, initZoom, loadAllVOIs, loadAllVOIsFrom, loadImage, loadLUT, loadLUTandTransferFunctionFrom, loadLUTandTransferFunctionFrom, makeString, newFrameBeenCreated, openVOI, openVOI, pickImageFile, save, save, save, saveAllVOIs, saveAllVOIsTo, saveLabels, saveLUT, saveLUTandTransferFunction, saveLUTandTransferFunction, saveLUTAs, saveLUTAs, saveVOI, saveVOIAs, saveVOIAs, saveVOIIntensities, saveVOIIntensitiesTo, setAbsPositionLabels, setEnableCloseImageBAfterLoad, setImageA, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPositionMethods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEventMethods inherited from interface gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterfaceListener
setCursor
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
ROTATIONCENTER
public static final int ROTATIONCENTERThe 3 types of markers - rotation center, reference slice, and adjusted slice.- See Also:
-
REFMARK
public static final int REFMARKDOCUMENT ME!- See Also:
-
ADJMARK
public static final int ADJMARKDOCUMENT ME!- See Also:
-
toggleArray
DOCUMENT ME! -
serif12
DOCUMENT ME! -
adjMark
private int adjMarkDOCUMENT ME! -
adjMarkButton
DOCUMENT ME! -
adjMarkMinusButton
DOCUMENT ME! -
alphaSlider
DOCUMENT ME! -
bufferFactor
private int bufferFactorDOCUMENT ME! -
bufferSize
private int bufferSizeDOCUMENT ME! -
buttonArray
DOCUMENT ME! -
ccwButton
DOCUMENT ME! -
componentImage
DOCUMENT ME! -
componentY
private int componentYDOCUMENT ME! -
controlPanel
DOCUMENT ME! -
controls
DOCUMENT ME! -
cpGBC
DOCUMENT ME! -
cpGBL
DOCUMENT ME! -
curAdjMark
private int curAdjMarkDOCUMENT ME! -
curRefMark
private int curRefMarkDOCUMENT ME! -
cwButton
DOCUMENT ME! -
defaultModeButton
DOCUMENT ME! -
degreeIncrement
private float degreeIncrementDOCUMENT ME! -
degreeIncrementButton
DOCUMENT ME! -
doDrag
private boolean doDragDOCUMENT ME! -
doneLeastSquares
private boolean doneLeastSquaresDOCUMENT ME! -
doRegionB
private boolean doRegionBDOCUMENT ME! -
downButton
DOCUMENT ME! -
dragButton
DOCUMENT ME! -
etchedBorder
DOCUMENT ME! -
extents
private int[] extentsDOCUMENT ME! -
fileMenu
DOCUMENT ME! -
font12
DOCUMENT ME! -
gbc
DOCUMENT ME! -
haveVOIPoints
private boolean haveVOIPointsDOCUMENT ME! -
helpMenu
DOCUMENT ME! -
i
private int iDOCUMENT ME! -
j
private int jDOCUMENT ME! -
image
DOCUMENT ME! -
imageBufferA
private float[] imageBufferADOCUMENT ME! -
imageBufferB
private float[] imageBufferBDOCUMENT ME! -
imageBufferOriginalB
private float[] imageBufferOriginalBDOCUMENT ME! -
imageSize
private int imageSizeDOCUMENT ME! -
itemClose
DOCUMENT ME! -
itemHelp
DOCUMENT ME! -
labelReferenceSlice
DOCUMENT ME! -
labelAdjustedSlice
DOCUMENT ME! -
labelTable
DOCUMENT ME! -
labelTable2
DOCUMENT ME! -
leftButton
DOCUMENT ME! -
logMagDisplay
private boolean logMagDisplayDOCUMENT ME! -
markerType
private int[] markerTypeDOCUMENT ME! -
minimumToolBarWidth
private int minimumToolBarWidthDOCUMENT ME! -
mode
private int modeDOCUMENT ME! -
movementGroup
DOCUMENT ME! -
n
private int nDOCUMENT ME! -
newAlphaBlend
private int newAlphaBlendDOCUMENT ME! -
newExtents
private int[] newExtentsDOCUMENT ME! -
nImage
private int nImageDOCUMENT ME! -
nVOI
private int nVOIDOCUMENT ME! -
openingMenuBar
DOCUMENT ME! -
pixBuffer
private int[] pixBufferDOCUMENT ME! -
pixBufferB
private int[] pixBufferBDOCUMENT ME! -
pixelIncrement
private float pixelIncrementDOCUMENT ME! -
pixelIncrementButton
DOCUMENT ME! -
pointSetA
private double[][] pointSetADOCUMENT ME! -
pointSetB
private double[][] pointSetBDOCUMENT ME! -
refMark
private int refMarkDOCUMENT ME! -
refMarkButton
DOCUMENT ME! -
refMarkMinusButton
DOCUMENT ME! -
rightButton
DOCUMENT ME! -
rotateButton
DOCUMENT ME! -
scrollPane
DOCUMENT ME! -
scrollPaneSize
private int scrollPaneSizeDOCUMENT ME! -
secondImage
DOCUMENT ME! -
slider
DOCUMENT ME! -
slider2
DOCUMENT ME! -
textReferenceSlice
DOCUMENT ME! -
textAdjustedSlice
DOCUMENT ME! -
toolBar
DOCUMENT ME! -
toolBar2
DOCUMENT ME! -
topPanel
DOCUMENT ME! -
translateButton
DOCUMENT ME! -
calculateCostButton
-
upButton
DOCUMENT ME! -
voi
DOCUMENT ME! -
VOIPoints
DOCUMENT ME! -
xDim
private int xDimDOCUMENT ME! -
xfrm
DOCUMENT ME! -
xfrmBA
DOCUMENT ME! -
xfrmD
DOCUMENT ME! -
xfrmH
DOCUMENT ME! -
xOrg
private int[] xOrgDOCUMENT ME! -
xPres
private int[] xPresDOCUMENT ME! -
xRes
private float xResDOCUMENT ME! -
xRotation
private float xRotationDOCUMENT ME! -
xScreen
private int xScreenDOCUMENT ME! -
yScreen
private int yScreenDOCUMENT ME! -
yDim
private int yDimDOCUMENT ME! -
yOrg
private int[] yOrgDOCUMENT ME! -
yPres
private int[] yPresDOCUMENT ME! -
yRes
private float yResDOCUMENT ME! -
yRotation
private float yRotationDOCUMENT ME! -
zoom
private float zoomDOCUMENT ME! -
zSlice
private int zSliceDOCUMENT ME! -
zSlice2
private int zSlice2DOCUMENT ME! -
zLastSlice
private int zLastSliceDOCUMENT ME! -
zLastSlice2
private int zLastSlice2DOCUMENT ME! -
costFunctionTextArea
-
costFunctionScrollPane
Scroll Pane for the Text Area -
simpleImg1
Holds extents, other info about firstImage and SecondImage -
simpleImg2
Holds extents, other info about firstImage and SecondImage -
tMatrix
Identity matrix for testing cost -
algoCost
-
voiManager
-
-
Constructor Details
-
ViewJFrameRegistration
Makes a frame of the manually registered image.- Parameters:
_image- Model of image_LUT- Model of LUT for image
-
ViewJFrameRegistration
Makes a frame of the manually registered image.- Parameters:
_image- the first image_image2- the second image_LUT- lut for the first image_LUT2- lut for the second image
-
-
Method Details
-
SQR
public static final double SQR(double x) SQR = x^2.- Parameters:
x- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
actionPerformed
Calls various methods depending on the action.- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
event- event that triggered function
-
buildXfrm
Builds 4x4 transformation matrix from R and T T=p2-R*p1.- Parameters:
p1- from Matchp2- from MatchR- matrix from Match- Returns:
- transformation matrix
-
calculateResiduals
public void calculateResiduals()Calculates the residuals of the least squares fit. -
close
public void close()Disposes of components and frame.- Overrides:
closein classViewJFrameBase
-
componentResized
Resizes frame and all components.- Specified by:
componentResizedin interfaceComponentListener- Overrides:
componentResizedin classViewJFrameBase- Parameters:
event- event that triggered function
-
euclideanDistance
public double euclideanDistance(double[] ptA, double[] ptB) Calculates the Euclidean distance.- Parameters:
ptA- point AptB- point B- Returns:
- the euclidean distance between points
-
finalize
public void finalize()DOCUMENT ME!- Overrides:
finalizein classViewJFrameBase
-
focusGained
Currently unused.- Specified by:
focusGainedin interfaceFocusListener- Parameters:
event- DOCUMENT ME!
-
focusLost
Currently unused.- Specified by:
focusLostin interfaceFocusListener- Parameters:
event- DOCUMENT ME!
-
getControls
Gets control widgets for frame.- Specified by:
getControlsin classViewJFrameBase- Returns:
- controls
-
getImageA
Returns the reference to imageA.- Specified by:
getImageAin classViewJFrameBase- Returns:
- image
-
getImageB
Returns the reference to imageB.- Specified by:
getImageBin classViewJFrameBase- Returns:
- imageB
-
itemStateChanged
sets the flags for the checkboxes.- Specified by:
itemStateChangedin interfaceItemListener- Parameters:
event- event that triggered this function
-
mouseClicked
unchanged.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
mouseEvent- event that triggered function
-
mouseDragged
continually updates the image depending on where the mouse is - unchanged.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
mouseEvent- event that triggered this function
-
mouseEntered
unchanged.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mouseExited
unchanged.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
mouseEvent- DOCUMENT ME!
-
mouseMoved
Changes the LUT text field display based on the Y value of the mouse when inside ViewJComponentLUT - unchanged.- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
mouseEvent- event that triggered this function
-
mousePressed
unchanged.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
mouseEvent- event that triggered function
-
mouseReleased
unchanged.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
mouseEvent- event that triggered function
-
removeControls
public void removeControls()Removes the menu and controls of the main frame so that a new frame can load the main frame with the proper controls. Currently unused.- Specified by:
removeControlsin classViewJFrameBase
-
setActiveImage
public void setActiveImage(int active) Sets the active image for drawing VOIs. VOIs are only drawn in the active image. In addition, algorithms are executed on the active window.- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener- Specified by:
setActiveImagein classViewJFrameBase- Parameters:
active- IMAGE_A or IMAGE_B
-
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying. Currently unused.- Specified by:
setAlphaBlendin classViewJFrameBase- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed
-
setControls
public void setControls()Sets the menu and controls (i.e. toolbars) of the main frame! This puts the menus and controls needed to controls the operations of this frame. Different image frames have different menu and controls. Currently unused.- Specified by:
setControlsin classViewJFrameBase
-
setDefaultMode
public void setDefaultMode()setDefaultMode. -
setEnabled
public void setEnabled(boolean flag) Controls whether or not the images/VOIs of the frame can be modified. Currently unused.- Specified by:
setEnabledin classViewJFrameBase- Parameters:
flag- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageB
Sets the reference to imageB. Currently unused.- Specified by:
setImageBin classViewJFrameBase- Parameters:
_imageB- Image to set the frame to
-
setLUTa
Sets the model LUT for the imageA.- Overrides:
setLUTain classViewJFrameBase- Parameters:
LUT- the model LUT
-
setLUTb
setLUTb - accessor that sets the model LUTb for the imageB.- Overrides:
setLUTbin classViewJFrameBase- Parameters:
LUT- the model LUT
-
setMode
public void setMode(int mode) sets mode.- Parameters:
mode- DOCUMENT ME!
-
setMove
public void setMove(float xStart, float yStart, float xFinish, float yFinish) If doDrag == false, this routine processes movements generated by mouse presses and releases. The mouse press location sets (xStart,yStart) and the mouse release location sets (xFinish,yFinish). If doDrag == true, this routine processes movements generated by mouse press and drag events.- Parameters:
xStart- DOCUMENT ME!yStart- DOCUMENT ME!xFinish- DOCUMENT ME!yFinish- DOCUMENT ME!
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean paintBitmapSwitch) When switching the active image, take the paintBitmap of the previous active image as the paintBitmap of the new active image.- Specified by:
setPaintBitmapSwitchin classViewJFrameBase- Parameters:
paintBitmapSwitch- if true don't copy the new acitve image mask
-
setRGBTA
Sets the RGB LUT table for ARGB image A.- Specified by:
setRGBTAin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
setRGBTB
Sets the RGB LUT table for ARGB image B.- Specified by:
setRGBTBin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
setRotationCenter
public void setRotationCenter(float xRot, float yRot) Sets the coordinates of the point the will be the new image rotation center.- Parameters:
xRot- DOCUMENT ME!yRot- DOCUMENT ME!
-
setSlice
public void setSlice(int slice) Sets the slice to be displayed and updates title frame.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image slice to be displayed
-
setTimeSlice
public void setTimeSlice(int slice) Sets the slice to be displayed and updates title frame. Currently unused.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
slice- indicates image time-slice (4th dimension) to be displayed
-
setTitle
public void setTitle()sets the title of the frame with the image name and magnification.- Specified by:
setTitlein classViewJFrameBase
-
stateChanged
sets values based on knob along slider.- Specified by:
stateChangedin interfaceChangeListener- Overrides:
stateChangedin classViewJFrameBase- Parameters:
e- event that triggered this function
-
updateFrame
public void updateFrame(float sX, float sY) DOCUMENT ME!- Parameters:
sX- zoom in the x dimensionsY- zoom in the y dimension
-
updateImageExtents
public boolean updateImageExtents()This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Specified by:
updateImageExtentsin classViewJFrameBase- Returns:
- DOCUMENT ME!
- See Also:
-
updateImages
public final boolean updateImages()This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public final boolean updateImages(boolean forceShow) Calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
forceShow- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
This methods calls the componentImage's update method to redraw the screen.- Parameters:
LUTa- LUT used to update imageALUTb- LUT used to update imageBforceShow- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- LUT used to update imageALUTb- LUT used to update imageBforceShow- forces show to re import image and calc. java imageinterpMode- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
windowActivated
unchanged.- Specified by:
windowActivatedin interfaceWindowListener- Overrides:
windowActivatedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowClosed
unchanged.- Specified by:
windowClosedin interfaceWindowListener- Overrides:
windowClosedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowClosing
Calls dispose.- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- event that triggered function
-
windowDeactivated
unchanged.- Specified by:
windowDeactivatedin interfaceWindowListener- Overrides:
windowDeactivatedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowDeiconified
unchanged.- Specified by:
windowDeiconifiedin interfaceWindowListener- Overrides:
windowDeiconifiedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowIconified
unchanged.- Specified by:
windowIconifiedin interfaceWindowListener- Overrides:
windowIconifiedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
windowOpened
Unchanged.- Specified by:
windowOpenedin interfaceWindowListener- Overrides:
windowOpenedin classViewJFrameBase- Parameters:
event- DOCUMENT ME!
-
addControlPanel
Adds a component to the control panel.- Parameters:
c- componentgbc- GridBagConstraintsx- DOCUMENT ME!y- DOCUMENT ME!w- DOCUMENT ME!h- DOCUMENT ME!
-
addTopPanel
Adds a component to the top panel.- Parameters:
c- componentgbc- GridbagConstraintsx- DOCUMENT ME!y- DOCUMENT ME!w- DOCUMENT ME!h- DOCUMENT ME!
-
buildControlPanel
private void buildControlPanel(boolean isOne) panel that sets the at rest frame number and the desired frames per second.- Parameters:
isOne- one 3D (2.5) image, if false two 2D images are passed in and the top two sliders are not needed.
-
buildMenu
private void buildMenu()this method builds a menu which contains the options Save image as and Close Registration. -
buildRegistrationToolBar
builds the first registration toolbar.- Parameters:
al- ActionListener- Returns:
- DOCUMENT ME!
-
buildScrollPane
private void buildScrollPane()Make a scroll frame and puts an image component into it. -
buildToolBar2
builds the second registration toolbar.- Parameters:
al- ActionListener- Returns:
- DOCUMENT ME!
-
createLabel
Helper method to create a label with the proper font and font color.- Parameters:
title- Text of the label.- Returns:
- New label.
-
init
private void init(boolean isOne) DOCUMENT ME!- Parameters:
isOne- one 3D (2.5) image, if false two 2D images are passed in and the top two sliders are not needed.
-
leastSquares
private boolean leastSquares()This code comes from matchBtoA() and buildXfrm(double p1[],double p2[], Matrix R) in AlgorithmRegLeastSquares.- Returns:
- DOCUMENT ME!
-
makeSeparator
makes a separator for the use in the toolbars.- Returns:
- DOCUMENT ME!
-
tpSpline
private void tpSpline()Thin-plate registration method. -
transform
private void transform()Transforms the image. -
transformC
private void transformC()Transforms color image. -
calculateCostFunctionValues
private void calculateCostFunctionValues() -
PointerActive
public void PointerActive(boolean bActive) - Specified by:
PointerActivein interfaceVOIManagerInterfaceListener
-
PropDown
public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive) - Specified by:
PropDownin interfaceVOIManagerInterfaceListener
-
PropUp
public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive) - Specified by:
PropUpin interfaceVOIManagerInterfaceListener
-
create3DVOI
public void create3DVOI(boolean bIntersection) - Specified by:
create3DVOIin interfaceVOIManagerInterfaceListener
-
getActiveImage
- Specified by:
getActiveImagein interfaceVOIManagerInterfaceListener
-
getActiveLUT
- Specified by:
getActiveLUTin interfaceVOIManagerInterfaceListener
-
getActiveRGB
- Specified by:
getActiveRGBin interfaceVOIManagerInterfaceListener
-
getCenterPt
public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()- Specified by:
getCenterPtin interfaceVOIManagerInterfaceListener
-
getFrame
- Specified by:
getFramein interfaceVOIManagerInterfaceListener
-
getVOIManager
- Specified by:
getVOIManagerin interfaceVOIManagerInterfaceListener
-
setActiveImage
- Specified by:
setActiveImagein interfaceVOIManagerInterfaceListener
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) - Specified by:
setCenterin interfaceVOIManagerInterfaceListener
-
setModified
public void setModified()- Specified by:
setModifiedin interfaceVOIManagerInterfaceListener
-
updateData
public void updateData()- Specified by:
updateDatain interfaceVOIManagerInterfaceListener
-
setPaintMask
- Specified by:
setPaintMaskin interfaceVOIManagerInterfaceListener
-
paintToShortMask
public void paintToShortMask()- Specified by:
paintToShortMaskin interfaceVOIManagerInterfaceListener
-
paintToUbyteMask
public void paintToUbyteMask()- Specified by:
paintToUbyteMaskin interfaceVOIManagerInterfaceListener
-
maskToPaint
public void maskToPaint()- Specified by:
maskToPaintin interfaceVOIManagerInterfaceListener
-
initVOI
private void initVOI() -
addSphereVOIs
- Specified by:
addSphereVOIsin interfaceVOIManagerInterfaceListener
-