Package gov.nih.mipav.view.dialogs
Class JDialogConvert4DtoRGB
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.dialogs.JDialogBase
gov.nih.mipav.view.dialogs.JDialogScriptableBase
gov.nih.mipav.view.dialogs.JDialogConvert4DtoRGB
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
- Author:
- pandyan This class converts 4D datasets that have 3 or less 4th dim slices to an RGB image
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelImageblank imageprivate static final StringBLANK Stringprivate static final StringBLUE CHANNEL Stringprivate JComboBox[]corresponding dropdown for each channel imageprivate ModelImage[]extraced 3D Model Images from src imageprivate ButtonGroupprivate booleanprivate booleanWhether all info in the image's FileInfo is copiedprivate JCheckBoxCheckbox for representing whether to copy all file infoprivate intARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT for color imageprivate int[]extents for extracted 3D subsetprivate static final StringGREEN CHANNEL Stringprivate ModelImagesrc imageprivate ModelImageblue channel imageprivate ModelImagegreen channel imageprivate ModelImagered channel imageprivate JPanelinput panel of dialogprivate JPanelmain panel of dialogprivate AlgorithmRGBConcatref to AlgorithmRGBConcatprivate JPanelok/cancel panel of dialogprivate JRadioButtonprivate JRadioButtonDOCUMENT ME!private JRadioButtonprivate JRadioButtonDOCUMENT ME!private JRadioButtonprivate JRadioButtonprivate static final StringRED CHANNEL Stringprivate JCheckBoxre-map checkboxprivate ButtonGroupprivate floatprivate booleanboolean for remapprivate ModelImageresult imageprivate AlgorithmSubsetref to AlgorithmSubsetprivate JTextFieldprivate Stringvol 1 channel for scriptingprivate Stringvol 2 channel for scriptingprivate Stringvol 3 channel for scriptinprivate intnum x slices of src imageprivate intnum y slices of src imageprivate intnum z slices for src imageFields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParametersFields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionEmpty Constructor (needed for scripting)JDialogConvert4DtoRGB(Frame theParentFrame, ModelImage image) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAction performedvoidalgorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented.protected voidCall Algorithm.....calls the RGBConcat algorithmvoidmethod that extracts 3D subsets from the 4D datasetvoidfinalize()finalizevoidinit()initvoidAccessor that sets the Blue Image Source.voidsetCommonMapping(boolean commonMapping) voidsetDataType(int dataType) Accessor that sets whether color image type is ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOATvoidAccessor that sets the Green Image Source.protected voidset GUI...for scriptingvoidAccessor that sets the Green Image Source.voidsetRemapHighestValue(float remapHighestValue) voidsetRemapMode(boolean flag) Accessor that sets the remap mode.booleanset variablesvoidsetVol1Channel(String vol1Channel) set vol1ChannelvoidsetVol2Channel(String vol2Channel) set vol2ChannelvoidsetVol3Channel(String vol3Channel) set vol3Channelprotected voidstore params...for scriptingvoidwindowClosing(WindowEvent event) window closingMethods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
doPostAlgorithmActions, getDialogActionString, insertScriptLine, isComplete, scriptRun, setCompleteMethods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, 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, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
image
src image -
destExtents
private int[] destExtentsextents for extracted 3D subset -
xSlices
private int xSlicesnum x slices of src image -
ySlices
private int ySlicesnum y slices of src image -
zSlices
private int zSlicesnum z slices for src image -
channelImages
extraced 3D Model Images from src image -
channelColorsComboBoxes
corresponding dropdown for each channel image -
subsetAlgo
ref to AlgorithmSubset -
mainPanel
main panel of dialog -
inputPanel
input panel of dialog -
OKCancelPanel
ok/cancel panel of dialog -
remapCheckBox
re-map checkbox -
imageB
blue channel image -
imageG
green channel image -
imageR
red channel image -
resultImage
result image -
remapMode
private boolean remapModeboolean for remap -
mathAlgo
ref to AlgorithmRGBConcat -
blank
blank image -
vol1Channel
vol 1 channel for scripting -
vol2Channel
vol 2 channel for scripting -
vol3Channel
vol 3 channel for scriptin -
RED_CHANNEL
RED CHANNEL String- See Also:
-
GREEN_CHANNEL
GREEN CHANNEL String- See Also:
-
BLUE_CHANNEL
BLUE CHANNEL String- See Also:
-
BLANK
BLANK String- See Also:
-
radioARGB
-
radioARGB_FLOAT
DOCUMENT ME! -
radioARGB_USHORT
DOCUMENT ME! -
radioARGB_UINTEGER
-
colorGroup
-
dataType
private int dataTypeARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT for color image -
remapGroup
-
radioCommon
-
radioSeparate
-
commonMapping
private boolean commonMapping -
textRemap
-
remapHighestValue
private float remapHighestValue -
copyAllInfoBox
Checkbox for representing whether to copy all file info -
copyAllInfo
private boolean copyAllInfoWhether all info in the image's FileInfo is copied
-
-
Constructor Details
-
JDialogConvert4DtoRGB
public JDialogConvert4DtoRGB()Empty Constructor (needed for scripting) -
JDialogConvert4DtoRGB
Constructor- Parameters:
image-theFrame-
-
-
Method Details
-
init
public void init()init -
extract3DSubsets
public void extract3DSubsets()method that extracts 3D subsets from the 4D dataset -
callAlgorithm
protected void callAlgorithm()Call Algorithm.....calls the RGBConcat algorithm- Specified by:
callAlgorithmin classJDialogScriptableBase
-
algorithmPerformed
This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- Algorithm that caused the event.
-
setGUIFromParams
protected void setGUIFromParams()set GUI...for scripting- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
store params...for scripting- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-
actionPerformed
Action performed- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase
-
setVariables
public boolean setVariables()set variables- Returns:
- boolean
-
setBlueImage
Accessor that sets the Blue Image Source.- Parameters:
im- image to set the Blue Image Source to.
-
setRedImage
Accessor that sets the Green Image Source.- Parameters:
im- image to set the Green Image Source to.
-
setGreenImage
Accessor that sets the Green Image Source.- Parameters:
im- image to set the Green Image Source to.
-
setVol1Channel
set vol1Channel- Parameters:
vol1Channel-
-
setVol2Channel
set vol2Channel- Parameters:
vol2Channel-
-
setVol3Channel
set vol3Channel- Parameters:
vol3Channel-
-
setDataType
public void setDataType(int dataType) Accessor that sets whether color image type is ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT- Parameters:
dataType-
-
setRemapMode
public void setRemapMode(boolean flag) Accessor that sets the remap mode.- Parameters:
flag-trueindicates remap data.
-
setCommonMapping
public void setCommonMapping(boolean commonMapping) - Parameters:
commonMapping-
-
setRemapHighestValue
public void setRemapHighestValue(float remapHighestValue) - Parameters:
remapHighestValue-
-
finalize
public void finalize()finalize -
windowClosing
window closing- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJDialogBase- Parameters:
event- WindowEvent
-