Package gov.nih.mipav.view.dialogs
Class JDialogVOIStatistics
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.JDialogVOIStatistics
- All Implemented Interfaces:
AlgorithmInterface,ScriptableActionInterface,VOIVectorListener,VOIStatisticList,DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
public class JDialogVOIStatistics
extends JDialogScriptableBase
implements AlgorithmInterface, VOIStatisticList, VOIVectorListener
Dialog for calculating statistics of a (set of) Volumes of Interest. User selects a Volume of Interest (or more than
one) to act on, selects the statistics from a selectable checklist panel. The User selects "Calculate"; the output
from the statistics is reported in a "log-panel" and may be sent to a file.
$Logfile: /mipav/src/gov/nih/mipav/view/dialogs/JDialogVOIStatistics.java $
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclasscontrollas the lists between left and right side.classFile-format options panel to select output format for the display of the statistics output file.classPanel holding all statistics options and allowing the user-selection.classAn active listener for VOIEvents and ListSelectionEvents, this class will ensure the selected state of the VOI and its name in a dialog's list is the same.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 intPanel to push/pull VOIs from full list to selectable list.private static final intFile handler output mode - append.protected AlgorithmVOIPropsDOCUMENT ME!protected JPanelStatisticsListPanel holding statistics options.protected boolean[]boolean array mirroring checkbox panel's selection.private booleanprivate booleanforce precision to display at maximum.protected JTabbedPaneTabbed pane that holds all components.private JPanelFileSelectionPanel to select files.Operator to provide listener access... could be done by /this/protected ModelImageGlobal image reference to the currently active image during script running and recording.private intprotected static final intLogging Tab.private StringBufferThe text of the log process to be written to file.protected ViewTableModelModel where data is stored for the table.private JTableTable holding log of statistics calculated.private final booleanFlag wheretruemeans notifying the user of stupid errors.Panel holding statistics output options.private static final intFile handler output mode - overwriteBox.private JCheckBoxMenuItemCheck box item indicating if we're to always overwriteBox the statistics file.private intNumber of digits after decimal place to allow.private ViewVOIVectorprotected intDOCUMENT ME!private floatDOCUMENT ME!private floatprivate floatprivate floatprivate floatDOCUMENT ME!private floatprivate floatprivate floatWhen running as a script, holds the pixel exclusion range.protected JListList of selected VOIs.private static final longUse serialVersionUID for interoperability.protected booleanDOCUMENT ME!protected static final intStatistics Tab.private AlgorithmSubsetprivate ModelImageprivate FileLog file destination.private intIndicates options for OVERWRITE, APPEND for the xlat file.private intprotected JToolBarToolbar.protected ViewUserInterfaceIcon and log access.protected static final intVOI Tab.private final JListList of available VOIs.protected intThe units printed to the logModel, set in createNewLogileprotected intThe units printed to the logModel, set in createNewLogileprotected intThe units printed to the logModel, set in createNewLogileFields 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 gov.nih.mipav.model.structures.VOIStatisticList
areaDescription, asymmetryIndexDescription, avgIntensity, axisDescription, circularityDescription, deviationDescription, eccentricityDescription, fractalDimensionBoxCountDescription, fractalDimensionEuclideanDistanceDescription, geometricCenterDescription, invariantMoment1Description, invariantMoment2Description, invariantMoment3Description, invariantMoment4Description, invariantMoment5Description, invariantMoment6Description, invariantMoment7Description, kurtosisDescription, largestDistanceDescription, largestSliceDistanceDescription, majorAxisDescription, massCenterDescription, maxIntensity, maxWidthDescription, meanCurvatureDescription, meanNegativeCurvatureDescription, median, minIntensity, minorAxisDescription, mode, modeCount, numberOfIndentationsCurvatureDescription, numberOfIndentationsHullDescription, numberOfStatistics, perimeterDescription, quantityDescription, skewnessDescription, solidityDescription, statisticDescription, stdDevCurvatureDescription, sumIntensities, surfaceAreaDescription, volumeDescriptionFields 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.JDialogVOIStatistics(ModelImage srcImage, VOIVector voiList) builds and packs the frame. does not set it visible.JDialogVOIStatistics(VOIVector voiList) builds and packs the frame. does not set it visible. -
Method Summary
Modifier and TypeMethodDescriptionvoidwhen a button is clicked.voidaddedVOI(VOIVectorEvent voiEvent) resets the volumes list to the current VOIVector. adds the highlighter to the new VOI.voidalgorithmPerformed(AlgorithmBase event) the standard thread-done event forAlgorithmBase.private voidprotected voidprotected voidbuildDialog(VOIVector voiList) Builds main dialog.protected JScrollPanecreates a panel for the output log.protected JMenuBarBuilds a small menu with "Clear log" and "Overwrite" options.protected JPanelcreates the panel which consists of the OKAY button and the Cancel button.private JPanelcreates the visual display in which to list all selected directories in the directory tree.private JPanelbuildSourceListingPanel(VOIVector VOIlist) Creates the panel holding the directory tree.private JPanelbuildSourcePanel(VOIVector VOIlist) creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.protected voidBuild the toolbar control.protected JPanelbuildVOIPanel(VOIVector VOIlist) creates the source panel for the VOI tab which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.protected voidOnce all the necessary variables are set, call the VOI Props algorithm to run the statistic calculation.protected voidClean up some things done by the dialog which may affect other parts of MIPAV.protected voidThis method resets the logModel in preparation for writing new statistics valuesprotected voidUsed to perform actions after the execution of the algorithm is completed (e.g., put the result image in the image table).private booleanchecks to see if the checklist has had any selections made to it.private booleanLocates the translation/key-file destination directory.voidrefreshVOIList(VOIVector VOIlist) Refreshes the list of available and selected VOIs.voidremovedVOI(VOIVectorEvent voiEvent) resets the volumes list to the current VOIVector. removes the highlighter from the removed VOI.protected voidSet the dialog GUI using the script parameters while running this algorithm as part of a script.private Filemakes the submitted directory as given by the inputted File, or the text as given in the given given textField.private booleanuse the GUI results to set up the variables needed to run the algorithm.protected voidRecord the parameters just used to run this algorithm in a script.protected voidMethod for updating the GUI after the algorithm has completed, should not be called when scripting.protected voidupdateDialogRow(VOI voi, Vector<VOIBase>[] contours, VOIStatisticalProperties properties, ListModel list, int i, String[] rowData, String[] totalData) Writes the statistic data for contoursprotected String[]updateRowStatistics(VOI voi, VOIStatisticalProperties properties, String[] rowData, String[] totalData, String end, int count) Writes general statistics data for any VOI structure given a valid "end" modifier to specify the property being fetched.protected voidMethod for updating the table after the algorithm has completed.voidvectorSelected(VOIVectorEvent voiEvent) un-implemented.protected voidWrites the column titles of selected statistics calculations to the logModel.protected StringBufferConverts the current logModel into either a tab-delimited text file or an XML file.protected voidWrites out the statistics file based on the current logModelMethods inherited from class gov.nih.mipav.view.dialogs.JDialogScriptableBase
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, 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, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
VOI_TAB
protected static final int VOI_TABVOI Tab.- See Also:
-
STAT_TAB
protected static final int STAT_TABStatistics Tab.- See Also:
-
LOG_TAB
protected static final int LOG_TABLogging Tab.- See Also:
-
APPEND
private static final int APPENDFile handler output mode - append.- See Also:
-
OVERWRITE
private static final int OVERWRITEFile handler output mode - overwriteBox.- See Also:
-
addremove
Panel to push/pull VOIs from full list to selectable list. -
calculator
DOCUMENT ME! -
checkBoxPanel
Panel holding statistics options. -
checkList
protected boolean[] checkListboolean array mirroring checkbox panel's selection. -
doForce
private boolean doForceforce precision to display at maximum. -
everything
Tabbed pane that holds all components. -
fileSelectorPanel
Panel to select files. -
highlighter
Operator to provide listener access... could be done by /this/ -
image
Global image reference to the currently active image during script running and recording. -
logFileText
The text of the log process to be written to file. -
logModel
Model where data is stored for the table. -
logTable
Table holding log of statistics calculated. -
noisyProcess
private final boolean noisyProcessFlag wheretruemeans notifying the user of stupid errors.- See Also:
-
outputOptionsPanel
Panel holding statistics output options. -
overwriteBox
Check box item indicating if we're to always overwriteBox the statistics file. -
precision
private int precisionNumber of digits after decimal place to allow. -
processType
protected int processTypeDOCUMENT ME! -
activeVolume
private int activeVolume -
initialActiveVolume
private int initialActiveVolume -
tDim
private int tDim -
subsetAlgo
-
subsetImage
-
doAllVolumes
private boolean doAllVolumes -
processList
-
r
-
rangeMaximum
private float rangeMaximumDOCUMENT ME! -
rangeMinimum
private float rangeMinimumDOCUMENT ME! -
rangeMaximumR
private float rangeMaximumR -
rangeMinimumR
private float rangeMinimumR -
rangeMaximumG
private float rangeMaximumG -
rangeMinimumG
private float rangeMinimumG -
rangeMaximumB
private float rangeMaximumB -
rangeMinimumB
private float rangeMinimumB -
selectedList
List of selected VOIs. -
showTotals
protected boolean showTotalsDOCUMENT ME! -
tableDestination
Log file destination. -
tableDestinationUsage
private int tableDestinationUsageIndicates options for OVERWRITE, APPEND for the xlat file. -
toolBar
Toolbar. -
userInterface
Icon and log access. -
volumesList
List of available VOIs. -
xUnits
protected int xUnitsThe units printed to the logModel, set in createNewLogile -
yUnits
protected int yUnitsThe units printed to the logModel, set in createNewLogile -
zUnits
protected int zUnitsThe units printed to the logModel, set in createNewLogile -
scriptRange
When running as a script, holds the pixel exclusion range.
-
-
Constructor Details
-
JDialogVOIStatistics
public JDialogVOIStatistics()Empty constructor needed for dynamic instantiation. -
JDialogVOIStatistics
builds and packs the frame. does not set it visible.install the panels of source directory, destination directory, the checkbox for approving the translation-table file and the panel containing the ok and cancel buttons. Installs the checkbox panel.
- Parameters:
voiList- DOCUMENT ME!
-
JDialogVOIStatistics
builds and packs the frame. does not set it visible.install the panels of source directory, destination directory, the checkbox for approving the translation-table file and the panel containing the ok and cancel buttons. Installs the checkbox panel.
- Parameters:
srcImage- input imagevoiList- DOCUMENT ME!
-
-
Method Details
-
actionPerformed
when a button is clicked.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
ae- DOCUMENT ME!
-
addedVOI
resets the volumes list to the current VOIVector. adds the highlighter to the new VOI.- Specified by:
addedVOIin interfaceVOIVectorListener- Parameters:
voiEvent- DOCUMENT ME!
-
algorithmPerformed
the standard thread-done event forAlgorithmBase.- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
event- the event
-
anotherCall
private void anotherCall() -
refreshVOIList
Refreshes the list of available and selected VOIs.- Parameters:
VOIlist- imageActive's current VOIVector
-
removedVOI
resets the volumes list to the current VOIVector. removes the highlighter from the removed VOI.- Specified by:
removedVOIin interfaceVOIVectorListener- Parameters:
voiEvent- DOCUMENT ME!
-
vectorSelected
un-implemented.- Specified by:
vectorSelectedin interfaceVOIVectorListener- Parameters:
voiEvent- DOCUMENT ME!
-
callAlgorithm
protected void callAlgorithm()Once all the necessary variables are set, call the VOI Props algorithm to run the statistic calculation.- Specified by:
callAlgorithmin classJDialogScriptableBase
-
cleanUpAndDispose
protected void cleanUpAndDispose()Clean up some things done by the dialog which may affect other parts of MIPAV. -
doPostAlgorithmActions
protected void doPostAlgorithmActions()Used to perform actions after the execution of the algorithm is completed (e.g., put the result image in the image table). Defaults to no action, override to actually have it do something.- Overrides:
doPostAlgorithmActionsin classJDialogScriptableBase
-
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.
-
buildCheckBoxPanel
protected void buildCheckBoxPanel() -
buildDialog
Builds main dialog. -
buildLogPanel
creates a panel for the output log.- Returns:
- DOCUMENT ME!
-
buildMenuEntries
Builds a small menu with "Clear log" and "Overwrite" options.- Returns:
- DOCUMENT ME!
-
buildOKCancelPanel
creates the panel which consists of the OKAY button and the Cancel button.- Returns:
- DOCUMENT ME!
-
buildSelectedListing
creates the visual display in which to list all selected directories in the directory tree. The panel is 240 pixels wide though that is supposed to be the minimum size- Returns:
- the panel which is to hold the list of selected items
-
buildSourceListingPanel
Creates the panel holding the directory tree.- Parameters:
VOIlist- DOCUMENT ME!- Returns:
- Panel.
-
buildSourcePanel
creates the source panel which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories.- Parameters:
VOIlist- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
buildToolBar
protected void buildToolBar()Build the toolbar control. -
buildVOIPanel
creates the source panel for the VOI tab which consists of the directory line, the browse button, and a check box approving the anonymize in sub-directories. Also includes the file-format selection for the output file.- Parameters:
VOIlist- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createNewLogModel
protected void createNewLogModel()This method resets the logModel in preparation for writing new statistics values -
isStatisticSelectionOkay
private boolean isStatisticSelectionOkay()checks to see if the checklist has had any selections made to it. If it hasn't, then the "Statistics Options" tab is brought to the front (it contains the checklist), and the warning message "No statistics were selected! Select a statistic." is displayed.- Returns:
- boolean if a selection in the JPanelAnonymizeImage has been made, returns
true. Otherwise, returnsfalse. - See Also:
-
isTableDestinationOkay
private boolean isTableDestinationOkay()Locates the translation/key-file destination directory. If the directory is not there already, the directory is made. If there is a problem in creating the destination directory, the "Directory" tab is brought to the front; the warning message describing the error is displayed; then the text field with the destination directory is given focus, and all available text is displayed. If the translation/key-file is already present in the chosen directory, there will be an options dialog allowing the user to Overwrite the old translation/key-file, to append the the new translation/key to the end of the current file, or to cancel the entire operation (to look for a new location).- Returns:
- boolean if the selected destination has been made, returns
true. Otherwise, returnsfalse.
-
setupNew
makes the submitted directory as given by the inputted File, or the text as given in the given given textField. Priority is given to the text in the textfield, so if the File's path does not agree with the path in the text field, the directory will be made with the path in the text field. Should the text field not have any path, an IOException will be thrown indicating this problem. If the directory does not exist, it will be created; if there are errors in creating the directory, an IOException will be thrown, with error message describing the problem, with a possible remedy as a suggestion.- Parameters:
selected- DOCUMENT ME!- Returns:
- File a directory
- Throws:
IOException- -- failure to create the directorySecurityException- DOCUMENT ME!
-
setVariables
private boolean setVariables()use the GUI results to set up the variables needed to run the algorithm.- Returns:
trueif parameters set successfully,falseotherwise.
-
updateDialog
protected void updateDialog()Method for updating the GUI after the algorithm has completed, should not be called when scripting. -
updateStatLog
protected void updateStatLog()Method for updating the table after the algorithm has completed. All relevant statistics are stored in the log model. -
updateDialogRow
protected void updateDialogRow(VOI voi, Vector<VOIBase>[] contours, VOIStatisticalProperties properties, ListModel list, int i, String[] rowData, String[] totalData) Writes the statistic data for contours- Parameters:
voi-
-
updateRowStatistics
protected String[] updateRowStatistics(VOI voi, VOIStatisticalProperties properties, String[] rowData, String[] totalData, String end, int count) Writes general statistics data for any VOI structure given a valid "end" modifier to specify the property being fetched.- Parameters:
voi-
-
writeLogHeader
protected void writeLogHeader()Writes the column titles of selected statistics calculations to the logModel. -
writeLogModelToString
Converts the current logModel into either a tab-delimited text file or an XML file. TODO: Fix XML functionality.- Returns:
-
writeStatisticFile
protected void writeStatisticFile()Writes out the statistics file based on the current logModel
-