Class JDialogPyWavelets

All Implemented Interfaces:
AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogPyWavelets extends JDialogScriptableBase implements AlgorithmInterface
See Also:
  • Field Details

    • waveletAlgo

      private PyWavelets waveletAlgo
      Use serialVersionUID for interoperability.
    • image

      private ModelImage image
      Source image.
    • resultImage

      private ModelImage resultImage
      Result image.
    • tType

      private int tType
    • names

      private PyWavelets.WAVELET_NAME[] names
    • orders

      private int[] orders
    • modes

      private PyWavelets.MODE[] modes
    • axes

      private int[] axes
    • filterType

      private int[] filterType
    • filterVal1

      private double[] filterVal1
    • filterVal2

      private double[] filterVal2
    • showTransform

      private boolean showTransform
    • showFilteredTransform

      private boolean showFilteredTransform
    • levels

      private int levels
    • start_level

      private int start_level
    • transformTypeGroup

      private ButtonGroup transformTypeGroup
    • singleLevelDWTButton

      private JRadioButton singleLevelDWTButton
    • multiLevelDWTButton

      private JRadioButton multiLevelDWTButton
    • SWTButton

      private JRadioButton SWTButton
    • SINGLE_LEVEL_DWT

      private int SINGLE_LEVEL_DWT
    • MULTILEVEL_DWT

      private int MULTILEVEL_DWT
    • SWT

      private int SWT
    • labelLevels

      private JLabel labelLevels
    • comboBoxLevels

      private JComboBox<String> comboBoxLevels
    • labelStartLevel

      private JLabel labelStartLevel
    • comboBoxStartLevel

      private JComboBox<String> comboBoxStartLevel
    • xAxisCheckBox

      private JCheckBox xAxisCheckBox
    • yAxisCheckBox

      private JCheckBox yAxisCheckBox
    • zAxisCheckBox

      private JCheckBox zAxisCheckBox
    • doX

      private boolean doX
    • doY

      private boolean doY
    • doZ

      private boolean doZ
    • transformCheckBox

      private JCheckBox transformCheckBox
    • filteredCheckBox

      private JCheckBox filteredCheckBox
    • tabbedPane

      private JTabbedPane tabbedPane
      Tabbed pane
    • labelModeX

      private JLabel labelModeX
    • labelModeY

      private JLabel labelModeY
    • labelModeZ

      private JLabel labelModeZ
    • comboBoxModeX

      private JComboBox<String> comboBoxModeX
    • comboBoxModeY

      private JComboBox<String> comboBoxModeY
    • comboBoxModeZ

      private JComboBox<String> comboBoxModeZ
    • labelNameX

      private JLabel labelNameX
    • labelNameY

      private JLabel labelNameY
    • labelNameZ

      private JLabel labelNameZ
    • comboBoxNameX

      private JComboBox<String> comboBoxNameX
    • comboBoxNameY

      private JComboBox<String> comboBoxNameY
    • comboBoxNameZ

      private JComboBox<String> comboBoxNameZ
    • labelOrderX

      private JLabel labelOrderX
    • labelOrderY

      private JLabel labelOrderY
    • labelOrderZ

      private JLabel labelOrderZ
    • comboBoxOrderX

      private JComboBox<String> comboBoxOrderX
    • comboBoxOrderY

      private JComboBox<String> comboBoxOrderY
    • comboBoxOrderZ

      private JComboBox<String> comboBoxOrderZ
    • lastNameStringX

      private String lastNameStringX
    • lastNameStringY

      private String lastNameStringY
    • lastNameStringZ

      private String lastNameStringZ
    • gbc

    • waveletPanel

      JPanel waveletPanel
    • numComponents

      private int numComponents
    • labelComponents

      private JLabel[] labelComponents
    • comboBoxFilterType

      private JComboBox<String>[] comboBoxFilterType
    • labelVal1

      private JLabel[] labelVal1
    • textVal1

      private JTextField[] textVal1
    • labelVal2

      private JLabel[] labelVal2
    • textVal2

      private JTextField[] textVal2
    • FILTER_NONE

      private final int FILTER_NONE
      See Also:
    • FILTER_SOFT

      private final int FILTER_SOFT
      See Also:
    • FILTER_NN_GARROTE

      private final int FILTER_NN_GARROTE
      See Also:
    • FILTER_HARD

      private final int FILTER_HARD
      See Also:
    • FILTER_GREATER

      private final int FILTER_GREATER
      See Also:
    • FILTER_LESS

      private final int FILTER_LESS
      See Also:
    • FILTER_THRESHOLD_FIRM

      private final int FILTER_THRESHOLD_FIRM
      See Also:
    • BayesCheckBox

      private JCheckBox BayesCheckBox
    • doBayesShrinkThresholdComputation

      private boolean doBayesShrinkThresholdComputation
  • Constructor Details

    • JDialogPyWavelets

      public JDialogPyWavelets()
      Empty constructor needed for dynamic instantiation.
    • JDialogPyWavelets

      public JDialogPyWavelets(Frame theParentFrame, ModelImage im)
      Construct the PyWavelets dialog.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Closes dialog box when the OK button is pressed and calls the algorithm.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggers function.
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithm 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:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • getResultImage

      public ModelImage getResultImage()
      Accessor that returns the image.
      Returns:
      The result image.
    • callAlgorithm

      protected void callAlgorithm()
      Once all the necessary variables are set, call the Barrel/Pincushion Distortion Correction algorithm based on what type of image this is
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Perform any actions required after the running of the algorithm is complete.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase
    • setGUIFromParams

      protected void setGUIFromParams()
      Set up the dialog GUI based on the parameters before running the algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Store the parameters from the dialog to record the execution of this algorithm.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating one of the new parameters.
    • init

      private void init()
      Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • buildTransformTypePanel

      private JPanel buildTransformTypePanel()
    • buildWaveletPanel

      private JPanel buildWaveletPanel()
    • buildFilterPanel

      private JPanel buildFilterPanel()
    • buildModeComboBox

      private JComboBox<String> buildModeComboBox()
    • buildWaveletNameComboBox

      private JComboBox<String> buildWaveletNameComboBox()
    • buildWaveletOrderComboBox

      private JComboBox<String> buildWaveletOrderComboBox(String family)
    • buildFilterTypeComboBox

      private JComboBox<String> buildFilterTypeComboBox()
    • 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.