Package gov.nih.mipav.view
Class JFrameHistogram
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- gov.nih.mipav.view.JFrameHistogram
-
- All Implemented Interfaces:
ViewImageUpdateInterface,java.awt.event.ActionListener,java.awt.event.WindowListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.event.ChangeListener
public class JFrameHistogram extends javax.swing.JPanel implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, ViewImageUpdateInterface, java.awt.event.WindowListener
Lookup table interface for either grayscale or color (RGB) images. Either one or two images can be combined in a frame, and this LUT interface enables the user to apply a color look-up table to the images. Each image is treated separately, with an individual interface in a separate tabbed pane. The images can be grayscale, color, or a combination (one grayscale, one RGB).- See Also:
JPanelHistogram, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description private ViewJFrameColocalizationEMcolEMFramereference to the colocalization frame for updatng the image.private ViewJFrameColocalizationRegressioncolRegFramereference to the colocalization frame for updatng the image.private javax.swing.JFramecontainingFrameframe containing the lut interface (if display in a stand-alone window)private javax.swing.JPanelcontainingPanelpanel containing the lut interface (used in the stand-alone frame or in an outside frame)protected booleandualImageset to true when the lut interface contains two images (imageA and imageB)protected ModelImageimageAsource image Aprotected ModelImageimageBsource image Bprotected ModelStorageBaseLUTalut aprotected ModelStorageBaseLUTblut bprotected ViewMenuBuildermenuObjmenu builderprotected JPanelHistogrampanelAhistogram interface panels for imageA and imageBprotected JPanelHistogrampanelBhistogram interface panels for imageA and imageBprivate java.awt.FrameparentFrameParent frame of this dialog, usually of type ViewJFrameImage.protected ViewJComponentRegistrationregComponentfalse = apply algorithm only to VOI regions.private static longserialVersionUIDprotected javax.swing.JTabbedPanetabbedPanetabbed pane, each separate tab contains the interface for imageA and imageBprivate booleanuseSeparateFrameWhether this panel is contained in another frame or forms its own frameprivate javax.swing.JDialogvoiDialogDialog that enables the user to choose to apply the lut to the entire image, or voi regions.protected booleanwholeImagetrue = apply algorithm to the whole image-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JFrameHistogram(java.awt.Frame theParentFrame, ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)Creates the JFrameHistogram class.JFrameHistogram(java.awt.Frame theParentFrame, ViewJComponentRegistration _regComponent, ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)Creates the JFrameHistogram class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)private voidbuildMenu(javax.swing.JFrame frame)This method builds a menu which contains the options for opening/saving a LUT or set of transfer functions, closing the LUT, and utilities such as CT presets.voidcloseFrame()Closes the stand-alone interface frame.voidcloseImageB()Closes imageB and removes the tabbed-pane interface, replacing it with a single interface panel.voidconstructDialog(boolean separateFrame)Creates a dialog to choose if histogram should be over all of image or just VOI regions.protected javax.swing.JPanelcreatePanel()Creates the display panel.protected voidcreatePanel(boolean simple)voiddisposeLocal()Removes this from the image display listeners.booleandoCalcThresholdVolume()Returns true if 'Calculate threshold volume' is selected.javax.swing.JPanelgetContainingPanel()Returns the main interface panel for display in another interface.floatgetLowerThreshold()Returns the lower threshold image value for whichever image is current selected.JPanelHistogramgetSelectedPanel()Returns the currently selected interface panel.floatgetUpperThreshold()Returns the upper threshold image value for whichever image is current selected.voidhistogramLUT(boolean entireFlag, boolean separateFrame)Creates the user interface for LUT changes.voidhistogramLUT(boolean entireFlag, boolean separateFrame, boolean simple)booleanisImageASelected()Returns whether the imageA LUT panel is currently visible and active.booleanisImageBSelected()Returns whether the imageB LUT panel is currently visible and activebooleanisThresholding()Returns true if image A or B is in dual threshold inverse mode (for JDialogConvertType input ranges).private voidprocessFileMenu(java.lang.String command)Called when the FileMenu is activated.private voidprocessUtilitiesMenu(java.awt.event.ActionEvent event, java.lang.String command)Called when the Utilities Menu is activated.voidredrawFrames()Redraws the histogram interface for the currently selected image.voidresizePanel(int panelWidth, int frameHeight)Resizing the control panel with ViewJFrameVolumeView's frame width and height.voidsetActiveImage(ModelImage image)Sets which image is currently active and makes the corresponding tabbed pane visible.voidsetBlueOn(boolean isOn, boolean isImageA)Sets the blue flag to be on or off.voidsetColocalizationEMFrame(ViewJFrameColocalizationEM colocalizationEMFrame)Called from ViewJFrameColocalizationEM.voidsetColocalizationRegFrame(ViewJFrameColocalizationRegression colocalizationRegFrame)Called from ViewJFrameColocalizationRegression.voidsetGreenOn(boolean isOn, boolean isImageA)Sets the green flag to be on or off.voidsetImageB(ModelImage image, ModelStorageBase LUT)Sets the imageB for the LUT interface.voidsetImages(ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)voidsetLUT(JPanelHistogram panel, ModelStorageBase LUT)Sets the LUT for the input panel.voidsetLUTA(ModelStorageBase LUT)Set LUTavoidsetLUTB(ModelStorageBase LUT)Set LUTbvoidsetRedOn(boolean isOn, boolean isImageA)Sets the red flag to be on or off.voidsetSlice(int slice)setSlice.voidsetTimeSlice(int tSlice)setTimeSlice.voidsetTransferFunctionA(TransferFunction txFunction)Set the transfer function for imageA.voidsetTransferFunctionB(TransferFunction txFunction)Set the transfer function for imageA.voidstateChanged(javax.swing.event.ChangeEvent event)voidupdateFrames(boolean flag)booleanupdateImageExtents()This methods calls the componentImage's REPAINT method to redraw the screen.booleanupdateImages()This methods calls the componentImage's REPAINT method to redraw the screen.booleanupdateImages(boolean flag)This methods calls the componentImage's update method to redraw the screen.booleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)This methods calls the componentImage's update method to redraw the screen.voidupdateInterpolation()updates the interpolation mode for the images.voidupdateRealTime(boolean updateRealTime)Updates the interface behavior when the user choses to update in real-time or on mouse release.voidwindowActivated(java.awt.event.WindowEvent arg0)voidwindowClosed(java.awt.event.WindowEvent arg0)voidwindowClosing(java.awt.event.WindowEvent arg0)voidwindowDeactivated(java.awt.event.WindowEvent arg0)voidwindowDeiconified(java.awt.event.WindowEvent arg0)voidwindowIconified(java.awt.event.WindowEvent arg0)voidwindowOpened(java.awt.event.WindowEvent arg0)-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
colEMFrame
private ViewJFrameColocalizationEM colEMFrame
reference to the colocalization frame for updatng the image.
-
colRegFrame
private ViewJFrameColocalizationRegression colRegFrame
reference to the colocalization frame for updatng the image.
-
imageA
protected ModelImage imageA
source image A
-
imageB
protected ModelImage imageB
source image B
-
LUTa
protected ModelStorageBase LUTa
lut a
-
LUTb
protected ModelStorageBase LUTb
lut b
-
regComponent
protected ViewJComponentRegistration regComponent
false = apply algorithm only to VOI regions.
-
wholeImage
protected boolean wholeImage
true = apply algorithm to the whole image
-
parentFrame
private java.awt.Frame parentFrame
Parent frame of this dialog, usually of type ViewJFrameImage.
-
voiDialog
private javax.swing.JDialog voiDialog
Dialog that enables the user to choose to apply the lut to the entire image, or voi regions.
-
containingFrame
private javax.swing.JFrame containingFrame
frame containing the lut interface (if display in a stand-alone window)
-
containingPanel
private javax.swing.JPanel containingPanel
panel containing the lut interface (used in the stand-alone frame or in an outside frame)
-
dualImage
protected boolean dualImage
set to true when the lut interface contains two images (imageA and imageB)
-
menuObj
protected ViewMenuBuilder menuObj
menu builder
-
tabbedPane
protected javax.swing.JTabbedPane tabbedPane
tabbed pane, each separate tab contains the interface for imageA and imageB
-
panelA
protected JPanelHistogram panelA
histogram interface panels for imageA and imageB
-
panelB
protected JPanelHistogram panelB
histogram interface panels for imageA and imageB
-
useSeparateFrame
private boolean useSeparateFrame
Whether this panel is contained in another frame or forms its own frame
-
-
Constructor Detail
-
JFrameHistogram
public JFrameHistogram(java.awt.Frame theParentFrame, ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)Creates the JFrameHistogram class. Initializes the images and LUTs, does not create the interface until the constructDialog() function is called, which asks the user if the luts should be applied to the VOI region or to the entire image, or until the histogramLUT() function is called to create the frame and interface panels.- Parameters:
theParentFrame-imA- imageAimB- imageB_LUTa- lutA (either ModelLUT or ModelRGB)_LUTb- lutb (either ModelLUT or ModelRGB)
-
JFrameHistogram
public JFrameHistogram(java.awt.Frame theParentFrame, ViewJComponentRegistration _regComponent, ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)Creates the JFrameHistogram class. Initializes the images and LUTs, does not create the interface until the constructDialog() function is called, which asks the user if the luts should be applied to the VOI region or to the entire image, or until the histogramLUT() function is called to create the frame and interface panels.- Parameters:
theParentFrame-_regComponent- registration component image to update on lut changes.imA- imageAimB- imageB_LUTa- lutA (either ModelLUT or ModelRGB)_LUTb- lutb (either ModelLUT or ModelRGB)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
closeFrame
public void closeFrame()
Closes the stand-alone interface frame.
-
closeImageB
public void closeImageB()
Closes imageB and removes the tabbed-pane interface, replacing it with a single interface panel.
-
constructDialog
public void constructDialog(boolean separateFrame)
Creates a dialog to choose if histogram should be over all of image or just VOI regions.
-
disposeLocal
public void disposeLocal()
Removes this from the image display listeners. Removes and deletes the interface panels.
-
doCalcThresholdVolume
public boolean doCalcThresholdVolume()
Returns true if 'Calculate threshold volume' is selected.- Returns:
- true if 'Calculate threshold volume' is selected, false otherwise.
-
getContainingPanel
public javax.swing.JPanel getContainingPanel()
Returns the main interface panel for display in another interface.- Returns:
- the main interface panel for display in another interface.
-
getLowerThreshold
public float getLowerThreshold()
Returns the lower threshold image value for whichever image is current selected.- Returns:
- the lower threshold image value for whichever image is current selected.
-
getSelectedPanel
public JPanelHistogram getSelectedPanel()
Returns the currently selected interface panel.- Returns:
- the currently selected interface panel.
-
getUpperThreshold
public float getUpperThreshold()
Returns the upper threshold image value for whichever image is current selected.- Returns:
- the upper threshold image value for whichever image is current selected.
-
setImages
public void setImages(ModelImage imA, ModelImage imB, ModelStorageBase _LUTa, ModelStorageBase _LUTb)
-
histogramLUT
public void histogramLUT(boolean entireFlag, boolean separateFrame)Creates the user interface for LUT changes. The entieFlag indicates if the entire image is to be used in the histogram calculation and LUT change, or if only the VOI regions are to be used. The separateFrame flag indicates if the interface is to be displayed in a stand-along window or inside another outside interface.- Parameters:
entireFlag- when true apply the LUT to the entire image, when false apply to VOI regions only.separateFrame- when true create and display the LUT interface in a separate, stand-alone window, when false create the interface for display in another outside frame or panel.
-
histogramLUT
public void histogramLUT(boolean entireFlag, boolean separateFrame, boolean simple)
-
isImageASelected
public boolean isImageASelected()
Returns whether the imageA LUT panel is currently visible and active.- Returns:
- whether the imageA LUT panel is currently visible and active.
-
isImageBSelected
public boolean isImageBSelected()
Returns whether the imageB LUT panel is currently visible and active. *- Returns:
- whether the imageB LUT panel is currently visible and active.
-
isThresholding
public boolean isThresholding()
Returns true if image A or B is in dual threshold inverse mode (for JDialogConvertType input ranges).- Returns:
- boolean is dual threshold inverse mode.
-
redrawFrames
public void redrawFrames()
Redraws the histogram interface for the currently selected image.
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight)Resizing the control panel with ViewJFrameVolumeView's frame width and height.- Parameters:
panelWidth- panel width.frameHeight- parent frame height.
-
setActiveImage
public void setActiveImage(ModelImage image)
Sets which image is currently active and makes the corresponding tabbed pane visible.- Parameters:
image- the image to set as currently active.
-
setBlueOn
public void setBlueOn(boolean isOn, boolean isImageA)Sets the blue flag to be on or off.- Parameters:
isOn- flag, either on or off.isImageA- when true apply to imageA, when false apply to imageB.
-
setColocalizationEMFrame
public void setColocalizationEMFrame(ViewJFrameColocalizationEM colocalizationEMFrame)
Called from ViewJFrameColocalizationEM. Enables LUT changes to be applied to that frame.- Parameters:
colocalizationEMFrame-
-
setColocalizationRegFrame
public void setColocalizationRegFrame(ViewJFrameColocalizationRegression colocalizationRegFrame)
Called from ViewJFrameColocalizationRegression. Enables LUT changes to be applied to that frame.- Parameters:
colocalizationEMFrame-
-
setGreenOn
public void setGreenOn(boolean isOn, boolean isImageA)Sets the green flag to be on or off.- Parameters:
isOn- flag, either on or off.isImageA- when true apply to imageA, when false apply to imageB.
-
setImageB
public void setImageB(ModelImage image, ModelStorageBase LUT)
Sets the imageB for the LUT interface. If the interface is not currently a dual-panel interface, it is re-created with the tabbed pane and two interface panels.- Parameters:
image-LUT-
-
setLUT
public void setLUT(JPanelHistogram panel, ModelStorageBase LUT)
Sets the LUT for the input panel.- Parameters:
panel- the panel to set the LUT for.LUT- the new LUT.
-
setLUTA
public void setLUTA(ModelStorageBase LUT)
Set LUTa- Parameters:
LUT-
-
setLUTB
public void setLUTB(ModelStorageBase LUT)
Set LUTb- Parameters:
LUT-
-
setRedOn
public void setRedOn(boolean isOn, boolean isImageA)Sets the red flag to be on or off.- Parameters:
isOn- flag, either on or off.isImageA- when true apply to imageA, when false apply to imageB.
-
setSlice
public void setSlice(int slice)
Description copied from interface:ViewImageUpdateInterfacesetSlice.- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- Current slice
-
setTimeSlice
public void setTimeSlice(int tSlice)
Description copied from interface:ViewImageUpdateInterfacesetTimeSlice.- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
tSlice- Current time volume
-
setTransferFunctionA
public void setTransferFunctionA(TransferFunction txFunction)
Set the transfer function for imageA.- Parameters:
txFunction-
-
setTransferFunctionB
public void setTransferFunctionB(TransferFunction txFunction)
Set the transfer function for imageA.- Parameters:
txFunction-
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent event)
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
-
updateFrames
public void updateFrames(boolean flag)
- Parameters:
flag-
-
updateImageExtents
public boolean updateImageExtents()
Description copied from interface:ViewImageUpdateInterfaceThis 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- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages()
Description copied from interface:ViewImageUpdateInterfaceThis methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean flag)
Description copied from interface:ViewImageUpdateInterfaceThis methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImagesin interfaceViewImageUpdateInterface- 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 flag, int interpMode)
Description copied from interface:ViewImageUpdateInterfaceThis 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 imageBflag- forces show to re import image and calc. java imageinterpMode- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming a successful update
-
updateInterpolation
public void updateInterpolation()
updates the interpolation mode for the images.
-
updateRealTime
public void updateRealTime(boolean updateRealTime)
Updates the interface behavior when the user choses to update in real-time or on mouse release.- Parameters:
updateRealTime-
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent arg0)
- Specified by:
windowActivatedin interfacejava.awt.event.WindowListener
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent arg0)
- Specified by:
windowClosedin interfacejava.awt.event.WindowListener
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent arg0)
- Specified by:
windowClosingin interfacejava.awt.event.WindowListener
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent arg0)
- Specified by:
windowDeactivatedin interfacejava.awt.event.WindowListener
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent arg0)
- Specified by:
windowDeiconifiedin interfacejava.awt.event.WindowListener
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent arg0)
- Specified by:
windowIconifiedin interfacejava.awt.event.WindowListener
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent arg0)
- Specified by:
windowOpenedin interfacejava.awt.event.WindowListener
-
buildMenu
private void buildMenu(javax.swing.JFrame frame)
This method builds a menu which contains the options for opening/saving a LUT or set of transfer functions, closing the LUT, and utilities such as CT presets.
-
createPanel
protected javax.swing.JPanel createPanel()
Creates the display panel. If there are two images the panel contains a tabbed pane with the two interfaces panels. If there is only one image the panel contains just the interface.- Returns:
- the new display panel.
-
createPanel
protected void createPanel(boolean simple)
-
processFileMenu
private void processFileMenu(java.lang.String command)
Called when the FileMenu is activated. Processes the commands from the file menu.- Parameters:
command- the file menu command.
-
processUtilitiesMenu
private void processUtilitiesMenu(java.awt.event.ActionEvent event, java.lang.String command)Called when the Utilities Menu is activated. Processes the commands from the utilities menu.- Parameters:
command- the utilities menu command.
-
-