Package gov.nih.mipav.view
Class ViewJFrameMultimodalitySingleViewer
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.ViewJFrameTriImage
-
- gov.nih.mipav.view.ViewJFrameMultimodalitySingleViewer
-
- All Implemented Interfaces:
VOIManagerInterfaceListener
,ViewImageUpdateInterface
,java.awt.event.ActionListener
,java.awt.event.ComponentListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class ViewJFrameMultimodalitySingleViewer extends ViewJFrameTriImage implements java.awt.event.ItemListener, javax.swing.event.ChangeListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, VOIManagerInterfaceListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ViewJFrameMultimodalitySingleViewer.MousePopupListener
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.ViewJFrameTriImage
ViewJFrameTriImage.OkColorListener, ViewJFrameTriImage.PaintBoxRenderer
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.ImageIcon
blackImage
private javax.swing.JComboBox
comboBoxImage
private javax.swing.ImageIcon
cornerImage
private ViewJFrameImage
currentFrame
private int
currentSlice
private int
imageActiveIndex
private ViewJComponentEditImage[]
imageComp
private ViewJFrameImage[]
imageFrame
private java.lang.String[]
imageNames
private int
imageNamesIndex
private ModelImage[]
images
private javax.swing.JFileChooser
imagesChooser
target image variables.private javax.swing.JScrollPane
imageScroll
private float
initZoomFactor
private javax.swing.JLabel
label1
private javax.swing.JLabel
label2
private javax.swing.JLabel
label3
private javax.swing.JLabel
label4
private javax.swing.JLabel
label5
private javax.swing.JLabel
label6
private javax.swing.JLabel
label7
private javax.swing.JLabel
label8
private javax.swing.JPanel
leftPanel
private javax.swing.JPanel
lowerPanel
private java.awt.Point
origin
private javax.swing.JPopupMenu
popup
private boolean
pressed
private javax.swing.JPanel
quadImagePanel
private javax.swing.JPanel
rightPanel
protected java.awt.Font
serif12
protected java.awt.Font
serif12B
private int
sliceNumCache
private javax.swing.JTextField[]
slicesTextField
private javax.swing.JLabel[]
sliderMax
private javax.swing.JPanel
sliderPanel
private javax.swing.JPanel
topPanel
private ViewUserInterface
UI
The main user interface.(package private) static int
v
private int[]
zDim
private javax.swing.JSlider[]
zImageSlider
-
Fields inherited from class gov.nih.mipav.view.ViewJFrameTriImage
addPointToggleButton, ATLAS_AC_TO_ANT, ATLAS_AC_TO_INF, ATLAS_AC_TO_LAT, ATLAS_AC_TO_PC, ATLAS_AC_TO_SUP, ATLAS_BBOX_ANT, ATLAS_BBOX_INF, ATLAS_BBOX_INF_NEW, ATLAS_BBOX_LAT, ATLAS_BBOX_POS, ATLAS_BBOX_SUP, ATLAS_PC_TO_POS, AXIAL_A, AXIAL_AB, AXIAL_B, bogusBorderPaintButton, borderPaintButton, btnInvisible, bufferFactor, centerButtonSelected, chkShowTalairachGrid, chkShowTalairachGridMarkers, color, colorChooser, colorPaintButton, controls, coordinateListeners, CORONAL_A, CORONAL_AB, CORONAL_B, crosshairSpinner, currentAbsolutePositionLabels, DEFAULT_OPTIMAL_ZOOM, defaultPreferredHeight, dropperPaintToggleButton, extents, IMAGE_ALIGN_TOOLBAR, imageAlignToolBar, imageToolBar, indivMagButton, indivMinButton, intensitySpinner, iTalLabel, labelXTal, labelYTal, labelZTal, leastSquaresButton, magButton, MAX_INITIAL_TRI_IMAGES, menuObj, minButton, NUM_INVISIBLE_BUTTONS, OLD_LAYOUT, oldLayout, OPACITY, PAINT_TOOLBAR, paintBox, paintBrushNames, paintCanToggleButton, paintToolBar, PANEL_PLUGIN, panelActiveImage, panelToolbar, panelToolBarGBC, parentFrame, pluginPanel, radioImageA, radioImageB, radioImageBoth, resols, RGBTa, RGBTb, SAGITTAL_A, SAGITTAL_AB, SAGITTAL_B, scrollButton, scrollOriginalCrosshair, scrollPane, showTalairachGrid, showTalairachPosition, talairachPanel, tDim, tImageSlider, toolbarBuilder, tpSplineButton, traverseButton, triImage, triImagePanel, tSlice, tTalVoxLabel, units, useInfNew, viewPanel, VOI_TOOLBAR, VOIGroup, voiManager, voiMenu, volumeCenter, volumePositionFrame, volumePositionPanel, xTalLabel, yTalLabel, zoom, zTalLabel
-
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, zoomMode
-
Fields 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_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description ViewJFrameMultimodalitySingleViewer(ModelImage _imageA, ViewJFrameImage frame)
-
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
addPopup()
private void
adjustScrollbars(int x, int y, javax.swing.JScrollPane scrollPane)
DOCUMENT ME!protected void
buildActiveImagePanel()
Builds the active image panel for choosing which image (A, B, or BOTH) to perform operations on.private void
buildComboBoxImage()
Builds a list of images to operate on from the template image.private void
buildSlider(javax.swing.JPanel rightPanel)
(package private) void
captureComponent(java.awt.Component component)
private void
changeIcon(java.lang.String whiteCicleName, java.lang.String blackCircleName)
void
disposeLocal()
Should be called when window is closing to perform cleanup.void
equalScaleImage()
void
equalScaleImageLight()
protected void
finalize()
DOCUMENT ME!int[]
getCenter()
Sets the x coordinate of the point to be the center of the transformed image.WildMagic.LibFoundation.Mathematics.Vector3f
getCenterPt()
javax.swing.JFrame
getFrame()
private void
getFramesInfo()
ModelImage
getImageA()
Accessor that returns the reference to imageA.ModelImage
getImageB()
Accessor that returns the reference to imageB.ViewJFrameTriImage
getLinkedTriFrame()
Gets the linked ViewJFrameTriImage.ViewJFrameImage
getParentFrame()
Returns a reference to the ViewJFrameImage object that is the parent of this frame.private void
initLayout()
void
invokeMeasure()
void
keyPressed(java.awt.event.KeyEvent e)
keyPressed event method for KeyListener.void
keyReleased(java.awt.event.KeyEvent e)
keyReleased event method for KeyListener.void
keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!void
mouseClicked(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseEntered(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseExited(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseMoved(java.awt.event.MouseEvent evt)
void
mousePressed(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseReleased(java.awt.event.MouseEvent event)
DOCUMENT ME!void
mouseWheelMoved(java.awt.event.MouseWheelEvent mouseWheelEvent)
private void
readImages(java.io.File dir)
private void
readMultlmodalImages()
File chooser to select target image directory.void
setActiveImage(int active)
Set the active image for drawing VOIs.void
setCenter(int i, int j, int k)
sets the crosshair positions and slices for each of the triImages.void
setCenter(int i, int j, int k, boolean checkLinkedScroll)
sets the crosshair positions and slices for each of the triImages.void
setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
void
setCursor(java.awt.Cursor kCursor)
void
setEnabled(boolean flag)
Controls whether or not the images/VOIs of the frame can be modified.void
setImageA(ModelImage image)
Changes imageA to a new model image reference.void
setImageB(ModelImage _imageB)
Accessor that sets the reference to imageB.void
setImageB(ModelImage _imageB, boolean disposeOldB)
Accessor that sets the reference to imageB.void
setLinkButtonSelected(boolean selected)
Sets whether the linking button should be set for this image, implies that this image will be linked to another tri-frame when truevoid
setLUTa(ModelLUT LUT)
Accessor that sets the LUT.void
setLUTb(ModelLUT LUT)
Accessor that sets the LUT.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 Currenlty unused.void
setPaintColor(java.awt.Color color)
Sets the color of the paint.void
setPositionLabels(int x, int y, int z)
Sets the labels which show the absolute position within the image volume and the patient position.void
setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.void
setSlice(int slice)
Does nothing.void
setSlices(int x, int y, int z)
Sets the slice index for each plane in the frame and components.void
setSlicesFromFrame(int x, int y, int z)
Called from the "normal" image component, sets the slices for the tri planar view to display.void
setTimeSlice(int slice)
Sets the slice to be displayed and updates title frame.void
setTimeSlice(int slice, boolean checkedLinkedScroll)
Sets the slice to be displayed and updates title frame.void
setTitle()
Sets the title bar for the tri-image frame.void
setTraverseButton()
Sets the traverse button to selected.void
setVolumeCenter(int x, int y, int z)
Sets the x coordinate of the point to be the center of the transformed image.void
setVolumeCenter(Point3D newVolumeCenter)
Sets the x coordinate of the point to be the center of the transformed image.void
startRecording()
void
stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along time slider.void
stopRecording()
private void
traverse(java.io.File file)
void
updateImage(int index)
boolean
updateImageExtents()
Do nothing - required by ViewJFrameBase.boolean
updateImages()
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(boolean forceShow, int interpMode)
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
updateImageSubset(ViewJComponentTriImage triImage)
DOCUMENT ME!private void
updateSlider()
void
windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.void
windowOpened(java.awt.event.WindowEvent event)
Does nothing.protected void
zoomInFrame(int frame)
this method will zoom in a particular frame.protected void
zoomOutFrame(int frame)
this method will zoom out a particular frame.-
Methods inherited from class gov.nih.mipav.view.ViewJFrameTriImage
absoluteGoTo, addCoordinateChangeListener, addSphereVOIs, addTabbedPane, buildDisabledTextButton, buildIconButton, buildImageAlignToolBar, buildLUTs, buildMagToolBar, buildMenu, buildNamedTextButton, buildPaintToolBar, buildProgressBar, buildTImageSliderLabels, buildToggleButton, buildToggleButton, buildToolbarMenu, buildToolbars, buildTriImage, buildVolumePositionPanel, cleanVolumePositionPanel, closeImageB, configureFrame, create3DVOI, doOldLayout, enableBoth, fireCoordinateChange, getActiveImage, getActiveLUT, getActiveRGB, getAxialComponentSlice, getBoundedVolume, getControls, getCoronalComponentSlice, getCurrentOrientation, getCurrentPositionLabels, getOptimalZoom, getSagittalComponentSlice, getSelectedImage, getTriImage, gettTalVoxLabel, getVOIManager, getXSliceHairColor, getYSliceHairColor, getZSliceHairColor, handleLeastSquares, handlePluginPanelSelection, handleTPSpline, init, initProgressBar, initVOI, isFocusable, isMultipleSameSizeTriImages, itemStateChanged, makeSeparator, maskToPaint, paintToShortMask, paintToUbyteMask, PointerActive, PropDown, PropUp, removeControls, removeCoordinateChangeListener, setActiveImage, setAlphaBlend, setControls, setCrop, setCurrentOrientation, setDefault, setImageActiveInTriComponents, setImageSelectorPanelVisible, setIntensityDropper, setIntensityPaintName, setModified, setOldLayout, setPaintMask, setTalairachPositionLabels, settTalVoxLabelText, setXSliceHairColor, setYSliceHairColor, setZSliceHairColor, updateData, updateHistoLUTFrame, updateLayout, updatePaint
-
Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, close, close, componentHidden, componentMoved, componentResized, 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, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified
-
Methods 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, update
-
Methods 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, setUndecorated
-
Methods 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, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods 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, validateTree
-
Methods 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, 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, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.view.renderer.WildMagic.VOI.VOIManagerInterfaceListener
addSphereVOIs, create3DVOI, getActiveImage, getActiveLUT, getActiveRGB, getVOIManager, maskToPaint, paintToShortMask, paintToUbyteMask, PointerActive, PropDown, PropUp, setActiveImage, setModified, setPaintMask, updateData
-
-
-
-
Field Detail
-
imagesChooser
private javax.swing.JFileChooser imagesChooser
target image variables.
-
UI
private ViewUserInterface UI
The main user interface.
-
currentFrame
private ViewJFrameImage currentFrame
-
imageScroll
private javax.swing.JScrollPane imageScroll
-
origin
private java.awt.Point origin
-
quadImagePanel
private javax.swing.JPanel quadImagePanel
-
currentSlice
private int currentSlice
-
zDim
private int[] zDim
-
comboBoxImage
private javax.swing.JComboBox comboBoxImage
-
initZoomFactor
private float initZoomFactor
-
popup
private javax.swing.JPopupMenu popup
-
sliceNumCache
private int sliceNumCache
-
serif12
protected java.awt.Font serif12
-
serif12B
protected java.awt.Font serif12B
-
sliderMax
private javax.swing.JLabel[] sliderMax
-
zImageSlider
private javax.swing.JSlider[] zImageSlider
-
slicesTextField
private javax.swing.JTextField[] slicesTextField
-
imageFrame
private ViewJFrameImage[] imageFrame
-
imageComp
private ViewJComponentEditImage[] imageComp
-
imageNames
private java.lang.String[] imageNames
-
imageNamesIndex
private int imageNamesIndex
-
images
private ModelImage[] images
-
imageActiveIndex
private int imageActiveIndex
-
sliderPanel
private javax.swing.JPanel sliderPanel
-
cornerImage
private javax.swing.ImageIcon cornerImage
-
blackImage
private javax.swing.ImageIcon blackImage
-
rightPanel
private javax.swing.JPanel rightPanel
-
leftPanel
private javax.swing.JPanel leftPanel
-
topPanel
private javax.swing.JPanel topPanel
-
lowerPanel
private javax.swing.JPanel lowerPanel
-
label1
private javax.swing.JLabel label1
-
label2
private javax.swing.JLabel label2
-
label3
private javax.swing.JLabel label3
-
label4
private javax.swing.JLabel label4
-
label5
private javax.swing.JLabel label5
-
label6
private javax.swing.JLabel label6
-
label7
private javax.swing.JLabel label7
-
label8
private javax.swing.JLabel label8
-
pressed
private boolean pressed
-
v
static int v
-
-
Constructor Detail
-
ViewJFrameMultimodalitySingleViewer
public ViewJFrameMultimodalitySingleViewer(ModelImage _imageA, ViewJFrameImage frame)
-
-
Method Detail
-
addPopup
public void addPopup()
-
startRecording
public void startRecording()
-
stopRecording
public void stopRecording()
-
getFramesInfo
private void getFramesInfo()
-
captureComponent
void captureComponent(java.awt.Component component)
-
initLayout
private void initLayout()
-
buildSlider
private void buildSlider(javax.swing.JPanel rightPanel)
-
updateSlider
private void updateSlider()
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent mouseWheelEvent)
- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
-
buildComboBoxImage
private void buildComboBoxImage()
Builds a list of images to operate on from the template image.
-
equalScaleImage
public void equalScaleImage()
-
equalScaleImageLight
public void equalScaleImageLight()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Calls various methods depending on the action.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classViewJFrameTriImage
- Parameters:
event
- event that triggered function
-
updateImage
public void updateImage(int index)
-
disposeLocal
public void disposeLocal()
Should be called when window is closing to perform cleanup.- Overrides:
disposeLocal
in classViewJFrameTriImage
-
getCenter
public int[] getCenter()
Sets the x coordinate of the point to be the center of the transformed image.- Overrides:
getCenter
in classViewJFrameTriImage
- Returns:
- DOCUMENT ME!
-
getCenterPt
public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()
- Specified by:
getCenterPt
in interfaceVOIManagerInterfaceListener
- Overrides:
getCenterPt
in classViewJFrameTriImage
-
getImageA
public ModelImage getImageA()
Accessor that returns the reference to imageA.- Overrides:
getImageA
in classViewJFrameTriImage
- Returns:
- image
-
getImageB
public ModelImage getImageB()
Accessor that returns the reference to imageB.- Overrides:
getImageB
in classViewJFrameTriImage
- Returns:
- imageB
-
getLinkedTriFrame
public ViewJFrameTriImage getLinkedTriFrame()
Gets the linked ViewJFrameTriImage.- Overrides:
getLinkedTriFrame
in classViewJFrameTriImage
- Returns:
- linkedFrame
-
getParentFrame
public ViewJFrameImage getParentFrame()
Returns a reference to the ViewJFrameImage object that is the parent of this frame.- Overrides:
getParentFrame
in classViewJFrameTriImage
- Returns:
- a reference to the ViewJFrameImage object that is the parent of this frame
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed event method for KeyListener.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Overrides:
keyPressed
in classViewJFrameTriImage
- Parameters:
e
- KeyEvent
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased event method for KeyListener.- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
- Overrides:
keyReleased
in classViewJFrameTriImage
- Parameters:
e
- KeyEvent
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
- Overrides:
keyTyped
in classViewJFrameTriImage
- Parameters:
e
- DOCUMENT ME!
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
- Overrides:
mouseClicked
in classViewJFrameTriImage
- Parameters:
event
- DOCUMENT ME!
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
- Overrides:
mouseEntered
in classViewJFrameTriImage
- Parameters:
event
- DOCUMENT ME!
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
- Overrides:
mouseExited
in classViewJFrameTriImage
- Parameters:
event
- DOCUMENT ME!
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent evt)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classViewJFrameTriImage
- Parameters:
event
- DOCUMENT ME!
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent event)
DOCUMENT ME!- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classViewJFrameTriImage
- Parameters:
event
- DOCUMENT ME!
-
setActiveImage
public void setActiveImage(int active)
Set 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:
setActiveImage
in interfaceVOIManagerInterfaceListener
- Overrides:
setActiveImage
in classViewJFrameTriImage
- Parameters:
active
- ViewJComponentBase.IMAGE_A or ViewJComponentBase.IMAGE_B
-
setCenter
public void setCenter(int i, int j, int k)
sets the crosshair positions and slices for each of the triImages. The inputs are in FileCoordinates, and are passed to the triImages in FileCoordinates. Each triImage converts from FileCoordinates to the local PatientCoordinate space, based on the triImage orientation (FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL).- Overrides:
setCenter
in classViewJFrameTriImage
- Parameters:
i
- model space coordinatej
- model space coordinatek
- model space coordinate
-
setCenter
public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
- Specified by:
setCenter
in interfaceVOIManagerInterfaceListener
- Overrides:
setCenter
in classViewJFrameTriImage
-
setCenter
public void setCenter(int i, int j, int k, boolean checkLinkedScroll)
sets the crosshair positions and slices for each of the triImages. The inputs are in FileCoordinates, and are passed to the triImages in FileCoordinates. Each triImage converts from FileCoordinates to the local PatientCoordinate space, based on the triImage orientation (FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL).- Overrides:
setCenter
in classViewJFrameTriImage
- Parameters:
i
- model space coordinatej
- model space coordinatek
- model space coordinatecheckLinkedScroll
- (boolean telling whether to look for linked images to sync scroll... necessary to avoid infinite loop)
-
setEnabled
public void setEnabled(boolean flag)
Controls whether or not the images/VOIs of the frame can be modified.- Overrides:
setEnabled
in classViewJFrameTriImage
- Parameters:
flag
- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageA
public void setImageA(ModelImage image)
Changes imageA to a new model image reference. Swaps the references in the frame and all the component images.- Overrides:
setImageA
in classViewJFrameTriImage
- Parameters:
image
- the new image to use
-
setImageB
public void setImageB(ModelImage _imageB)
Accessor that sets the reference to imageB. Includes changing the frame's reference and the references the components keep.- Overrides:
setImageB
in classViewJFrameTriImage
- Parameters:
_imageB
- image to set the frame to
-
setImageB
public void setImageB(ModelImage _imageB, boolean disposeOldB)
Accessor that sets the reference to imageB. Includes changing the frame's reference and the references the components keep. UnlikesetImageB(ModelImage)
this method matches the functionality ofsetImageA(ModelImage)
- Overrides:
setImageB
in classViewJFrameTriImage
- Parameters:
_imageB
- image to set the frame to
-
setLUTa
public void setLUTa(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTa
in classViewJFrameTriImage
- Parameters:
LUT
- the LUT
-
setLUTb
public void setLUTb(ModelLUT LUT)
Accessor that sets the LUT.- Overrides:
setLUTb
in classViewJFrameTriImage
- Parameters:
LUT
- the LUT
-
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 Currenlty unused.- Overrides:
setPaintBitmapSwitch
in classViewJFrameTriImage
- Parameters:
paintBitmapSwitch
- if true don't do a getMask on the new actve image
-
setPaintColor
public void setPaintColor(java.awt.Color color)
Sets the color of the paint.- Overrides:
setPaintColor
in classViewJFrameTriImage
- Parameters:
color
- Color the desired color of the paint
-
setPositionLabels
public void setPositionLabels(int x, int y, int z)
Sets the labels which show the absolute position within the image volume and the patient position.- Overrides:
setPositionLabels
in classViewJFrameTriImage
- Parameters:
x
- the x volume coordinatey
- the y volume coordinatez
- the z volume coordinate
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.- Overrides:
setRGBTA
in classViewJFrameTriImage
- Parameters:
RGBT
- the new RGB transfer functions for imageA
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB table for image B.- Overrides:
setRGBTB
in classViewJFrameTriImage
- Parameters:
RGBT
- the new RGB transfer functions for imageB
-
setLinkButtonSelected
public void setLinkButtonSelected(boolean selected)
Sets whether the linking button should be set for this image, implies that this image will be linked to another tri-frame when true- Overrides:
setLinkButtonSelected
in classViewJFrameTriImage
-
setSlice
public void setSlice(int slice)
Does nothing.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Overrides:
setSlice
in classViewJFrameTriImage
- Parameters:
slice
- the slice to show
-
setSlices
public void setSlices(int x, int y, int z)
Sets the slice index for each plane in the frame and components. Should be zero indexed.- Overrides:
setSlices
in classViewJFrameTriImage
- Parameters:
x
- slice index in the patienty
- slice index in the patientz
- slice index in the patient
-
setSlicesFromFrame
public void setSlicesFromFrame(int x, int y, int z)
Called from the "normal" image component, sets the slices for the tri planar view to display. Parameters are in terms of the image volume and so must be converted.- Overrides:
setSlicesFromFrame
in classViewJFrameTriImage
- Parameters:
x
- X Slice of image.y
- Y Slice of image.z
- Z Slice of image.
-
setTimeSlice
public void setTimeSlice(int slice)
Sets the slice to be displayed and updates title frame.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Overrides:
setTimeSlice
in classViewJFrameTriImage
- Parameters:
slice
- indicates image time-slice (4th dimension) to be displayed
-
setTimeSlice
public void setTimeSlice(int slice, boolean checkedLinkedScroll)
Sets the slice to be displayed and updates title frame.- Overrides:
setTimeSlice
in classViewJFrameTriImage
- Parameters:
slice
- indicates image time-slice (4th dimension) to be displayedcheckedLinkedScroll
- whether corresponding tri-frames should also be scrolled
-
setTitle
public void setTitle()
Sets the title bar for the tri-image frame. Called for initialization and updating. Displays time series location for 4D volumes.- Overrides:
setTitle
in classViewJFrameTriImage
-
setTraverseButton
public void setTraverseButton()
Sets the traverse button to selected.- Overrides:
setTraverseButton
in classViewJFrameTriImage
-
setVolumeCenter
public void setVolumeCenter(Point3D newVolumeCenter)
Sets the x coordinate of the point to be the center of the transformed image.- Overrides:
setVolumeCenter
in classViewJFrameTriImage
- Parameters:
newVolumeCenter
- The x coordinate of the center.
-
setVolumeCenter
public void setVolumeCenter(int x, int y, int z)
Sets the x coordinate of the point to be the center of the transformed image.- Overrides:
setVolumeCenter
in classViewJFrameTriImage
- Parameters:
x
- The x coordinate of the center.y
- DOCUMENT ME!z
- DOCUMENT ME!
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
Sets values based on knob along time slider.- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Overrides:
stateChanged
in classViewJFrameTriImage
- Parameters:
e
- Event that triggered this function
-
updateImageExtents
public boolean updateImageExtents()
Do nothing - required by ViewJFrameBase.- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Overrides:
updateImageExtents
in classViewJFrameTriImage
- Returns:
- always false
- See Also:
ViewImageUpdateInterface
-
updateImages
public boolean updateImages()
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Overrides:
updateImages
in classViewJFrameTriImage
- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow)
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Overrides:
updateImages
in classViewJFrameTriImage
- Parameters:
forceShow
- forces show to reimport image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean forceShow, int interpMode)
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Overrides:
updateImages
in classViewJFrameTriImage
- Parameters:
forceShow
- forces show to reimport image and calc. java imageinterpMode
-- 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.- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Overrides:
updateImages
in classViewJFrameTriImage
- Parameters:
LUTa
- LUT used to update imageALUTb
- LUT used to update imageBforceShow
- forces show to reimport image and calc. java imageinterpMode
- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming successful update
-
updateImageSubset
public void updateImageSubset(ViewJComponentTriImage triImage)
DOCUMENT ME!- Overrides:
updateImageSubset
in classViewJFrameTriImage
- Parameters:
triImage
- DOCUMENT ME!
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classViewJFrameTriImage
- Parameters:
event
- Event that triggered function
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent event)
Description copied from class:ViewJFrameBase
Does nothing.- Specified by:
windowOpened
in interfacejava.awt.event.WindowListener
- Overrides:
windowOpened
in classViewJFrameTriImage
- Parameters:
event
- the window event
-
buildActiveImagePanel
protected void buildActiveImagePanel()
Builds the active image panel for choosing which image (A, B, or BOTH) to perform operations on.- Overrides:
buildActiveImagePanel
in classViewJFrameTriImage
-
finalize
protected void finalize() throws java.lang.Throwable
DOCUMENT ME!- Overrides:
finalize
in classViewJFrameTriImage
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
adjustScrollbars
private void adjustScrollbars(int x, int y, javax.swing.JScrollPane scrollPane)
DOCUMENT ME!- Parameters:
x
- DOCUMENT ME!y
- DOCUMENT ME!scrollPane
- DOCUMENT ME!
-
zoomInFrame
protected void zoomInFrame(int frame)
this method will zoom in a particular frame.- Overrides:
zoomInFrame
in classViewJFrameTriImage
- Parameters:
frame
- frame the frame number
-
zoomOutFrame
protected void zoomOutFrame(int frame)
this method will zoom out a particular frame.- Overrides:
zoomOutFrame
in classViewJFrameTriImage
- Parameters:
frame
- frame the frame number
-
getFrame
public javax.swing.JFrame getFrame()
- Specified by:
getFrame
in interfaceVOIManagerInterfaceListener
- Overrides:
getFrame
in classViewJFrameTriImage
-
setCursor
public void setCursor(java.awt.Cursor kCursor)
- Specified by:
setCursor
in interfaceVOIManagerInterfaceListener
- Overrides:
setCursor
in classViewJFrameTriImage
-
invokeMeasure
public void invokeMeasure()
-
readMultlmodalImages
private void readMultlmodalImages()
File chooser to select target image directory.
-
readImages
private void readImages(java.io.File dir)
-
traverse
private void traverse(java.io.File file)
-
changeIcon
private void changeIcon(java.lang.String whiteCicleName, java.lang.String blackCircleName)
-
-