Package gov.nih.mipav.view.dialogs
Class JDialogMaximumIntensityProjection
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.JDialogMaximumIntensityProjection
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,DialogDefaultsInterface,ActionDiscovery,ViewImageUpdateInterface,ActionListener,FocusListener,ItemListener,KeyListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
public class JDialogMaximumIntensityProjection
extends JDialogScriptableBase
implements ActionDiscovery, AlgorithmInterface, ChangeListener, KeyListener, ViewImageUpdateInterface
Dialog to call Maximum Intensity Projection. It should be noted that algorithms are executed in own thread.
The Maximum Intensity Projection algorithm computes the maximum or the minimum intensity along each projection of a 3D image.
The user can specify theshold values in image intensity for the calculation, as well as
which projection to compute along (X, Y, or Z), the start and end slice used in the calculation,
the size of a sliding 'window' in number of slices to use in the calculation, and whether to calculate the minimum,
maximum or both projections.
When the sliding window size is not equal to the number of slices used in the calculation the output is a 3D image,
where each slice of the output image is computed using the number of slices in the sliding window. When the
sliding window size is equal to the number of slices used in the calculation the output image is a 2D image.
- Author:
- joshim2
- 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 intCached value of selected tabprivate intUsed for construction of the preview.private intUsed for construction of the preview.private booleanWhether preview mode is turned on.private int[]Value of the end slice for the calculation (X,Y,Z).private int[]Image extents.private ModelImageSource Image.private intUsed for construction of the preview.private boolean[]When true, calculate the maximum (X,Y,Z) slices.private JCheckBox[]CheckBox turns on/off calculating the maximum projection.private JTextField[]JTextfield for maximum value of threshold.private JTextField[]JTextfield for maximum Blue value of threshold.private JTextField[]JTextfield for maximum Green value of threshold.private JTextField[]JTextfield for maximum Red value of threshold.private float[]Maximum intensity threshold.private float[]Maximum Blue intensity threshold.private float[]Maximum Green intensity threshold.private float[]Maximum Red intensity threshold.private ModelImageSingle slice preview imagesprivate ViewJFrameImageWindows containing preview imagesprivate boolean[]When true, calculate the minimum (X,Y,Z) slices.private JCheckBox[]CheckBox turns on/off calculating the minimum projection.private JTextField[]JTextfield for minimum value of threshold.private JTextField[]JTextfield for minimum Blue value of threshold.private JTextField[]JTextfield for minimum Green value of threshold.private JTextField[]JTextfield for minimum Red value of threshold.private float[]Minimum intensity threshold.private float[]Minimum Blue intensity threshold.private float[]Minimum Green intensity threshold.private float[]Minimum Red intensity threshold.private ModelImageSingle slice preview imagesprivate ViewJFrameImageWindows containing preview imagesprivate intImage dimension, must be 3.private static final Stringprivate static final Stringprivate static final Stringprivate boolean[]When true output the X,Y,Z projections.private static final longUse serialVersionUID for interoperability.private intCurrent slice of imageprivate intUsed for construction of the preview.private intUsed for construction of the preview.private JTextField[]JTextfield for start slice of the computation.private int[]Value of the start slice for the calculation (X,Y,Z).private JTextField[]JTextfield for end slice of the computation.private JTabbedPaneThe tabbed pane that holds each dimensionprivate int[]Value of the window size for the calculation (X,Y,Z).private JLabel[]Label displays the number of slices in the sliding window.private ViewJSlider[]Slider enables user to change the size of the sliding window.Fields 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 dynamic instantiation (used during scripting).JDialogMaximumIntensityProjection(Frame theParentFrame, ModelImage im) Sets the appropriate variables. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes Dialog box when the OK button is pressed and calls the algorithm.voidalgorithmPerformed(AlgorithmBase algorithm) This method is required if the AlgorithmPerformed interface is implemented.voidCalls the algorithm.Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in).invalid reference
#setGUIFromParams()Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).private voidprotected JTextFielddetermineNull(JTextField min, JTextField max) When one of the text inputs has been left blank, trying to convert them to ints results in throwing a null pointer exception.voidUnchanged.Return meta-information about this discoverable action for categorization and labeling purposes.private doublegetCurrentVal(double[] buffer) getOutputImageName(String imageParamName) Returns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).private int[]private intprivate voidinit()Initializes the GUI components and places them in dialog.private voidinitData()Allocates local memory.private voidprivate voidbooleanReturns whether the action has successfully completed its execution.voidvoidvoidprivate voidPreviews the currently active slice would loosely go with either min or max sliding window.voidsetComputeMax(int i, boolean compute) Turns computing the maximum projection on for X, Y, or Z processing.voidsetComputeMin(int i, boolean compute) Turns computing the minimum projection on for X, Y, or Z processing.voidsetEndSlice(int i, int end) Sets the end slice for X, Y, or Z processing.protected voidSet the dialog GUI using the script parameters while running this algorithm as part of a script.voidsetMax(int i, float x) Sets the maximum value for X, Y, or Z processing.voidsetMaxB(int i, float maxB) Sets the maximumBlue value for X, Y, or Z processing.voidsetMaxG(int i, float maxG) Sets the maximum Green value for X, Y, or Z processing.voidsetMaxR(int i, float maxR) Sets the maximum Red value for X, Y, or Z processing.voidsetMin(int i, float x) Sets the minimum value for X, Y, or Z processing.voidsetMinB(int i, float minB) Sets the minimum Blue value for X, Y, or Z processing.voidsetMinG(int i, float minG) Sets the minimum Green value for X, Y, or Z processing.voidsetMinR(int i, float minR) Sets the minimum Red value for X, Y, or Z processing.voidsetSlice(int slice) setSlice.voidsetStartSlice(int i, int start) Sets the start slice for X, Y, or Z processing.voidsetTimeSlice(int tSlice) setTimeSlice.private booleanUse the GUI results to set up the variables needed to run the algorithm.voidsetWindow(int i, int size) Sets the window size for X, Y, or Z processing.voidprotected voidRecord the parameters just used to run this algorithm in a script.booleanThis methods calls the componentImage's REPAINT method to redraw the screen.booleanThis 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.Methods 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, 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, windowClosing, 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gov.nih.mipav.view.dialogs.ActionDiscovery
scriptRun
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
PREVIEW
- See Also:
-
PREV_ON
- See Also:
-
PREV_OFF
- See Also:
-
image
Source Image. -
minInput
JTextfield for minimum value of threshold. -
maxInput
JTextfield for maximum value of threshold. -
startInput
JTextfield for start slice of the computation. -
stopInput
JTextfield for end slice of the computation. -
minIntensity
private float[] minIntensityMinimum intensity threshold. -
maxIntensity
private float[] maxIntensityMaximum intensity threshold. -
minInputR
JTextfield for minimum Red value of threshold. -
maxInputR
JTextfield for maximum Red value of threshold. -
minInputG
JTextfield for minimum Green value of threshold. -
maxInputG
JTextfield for maximum Green value of threshold. -
minInputB
JTextfield for minimum Blue value of threshold. -
maxInputB
JTextfield for maximum Blue value of threshold. -
minIntensityR
private float[] minIntensityRMinimum Red intensity threshold. -
maxIntensityR
private float[] maxIntensityRMaximum Red intensity threshold. -
minIntensityG
private float[] minIntensityGMinimum Green intensity threshold. -
maxIntensityG
private float[] maxIntensityGMaximum Green intensity threshold. -
minIntensityB
private float[] minIntensityBMinimum Blue intensity threshold. -
maxIntensityB
private float[] maxIntensityBMaximum Blue intensity threshold. -
maximumCheck
CheckBox turns on/off calculating the maximum projection. -
minimumCheck
CheckBox turns on/off calculating the minimum projection. -
windowLabel
Label displays the number of slices in the sliding window. -
windowSlider
Slider enables user to change the size of the sliding window. -
maximum
private boolean[] maximumWhen true, calculate the maximum (X,Y,Z) slices. -
minimum
private boolean[] minimumWhen true, calculate the minimum (X,Y,Z) slices. -
startSlice
private int[] startSliceValue of the start slice for the calculation (X,Y,Z). -
endSlice
private int[] endSliceValue of the end slice for the calculation (X,Y,Z). -
window
private int[] windowValue of the window size for the calculation (X,Y,Z). -
projection
private boolean[] projectionWhen true output the X,Y,Z projections. -
nDims
private int nDimsImage dimension, must be 3. -
extents
private int[] extentsImage extents. -
minSlicePreview
Single slice preview images -
maxSlicePreview
Single slice preview images -
tabbedPane
The tabbed pane that holds each dimension -
minSliceWindow
Windows containing preview images -
maxSliceWindow
Windows containing preview images -
cachedTab
private int cachedTabCached value of selected tab -
slice
private int sliceCurrent slice of image -
doPreview
private boolean doPreviewWhether preview mode is turned on. -
dim
private int dimUsed for construction of the preview. -
sliceSize
private int sliceSizeUsed for construction of the preview. -
index
private int indexUsed for construction of the preview. -
sliceLoc
private int sliceLocUsed for construction of the preview. -
cFactor
private int cFactorUsed for construction of the preview.
-
-
Constructor Details
-
JDialogMaximumIntensityProjection
public JDialogMaximumIntensityProjection()Empty constructor needed for dynamic instantiation (used during scripting). -
JDialogMaximumIntensityProjection
Sets the appropriate variables.- Parameters:
theParentFrame- Parent frame.im- Source image.
-
-
Method Details
-
actionPerformed
Closes Dialog box when the OK button is pressed and calls the algorithm.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- event that triggers function
-
getPreviewExtents
private int[] getPreviewExtents() -
getPreviewImageType
private int getPreviewImageType() -
initMinPreview
private void initMinPreview() -
initMaxPreview
private void initMaxPreview() -
populatePreview
private void populatePreview()Previews the currently active slice would loosely go with either min or max sliding window. Current slice isthis.slice -
getCurrentVal
private double getCurrentVal(double[] buffer) - Parameters:
buffer- image buffer- Returns:
- map of location in image buffer to resulting location in MIP.
-
algorithmPerformed
This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to complete, so that the dialog can display the result image and/or clean up.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- Algorithm that caused the event.
-
callAlgorithm
public void callAlgorithm()Calls the algorithm.- Specified by:
callAlgorithmin classJDialogScriptableBase
-
determineNull
When one of the text inputs has been left blank, trying to convert them to ints results in throwing a null pointer exception. This method determines which one of the JTextFields threw the null pointer Exception.- Parameters:
min- one of the JTextFields the threw the null exception.max- one of the JTextFields the threw the null exception.- Returns:
- either min or max.
-
setMin
public void setMin(int i, float x) Sets the minimum value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)x- Value to set minimum value to.
-
setMax
public void setMax(int i, float x) Sets the maximum value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)x- Value to set maximum value to.
-
setMinR
public void setMinR(int i, float minR) Sets the minimum Red value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)minR- Value to set minimum Red value to.
-
setMaxR
public void setMaxR(int i, float maxR) Sets the maximum Red value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)maxR- Value to set maximum Red value to.
-
setMinG
public void setMinG(int i, float minG) Sets the minimum Green value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)minG- Value to set minimum Green value to.
-
setMaxG
public void setMaxG(int i, float maxG) Sets the maximum Green value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)maxG- Value to set maximum Green value to.
-
setMinB
public void setMinB(int i, float minB) Sets the minimum Blue value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)minB- Value to set minimum Blue value to.
-
setMaxB
public void setMaxB(int i, float maxB) Sets the maximumBlue value for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)maxB- Value to set maximum Blue value to.
-
setStartSlice
public void setStartSlice(int i, int start) Sets the start slice for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)start- value.
-
setEndSlice
public void setEndSlice(int i, int end) Sets the end slice for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)end- value.
-
setWindow
public void setWindow(int i, int size) Sets the window size for X, Y, or Z processing.- Parameters:
i- index (X, Y, or Z)size- , new window size.
-
setComputeMax
public void setComputeMax(int i, boolean compute) Turns computing the maximum projection on for X, Y, or Z processing.- Parameters:
i- index representing (X,Y,Z) projection.compute- when true the computation is turned on.
-
setComputeMin
public void setComputeMin(int i, boolean compute) Turns computing the minimum projection on for X, Y, or Z processing.- Parameters:
i- index representing (X,Y,Z) projection.compute- when true the computation is turned on.
-
setGUIFromParams
protected void setGUIFromParams()Set the dialog GUI using the script parameters while running this algorithm as part of a script.- Specified by:
setGUIFromParamsin classJDialogScriptableBase
-
storeParamsFromGUI
Record the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUIin classJDialogScriptableBase- Throws:
ParserException- If there is a problem creating/recording the new parameters.
-
initData
private void initData()Allocates local memory. -
init
private void init()Initializes the GUI components and places them in dialog. -
setVariables
private boolean setVariables()Use the GUI results to set up the variables needed to run the algorithm.- Returns:
trueif parameters set successfully,falseotherwise.
-
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
destroyPreview
private void destroyPreview() -
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
focusLost
Description copied from class:JDialogBaseUnchanged.- Specified by:
focusLostin interfaceFocusListener- Overrides:
focusLostin classJDialogBase- Parameters:
e- FocusEvent
-
getActionMetadata
Description copied from interface:ActionDiscoveryReturn meta-information about this discoverable action for categorization and labeling purposes.- Specified by:
getActionMetadatain interfaceActionDiscovery- Returns:
- Metadata for this action.
-
createInputParameters
Description copied from interface:ActionDiscoveryReturns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in).invalid reference
#setGUIFromParams()- Specified by:
createInputParametersin interfaceActionDiscovery- Returns:
- A parameter table listing the inputs of this algorithm.
-
createOutputParameters
Description copied from interface:ActionDiscoveryReturns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).- Specified by:
createOutputParametersin interfaceActionDiscovery- Returns:
- A parameter table listing the outputs of this algorithm.
-
getOutputImageName
Description copied from interface:ActionDiscoveryReturns the name of an image output by this algorithm, the image returned depends on the parameter label given (which can be used to retrieve the image object from the image registry).- Specified by:
getOutputImageNamein interfaceActionDiscovery- Parameters:
imageParamName- The output image parameter label for which to get the image name.- Returns:
- The image name of the requested output image parameter label.
-
isActionComplete
public boolean isActionComplete()Description copied from interface:ActionDiscoveryReturns whether the action has successfully completed its execution.- Specified by:
isActionCompletein interfaceActionDiscovery- Returns:
- True, if the action is complete. False, if the action failed or is still running.
-
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
-
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
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
-