Package gov.nih.mipav.view
Class JPanelVolumeOpacity
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gov.nih.mipav.view.JPanelVolumeOpacity
- All Implemented Interfaces:
ViewJComponentVolOpacityListener,ActionListener,ItemListener,MouseListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener
public class JPanelVolumeOpacity
extends JPanel
implements ActionListener, ChangeListener, ItemListener, MouseListener, ViewJComponentVolOpacityListener
Simple panel containing the volume renderer opacity controls.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested 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 TypeFieldDescriptionprotected JSliderOpacity slider of texture 3D volume opacity changes.static final intComponent tag indicator.static final intComponent tag indicator.static final intComponent tag indicator.static final intComponent tag indicator.static final intComponent tag indicator.protected ViewJComponentVolOpacityBaseReference to component opacity control A.protected ViewJComponentVolOpacityBaseReference to component opacity control B.protected ViewJComponentVolOpacityBaseReference to component opacity control A GM Rescale.protected ViewJComponentVolOpacityBaseReference to component opacity control B GM Rescale.protected JCheckBoxGradient Magnitude Check box of the grey scale image.protected ModelImageModel image of the gradient magnitude of image A rescaled to have value in the range [0:255].protected ModelImageModel image of the gradient magnitude of image B rescaled to have value in the range [0:255].static final intComponent tag indicator.private ModelHistogramHistogram reference for image A.private ModelHistogramHistogram reference for image B.private ModelHistogramHistogram reference for imageA GM.private ModelHistogramHistogram reference for imageB GM.protected ModelImageModel image A.protected ModelImageModel image B.private booleanprivate booleanHistorgram dialog slider labels of the imageA, B and GM imageA, B.Historgram dialog slider labels of the imageA, B and GM imageA, B.Historgram dialog slider labels of the imageA, B and GM imageA, B.Historgram dialog slider labels of the imageA, B and GM imageA, B.protected JPanelThe main control.protected floatDOCUMENT ME!protected floatDOCUMENT ME!protected floatDOCUMENT ME!protected floatDOCUMENT ME!protected JSliderDOCUMENT ME!protected JSliderDOCUMENT ME!protected JSliderDOCUMENT ME!protected JSliderDOCUMENT ME!protected static final StringDOCUMENT ME!protected static final StringDOCUMENT ME!protected static final StringDOCUMENT ME!protected static final StringDOCUMENT ME!protected JLabel[]The labels below the opacity slider.protected JLabel[]The labels below the opacity slider.protected JLabel[]DOCUMENT ME!protected JLabel[]DOCUMENT ME!protected JPanelPanels that hold the the control components (opacity maps).protected JPanelDOCUMENT ME!protected JPanelDOCUMENT ME!protected JPanelDOCUMENT ME!protected JTextFieldX range text field in the imageA, B histogram dialog.protected JTextFieldX range text field in the imageA, B histogram dialog.protected JTextFieldX range text field in the Gradient Magnitude imageA, B histogram dialog.protected JTextFieldX range text field in the Gradient Magnitude imageA, B histogram dialog.static final intComponent tag indicator.protected floatScale range value according to the image min and max.protected floatScale range value according to the image min and max.protected floatScale range value according to the image min and max.protected floatScale range value according to the image min and max.private static final longUse serialVersionUID for interoperability.protected JTabbedPaneTabbed pane that contains the list of opacity functions.protected JTextFieldX range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldX range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldX range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldX range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldY range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldY range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldY range text field in the imageA, B and GM image A, B histogram dialog.protected JTextFieldY range text field in the imageA, B and GM image A, B histogram dialog.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_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionJPanelVolumeOpacity(ModelImage _imgA, ModelImage _imgB) Creates new dialog for converting type of image.JPanelVolumeOpacity(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM) Creates new dialog for converting type of image.JPanelVolumeOpacity(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM, boolean _simpleDisplay) -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the OK button is pressed and sets the variables.voidaddGM()Add the gradient magnitude histogram to the opacity control panel.protected JPanelBuild the blend slider control panel.private voidMethod that displays the histogram and controls to manipulate the opacity.private voidMethod that displays the histogram and controls to manipulate the opacity.private voidMethod that displays the histogram and controls to manipulate the opacity.private voidMethod that displays the histogram and controls to manipulate the opacity.private ModelHistogramcalcHistogram(ModelImage image, int dim, int channel) Calculates histogram for the imageA, B.voidClear memory and garbage collection.protected voidfinalize()Calls dispose.intThis function returns the value of the blending slider.getCompA()Return the opacity histrogram component of the imageA.Return the opacity histrogram component of the Gradient Magnitude imageA.getCompB()Return the opacity histrogram component of the imageB.Return the opacity histrogram component of the Gradient Magnitude imageB.Get the gradient magnitude imageA.Get the gradient magnitude imageB.Accessor that returns the imageA.Accessor that returns the image.Build the hash table for the imageA opacity slider.Build the hash table for the imageB opacity slider.Build the hash table for the imageA GM opacity slider.Build the hash table for the imageA GM opacity slider.Sets up the GUI (panels, buttons, etc) and displays it on the screen.Return the selected tabbbed pane component.getSelectedComponent(int _whichComp) Return the active image component.intReturns the index of the selected panel in the tabbed pane.Accessor to the tabbed pane.protected voidInitialize the blend slider labels.private voidinitialize(boolean simpleDisplay) Sets up the GUI (panels, buttons, etc) and displays it on the screen.booleanbooleanReturn whether or not the opacity mapping based on gradient magnitude is enabled.voiditemStateChanged(ItemEvent event) Sets the flags for the checkboxes.private booleanloadGM()Calculates histogram for the gradient magnitude imageA, B.protected booleanloadGMImage(String dName, String fName, boolean isImageA) Loads the gradient magnitude image instead of recalculating the image.voidmouseClicked(MouseEvent event) Not used method.voidmouseEntered(MouseEvent event) Not used method.voidmouseExited(MouseEvent event) Not used method.voidmousePressed(MouseEvent event) Not used method.voidmouseReleased(MouseEvent event) Mouse release event.voidremoveGM()Add the gradient magnitude hitogram to the opacity control panel.voidresizePanel(int panelWidth, int frameHeight) Resize the control panel when mouse drag expanding or minimizing the frame.voidsetAdjustersEnabled(boolean enabled) This method will enable or disable the opacity panel's slider component and input text fields, based on the value of the boolean parameter passed into it.voidsetAlphaBlendSliderValue(int iValue) Sets the blendSlider value.voidsetGradientMagnitudeOpacityEnabled(boolean value) Return whether or not the opacity mapping based on gradient magnitude is enabled.voidsetImages(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM, boolean _simpleDisplay) voidsetSelectedTabIndex(int i) Sets the tabbed pane selected panel based on the input index.voidstateChanged(ChangeEvent event) ChangeListener for opacity slider changes.voidupdate(boolean isChanging) voidupdateSlider(ViewJComponentVolOpacityBase childComponent) Adjust the opacity slider for the minor opacity changes.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
histogramA
Histogram reference for image A. -
histogramB
Histogram reference for image B. -
histogramGM_A
Histogram reference for imageA GM. -
histogramGM_B
Histogram reference for imageB GM. -
isActiveImage
private boolean isActiveImage -
mainPanel
The main control. -
COMP_A
public static final int COMP_AComponent tag indicator.- See Also:
-
COMP_B
public static final int COMP_BComponent tag indicator.- See Also:
-
COMP_GM_A
public static final int COMP_GM_AComponent tag indicator.- See Also:
-
COMP_GM_B
public static final int COMP_GM_BComponent tag indicator.- See Also:
-
OPACITY_COMPONENT_TAB_A
DOCUMENT ME!- See Also:
-
OPACITY_COMPONENT_TAB_B
DOCUMENT ME!- See Also:
-
OPACITY_COMPONENT_TAB_A_GM
DOCUMENT ME!- See Also:
-
OPACITY_COMPONENT_TAB_B_GM
DOCUMENT ME!- See Also:
-
RED
public static final int REDComponent tag indicator.- See Also:
-
GREEN
public static final int GREENComponent tag indicator.- See Also:
-
BLUE
public static final int BLUEComponent tag indicator.- See Also:
-
blendSlider
Opacity slider of texture 3D volume opacity changes. -
componentOpacityA
Reference to component opacity control A. -
componentOpacityB
Reference to component opacity control B. -
componentOpacityGM_A
Reference to component opacity control A GM Rescale. -
componentOpacityGM_B
Reference to component opacity control B GM Rescale. -
GMCheckBox
Gradient Magnitude Check box of the grey scale image. -
gradMagRescale_A
Model image of the gradient magnitude of image A rescaled to have value in the range [0:255]. -
gradMagRescale_B
Model image of the gradient magnitude of image B rescaled to have value in the range [0:255]. -
imageA
Model image A. -
imageB
Model image B. -
labelsTable
Historgram dialog slider labels of the imageA, B and GM imageA, B. -
labelsTableB
Historgram dialog slider labels of the imageA, B and GM imageA, B. -
labelsTableGM_A
Historgram dialog slider labels of the imageA, B and GM imageA, B. -
labelsTableGM_B
Historgram dialog slider labels of the imageA, B and GM imageA, B. -
middleLabelValueA
protected float middleLabelValueADOCUMENT ME! -
middleLabelValueB
protected float middleLabelValueBDOCUMENT ME! -
middleLabelValueGM_A
protected float middleLabelValueGM_ADOCUMENT ME! -
middleLabelValueGM_B
protected float middleLabelValueGM_BDOCUMENT ME! -
mouseSlider
DOCUMENT ME! -
mouseSliderB
DOCUMENT ME! -
mouseSliderGM_A
DOCUMENT ME! -
mouseSliderGM_B
DOCUMENT ME! -
opacitySliderLabelsA
The labels below the opacity slider. -
opacitySliderLabelsB
The labels below the opacity slider. -
opacitySliderLabelsGM_A
DOCUMENT ME! -
opacitySliderLabelsGM_B
DOCUMENT ME! -
panelOpacityA
Panels that hold the the control components (opacity maps). -
panelOpacityB
DOCUMENT ME! -
panelOpacityGM_A
DOCUMENT ME! -
panelOpacityGM_B
DOCUMENT ME! -
rangeText
X range text field in the imageA, B histogram dialog. -
rangeTextB
X range text field in the imageA, B histogram dialog. -
rangeTextGM_A
X range text field in the Gradient Magnitude imageA, B histogram dialog. -
rangeTextGM_B
X range text field in the Gradient Magnitude imageA, B histogram dialog. -
scaleRangeA
protected float scaleRangeAScale range value according to the image min and max. -
scaleRangeB
protected float scaleRangeBScale range value according to the image min and max. -
scaleRangeGM_A
protected float scaleRangeGM_AScale range value according to the image min and max. -
scaleRangeGM_B
protected float scaleRangeGM_BScale range value according to the image min and max. -
tabbedPane
Tabbed pane that contains the list of opacity functions. -
xRangeTextA
X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
xRangeTextB
X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
xRangeTextGM_A
X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
xRangeTextGM_B
X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
yRangeTextA
Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
yRangeTextB
Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
yRangeTextGM_A
Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
yRangeTextGM_B
Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view. -
isChanging
private boolean isChanging
-
-
Constructor Details
-
JPanelVolumeOpacity
Creates new dialog for converting type of image.- Parameters:
_imgA- Source imageA._imgB- Source imageB.
-
JPanelVolumeOpacity
public JPanelVolumeOpacity(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM) Creates new dialog for converting type of image.- Parameters:
_imgA- Source imageA._imgB- Source imageB.
-
JPanelVolumeOpacity
public JPanelVolumeOpacity(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM, boolean _simpleDisplay)
-
-
Method Details
-
actionPerformed
Closes dialog box when the OK button is pressed and sets the variables.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- Event that triggers this function
-
addGM
public void addGM()Add the gradient magnitude histogram to the opacity control panel. -
disposeLocal
public void disposeLocal()Clear memory and garbage collection. -
getAlphaBlendSliderValue
public int getAlphaBlendSliderValue()This function returns the value of the blending slider.- Returns:
- int the value of the slider, or a default of 50 (the median value) if the slider has not been initialized
-
getCompA
Return the opacity histrogram component of the imageA.- Returns:
- componentOpacityA opacity component A.
-
getCompA_GM
Return the opacity histrogram component of the Gradient Magnitude imageA.- Returns:
- componentOpacityGM_A gradient magnitude component A.
-
getCompB
Return the opacity histrogram component of the imageB.- Returns:
- componentOpacityB opacity component B.
-
getCompB_GM
Return the opacity histrogram component of the Gradient Magnitude imageB.- Returns:
- componentOpacityGM_B gradient magnitude component B.
-
getGradMagA
Get the gradient magnitude imageA.- Returns:
- ModelImage GM imageA
-
getGradMagB
Get the gradient magnitude imageB.- Returns:
- ModelImage GM imageB
-
getImageA
Accessor that returns the imageA.- Returns:
- image
-
getImageB
Accessor that returns the image.- Returns:
- image
-
getMainPanel
Sets up the GUI (panels, buttons, etc) and displays it on the screen. Change the layout of the volume opacity change diagram.- Returns:
- DOCUMENT ME!
-
getSelectedComponent
Return the selected tabbbed pane component. Should be overridden in JPanelVolOpacity and JPanelVolOpacityRGB- Returns:
- ViewJComponentHLUTBase the opacity component.
-
getSelectedComponent
Return the active image component.- Parameters:
_whichComp- true = imageA, false = imageB- Returns:
- componentOpacity A or B.
-
getSelectedTabIndex
public int getSelectedTabIndex()Returns the index of the selected panel in the tabbed pane.- Returns:
-
getTabbedPane
Accessor to the tabbed pane.- Returns:
- JTabbedPane
-
isChanging
public boolean isChanging() -
isGradientMagnitudeOpacityEnabled
public boolean isGradientMagnitudeOpacityEnabled()Return whether or not the opacity mapping based on gradient magnitude is enabled.- Returns:
- boolean True if using gradient magnitude-based opacity mapping.
-
itemStateChanged
Sets the flags for the checkboxes.- Specified by:
itemStateChangedin interfaceItemListener- Parameters:
event- event that triggered this function
-
mouseClicked
Not used method.- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
event- MouseEvent
-
mouseEntered
Not used method.- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
event- MouseEvent
-
mouseExited
Not used method.- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
event- MouseEvent
-
mousePressed
Not used method.- Specified by:
mousePressedin interfaceMouseListener- Parameters:
event- MouseEvent
-
mouseReleased
Mouse release event.- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
event- MouseEvent
-
removeGM
public void removeGM()Add the gradient magnitude hitogram to the opacity control panel. -
resizePanel
public void resizePanel(int panelWidth, int frameHeight) Resize the control panel when mouse drag expanding or minimizing the frame.- Parameters:
panelWidth- widthframeHeight- height
-
setAdjustersEnabled
public void setAdjustersEnabled(boolean enabled) This method will enable or disable the opacity panel's slider component and input text fields, based on the value of the boolean parameter passed into it.- Specified by:
setAdjustersEnabledin interfaceViewJComponentVolOpacityListener- Parameters:
enabled- boolean whether the adjusters should be enabled or disabled
-
setAlphaBlendSliderValue
public void setAlphaBlendSliderValue(int iValue) Sets the blendSlider value.- Parameters:
iValue- new slider value.
-
setGradientMagnitudeOpacityEnabled
public void setGradientMagnitudeOpacityEnabled(boolean value) Return whether or not the opacity mapping based on gradient magnitude is enabled. -
setSelectedTabIndex
public void setSelectedTabIndex(int i) Sets the tabbed pane selected panel based on the input index.- Parameters:
i-
-
stateChanged
ChangeListener for opacity slider changes.- Specified by:
stateChangedin interfaceChangeListener- Parameters:
event- The change event.
-
update
public void update(boolean isChanging) - Specified by:
updatein interfaceViewJComponentVolOpacityListener
-
updateSlider
Adjust the opacity slider for the minor opacity changes.- Specified by:
updateSliderin interfaceViewJComponentVolOpacityListener- Parameters:
childComponent- ViewJComponentVolOpacityBase reference
-
buildBlendPanel
Build the blend slider control panel.- Returns:
- blendPanel built blend panel.
-
finalize
Calls dispose. -
getLabelTableA
Build the hash table for the imageA opacity slider.- Returns:
- labels built label hash table.
-
getLabelTableB
Build the hash table for the imageB opacity slider.- Returns:
- labels built label hash table.
-
getLabelTableGM_A
Build the hash table for the imageA GM opacity slider.- Returns:
- labels built label hash table.
-
getLabelTableGM_B
Build the hash table for the imageA GM opacity slider.- Returns:
- labels built label hash table.
-
initBlendSliderLabels
protected void initBlendSliderLabels()Initialize the blend slider labels. -
loadGMImage
Loads the gradient magnitude image instead of recalculating the image.- Parameters:
dName- String User specified directory name.fName- String GM image file name.isImageA- boolean Indicates GM imageA or GM imageB- Returns:
- boolean Indicates loading GM image successful or not.
-
buildPanelA
private void buildPanelA()Method that displays the histogram and controls to manipulate the opacity. Panel for image A. -
buildPanelB
private void buildPanelB()Method that displays the histogram and controls to manipulate the opacity. Panel for image B. Reset the layout. -
buildPanelGM_A
private void buildPanelGM_A()Method that displays the histogram and controls to manipulate the opacity. Panel for image GM_A. -
buildPanelGM_B
private void buildPanelGM_B()Method that displays the histogram and controls to manipulate the opacity. Panel for image GM_B. -
calcHistogram
Calculates histogram for the imageA, B. -
setImages
public void setImages(ModelImage _imgA, ModelImage _imgB, ModelImage _imageAGM, ModelImage _imageBGM, boolean _simpleDisplay) -
initialize
private void initialize(boolean simpleDisplay) Sets up the GUI (panels, buttons, etc) and displays it on the screen. Change the layout of the volume opacity change diagram. -
loadGM
private boolean loadGM()Calculates histogram for the gradient magnitude imageA, B.
-