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
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.KeyListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JDialogMaximumIntensityProjection extends JDialogScriptableBase implements ActionDiscovery, AlgorithmInterface, javax.swing.event.ChangeListener, java.awt.event.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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private int
cachedTab
Cached value of selected tabprivate int
cFactor
Used for construction of the preview.private int
dim
Used for construction of the preview.private boolean
doPreview
Whether preview mode is turned on.private int[]
endSlice
Value of the end slice for the calculation (X,Y,Z).private int[]
extents
Image extents.private ModelImage
image
Source Image.private int
index
Used for construction of the preview.private boolean[]
maximum
When true, calculate the maximum (X,Y,Z) slices.private javax.swing.JCheckBox[]
maximumCheck
CheckBox turns on/off calculating the maximum projection.private javax.swing.JTextField[]
maxInput
JTextfield for maximum value of threshold.private javax.swing.JTextField[]
maxInputB
JTextfield for maximum Blue value of threshold.private javax.swing.JTextField[]
maxInputG
JTextfield for maximum Green value of threshold.private javax.swing.JTextField[]
maxInputR
JTextfield for maximum Red value of threshold.private float[]
maxIntensity
Maximum intensity threshold.private float[]
maxIntensityB
Maximum Blue intensity threshold.private float[]
maxIntensityG
Maximum Green intensity threshold.private float[]
maxIntensityR
Maximum Red intensity threshold.private ModelImage
maxSlicePreview
Single slice preview imagesprivate ViewJFrameImage
maxSliceWindow
Windows containing preview imagesprivate boolean[]
minimum
When true, calculate the minimum (X,Y,Z) slices.private javax.swing.JCheckBox[]
minimumCheck
CheckBox turns on/off calculating the minimum projection.private javax.swing.JTextField[]
minInput
JTextfield for minimum value of threshold.private javax.swing.JTextField[]
minInputB
JTextfield for minimum Blue value of threshold.private javax.swing.JTextField[]
minInputG
JTextfield for minimum Green value of threshold.private javax.swing.JTextField[]
minInputR
JTextfield for minimum Red value of threshold.private float[]
minIntensity
Minimum intensity threshold.private float[]
minIntensityB
Minimum Blue intensity threshold.private float[]
minIntensityG
Minimum Green intensity threshold.private float[]
minIntensityR
Minimum Red intensity threshold.private ModelImage
minSlicePreview
Single slice preview imagesprivate ViewJFrameImage
minSliceWindow
Windows containing preview imagesprivate int
nDims
Image dimension, must be 3.private static java.lang.String
PREV_OFF
private static java.lang.String
PREV_ON
private static java.lang.String
PREVIEW
private boolean[]
projection
When true output the X,Y,Z projections.private static long
serialVersionUID
Use serialVersionUID for interoperability.private int
slice
Current slice of imageprivate int
sliceLoc
Used for construction of the preview.private int
sliceSize
Used for construction of the preview.private javax.swing.JTextField[]
startInput
JTextfield for start slice of the computation.private int[]
startSlice
Value of the start slice for the calculation (X,Y,Z).private javax.swing.JTextField[]
stopInput
JTextfield for end slice of the computation.private javax.swing.JTabbedPane
tabbedPane
The tabbed pane that holds each dimensionprivate int[]
window
Value of the window size for the calculation (X,Y,Z).private javax.swing.JLabel[]
windowLabel
Label displays the number of slices in the sliding window.private ViewJSlider[]
windowSlider
Slider enables user to change the size of the sliding window.-
Fields inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
displayInNewFrame, isComplete, scriptParameters
-
Fields 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, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogMaximumIntensityProjection()
Empty constructor needed for dynamic instantiation (used during scripting).JDialogMaximumIntensityProjection(java.awt.Frame theParentFrame, ModelImage im)
Sets the appropriate variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
Closes Dialog box when the OK button is pressed and calls the algorithm.void
algorithmPerformed(AlgorithmBase algorithm)
This method is required if the AlgorithmPerformed interface is implemented.void
callAlgorithm()
Calls the algorithm.ParameterTable
createInputParameters()
Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in#setGUIFromParams()
).ParameterTable
createOutputParameters()
Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).private void
destroyPreview()
protected javax.swing.JTextField
determineNull(javax.swing.JTextField min, javax.swing.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.void
focusLost(java.awt.event.FocusEvent e)
Unchanged.ActionMetadata
getActionMetadata()
Return meta-information about this discoverable action for categorization and labeling purposes.private double
getCurrentVal(double[] buffer)
java.lang.String
getOutputImageName(java.lang.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[]
getPreviewExtents()
private int
getPreviewImageType()
private void
init()
Initializes the GUI components and places them in dialog.private void
initData()
Allocates local memory.private void
initMaxPreview()
private void
initMinPreview()
boolean
isActionComplete()
Returns whether the action has successfully completed its execution.void
keyPressed(java.awt.event.KeyEvent e)
void
keyReleased(java.awt.event.KeyEvent e)
void
keyTyped(java.awt.event.KeyEvent e)
private void
populatePreview()
Previews the currently active slice would loosely go with either min or max sliding window.void
setComputeMax(int i, boolean compute)
Turns computing the maximum projection on for X, Y, or Z processing.void
setComputeMin(int i, boolean compute)
Turns computing the minimum projection on for X, Y, or Z processing.void
setEndSlice(int i, int end)
Sets the end slice for X, Y, or Z processing.protected void
setGUIFromParams()
Set the dialog GUI using the script parameters while running this algorithm as part of a script.void
setMax(int i, float x)
Sets the maximum value for X, Y, or Z processing.void
setMaxB(int i, float maxB)
Sets the maximumBlue value for X, Y, or Z processing.void
setMaxG(int i, float maxG)
Sets the maximum Green value for X, Y, or Z processing.void
setMaxR(int i, float maxR)
Sets the maximum Red value for X, Y, or Z processing.void
setMin(int i, float x)
Sets the minimum value for X, Y, or Z processing.void
setMinB(int i, float minB)
Sets the minimum Blue value for X, Y, or Z processing.void
setMinG(int i, float minG)
Sets the minimum Green value for X, Y, or Z processing.void
setMinR(int i, float minR)
Sets the minimum Red value for X, Y, or Z processing.void
setSlice(int slice)
setSlice.void
setStartSlice(int i, int start)
Sets the start slice for X, Y, or Z processing.void
setTimeSlice(int tSlice)
setTimeSlice.private boolean
setVariables()
Use the GUI results to set up the variables needed to run the algorithm.void
setWindow(int i, int size)
Sets the window size for X, Y, or Z processing.void
stateChanged(javax.swing.event.ChangeEvent e)
protected void
storeParamsFromGUI()
Record the parameters just used to run this algorithm in a script.boolean
updateImageExtents()
This methods calls the componentImage's REPAINT method to redraw the screen.boolean
updateImages()
This methods calls the componentImage's REPAINT method to redraw the screen.boolean
updateImages(boolean flag)
This methods calls the componentImage's update method to redraw the screen.boolean
updateImages(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, setComplete
-
Methods 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, windowOpened
-
Methods 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, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, 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, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.view.dialogs.ActionDiscovery
scriptRun
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
PREVIEW
private static final java.lang.String PREVIEW
- See Also:
- Constant Field Values
-
PREV_ON
private static final java.lang.String PREV_ON
- See Also:
- Constant Field Values
-
PREV_OFF
private static final java.lang.String PREV_OFF
- See Also:
- Constant Field Values
-
image
private ModelImage image
Source Image.
-
minInput
private javax.swing.JTextField[] minInput
JTextfield for minimum value of threshold.
-
maxInput
private javax.swing.JTextField[] maxInput
JTextfield for maximum value of threshold.
-
startInput
private javax.swing.JTextField[] startInput
JTextfield for start slice of the computation.
-
stopInput
private javax.swing.JTextField[] stopInput
JTextfield for end slice of the computation.
-
minIntensity
private float[] minIntensity
Minimum intensity threshold.
-
maxIntensity
private float[] maxIntensity
Maximum intensity threshold.
-
minInputR
private javax.swing.JTextField[] minInputR
JTextfield for minimum Red value of threshold.
-
maxInputR
private javax.swing.JTextField[] maxInputR
JTextfield for maximum Red value of threshold.
-
minInputG
private javax.swing.JTextField[] minInputG
JTextfield for minimum Green value of threshold.
-
maxInputG
private javax.swing.JTextField[] maxInputG
JTextfield for maximum Green value of threshold.
-
minInputB
private javax.swing.JTextField[] minInputB
JTextfield for minimum Blue value of threshold.
-
maxInputB
private javax.swing.JTextField[] maxInputB
JTextfield for maximum Blue value of threshold.
-
minIntensityR
private float[] minIntensityR
Minimum Red intensity threshold.
-
maxIntensityR
private float[] maxIntensityR
Maximum Red intensity threshold.
-
minIntensityG
private float[] minIntensityG
Minimum Green intensity threshold.
-
maxIntensityG
private float[] maxIntensityG
Maximum Green intensity threshold.
-
minIntensityB
private float[] minIntensityB
Minimum Blue intensity threshold.
-
maxIntensityB
private float[] maxIntensityB
Maximum Blue intensity threshold.
-
maximumCheck
private javax.swing.JCheckBox[] maximumCheck
CheckBox turns on/off calculating the maximum projection.
-
minimumCheck
private javax.swing.JCheckBox[] minimumCheck
CheckBox turns on/off calculating the minimum projection.
-
windowLabel
private javax.swing.JLabel[] windowLabel
Label displays the number of slices in the sliding window.
-
windowSlider
private ViewJSlider[] windowSlider
Slider enables user to change the size of the sliding window.
-
maximum
private boolean[] maximum
When true, calculate the maximum (X,Y,Z) slices.
-
minimum
private boolean[] minimum
When true, calculate the minimum (X,Y,Z) slices.
-
startSlice
private int[] startSlice
Value of the start slice for the calculation (X,Y,Z).
-
endSlice
private int[] endSlice
Value of the end slice for the calculation (X,Y,Z).
-
window
private int[] window
Value of the window size for the calculation (X,Y,Z).
-
projection
private boolean[] projection
When true output the X,Y,Z projections.
-
nDims
private int nDims
Image dimension, must be 3.
-
extents
private int[] extents
Image extents.
-
minSlicePreview
private ModelImage minSlicePreview
Single slice preview images
-
maxSlicePreview
private ModelImage maxSlicePreview
Single slice preview images
-
tabbedPane
private javax.swing.JTabbedPane tabbedPane
The tabbed pane that holds each dimension
-
minSliceWindow
private ViewJFrameImage minSliceWindow
Windows containing preview images
-
maxSliceWindow
private ViewJFrameImage maxSliceWindow
Windows containing preview images
-
cachedTab
private int cachedTab
Cached value of selected tab
-
slice
private int slice
Current slice of image
-
doPreview
private boolean doPreview
Whether preview mode is turned on.
-
dim
private int dim
Used for construction of the preview.
-
sliceSize
private int sliceSize
Used for construction of the preview.
-
index
private int index
Used for construction of the preview.
-
sliceLoc
private int sliceLoc
Used for construction of the preview.
-
cFactor
private int cFactor
Used for construction of the preview.
-
-
Constructor Detail
-
JDialogMaximumIntensityProjection
public JDialogMaximumIntensityProjection()
Empty constructor needed for dynamic instantiation (used during scripting).
-
JDialogMaximumIntensityProjection
public JDialogMaximumIntensityProjection(java.awt.Frame theParentFrame, ModelImage im)
Sets the appropriate variables.- Parameters:
theParentFrame
- Parent frame.im
- Source image.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Closes Dialog box when the OK button is pressed and calls the algorithm.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in 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
public void algorithmPerformed(AlgorithmBase algorithm)
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:
algorithmPerformed
in interfaceAlgorithmInterface
- Parameters:
algorithm
- Algorithm that caused the event.
-
callAlgorithm
public void callAlgorithm()
Calls the algorithm.- Specified by:
callAlgorithm
in classJDialogScriptableBase
-
determineNull
protected javax.swing.JTextField determineNull(javax.swing.JTextField min, javax.swing.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. 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:
setGUIFromParams
in classJDialogScriptableBase
-
storeParamsFromGUI
protected void storeParamsFromGUI() throws ParserException
Record the parameters just used to run this algorithm in a script.- Specified by:
storeParamsFromGUI
in 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:
true
if parameters set successfully,false
otherwise.
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
destroyPreview
private void destroyPreview()
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased
in interfacejava.awt.event.KeyListener
-
focusLost
public void focusLost(java.awt.event.FocusEvent e)
Description copied from class:JDialogBase
Unchanged.- Specified by:
focusLost
in interfacejava.awt.event.FocusListener
- Overrides:
focusLost
in classJDialogBase
- Parameters:
e
- FocusEvent
-
getActionMetadata
public ActionMetadata getActionMetadata()
Description copied from interface:ActionDiscovery
Return meta-information about this discoverable action for categorization and labeling purposes.- Specified by:
getActionMetadata
in interfaceActionDiscovery
- Returns:
- Metadata for this action.
-
createInputParameters
public ParameterTable createInputParameters()
Description copied from interface:ActionDiscovery
Returns a table listing the input parameters of this algorithm (which should match up with the scripting parameters used in#setGUIFromParams()
).- Specified by:
createInputParameters
in interfaceActionDiscovery
- Returns:
- A parameter table listing the inputs of this algorithm.
-
createOutputParameters
public ParameterTable createOutputParameters()
Description copied from interface:ActionDiscovery
Returns a table listing the output parameters of this algorithm (usually just labels used to obtain output image names later).- Specified by:
createOutputParameters
in interfaceActionDiscovery
- Returns:
- A parameter table listing the outputs of this algorithm.
-
getOutputImageName
public java.lang.String getOutputImageName(java.lang.String imageParamName)
Description copied from interface:ActionDiscovery
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).- Specified by:
getOutputImageName
in 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:ActionDiscovery
Returns whether the action has successfully completed its execution.- Specified by:
isActionComplete
in 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:ViewImageUpdateInterface
setSlice.- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- Current slice
-
setTimeSlice
public void setTimeSlice(int tSlice)
Description copied from interface:ViewImageUpdateInterface
setTimeSlice.- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
tSlice
- Current time volume
-
updateImageExtents
public boolean updateImageExtents()
Description copied from interface:ViewImageUpdateInterface
This 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:
updateImageExtents
in interfaceViewImageUpdateInterface
- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages()
Description copied from interface:ViewImageUpdateInterface
This methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean flag)
Description copied from interface:ViewImageUpdateInterface
This methods calls the componentImage's update method to redraw the screen. Without LUT changes.- Specified by:
updateImages
in 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:ViewImageUpdateInterface
This methods calls the componentImage's update method to redraw the screen.- Specified by:
updateImages
in 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
-
-